diff --git a/nms-patches/EntityGuardian.patch b/nms-patches/EntityGuardian.patch index cd30ff32d7..b8f55e3510 100644 --- a/nms-patches/EntityGuardian.patch +++ b/nms-patches/EntityGuardian.patch @@ -1,11 +1,11 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/EntityGuardian.java 2015-02-26 22:40:22.551608140 +0000 -+++ src/main/java/net/minecraft/server/EntityGuardian.java 2015-02-26 22:40:22.551608140 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/EntityGuardian.java 2015-03-19 21:25:54.134142162 +0000 ++++ src/main/java/net/minecraft/server/EntityGuardian.java 2015-03-19 21:25:54.134142162 +0000 @@ -14,7 +14,7 @@ private EntityLiving bo; private int bp; private boolean bq; - private PathfinderGoalRandomStroll br; -+ public PathfinderGoalRandomStroll br; // CraftBukkit - public ++ public PathfinderGoalRandomStroll br; // CraftBukkit - public, PAIL: Rename goalRandomStroll public EntityGuardian(World world) { super(world); diff --git a/nms-patches/NetworkManager.patch b/nms-patches/NetworkManager.patch index 1379f1714a..70ba4ac0e3 100644 --- a/nms-patches/NetworkManager.patch +++ b/nms-patches/NetworkManager.patch @@ -1,11 +1,11 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/NetworkManager.java 2015-02-26 22:40:22.895608136 +0000 -+++ src/main/java/net/minecraft/server/NetworkManager.java 2015-02-26 22:40:22.895608136 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/NetworkManager.java 2015-03-19 21:26:27.850141796 +0000 ++++ src/main/java/net/minecraft/server/NetworkManager.java 2015-03-19 21:26:27.850141796 +0000 @@ -63,7 +63,7 @@ private final EnumProtocolDirection h; private final Queue i = Queues.newConcurrentLinkedQueue(); private final ReentrantReadWriteLock j = new ReentrantReadWriteLock(); - private Channel k; -+ public Channel k; // CraftBukkit - public, PAIL: rename ++ public Channel k; // CraftBukkit - public, PAIL: Rename channel private SocketAddress l; private PacketListener m; private IChatBaseComponent n; diff --git a/nms-patches/PlayerConnection.patch b/nms-patches/PlayerConnection.patch index 1ef0885576..ca48981522 100644 --- a/nms-patches/PlayerConnection.patch +++ b/nms-patches/PlayerConnection.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/PlayerConnection.java 2015-02-27 17:23:53.483145868 +0000 -+++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-02-27 17:23:53.487145868 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/PlayerConnection.java 2015-03-19 21:25:54.882142154 +0000 ++++ src/main/java/net/minecraft/server/PlayerConnection.java 2015-03-19 21:25:54.886142154 +0000 @@ -17,6 +17,48 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -580,7 +580,7 @@ + this.server.getPluginManager().callEvent(event); + if (event.isCancelled()) { + this.sendPacket(new PacketPlayOutHeldItemSlot(this.player.inventory.itemInHandIndex)); -+ this.player.z(); // PAIL: RENAME ++ this.player.z(); // PAIL: Rename resetIdleTimer + return; + } + // CraftBukkit end @@ -937,7 +937,7 @@ + // CraftBukkit end } else if (packetplayinuseentity.a() == PacketPlayInUseEntity.EnumEntityUseAction.ATTACK) { - if (entity instanceof EntityItem || entity instanceof EntityExperienceOrb || entity instanceof EntityArrow || entity == this.player) { -+ if (entity instanceof EntityItem || entity instanceof EntityExperienceOrb || entity instanceof EntityArrow || (entity == this.player && !player.v())) { // CraftBukkit, PAIL: RENAME ++ if (entity instanceof EntityItem || entity instanceof EntityExperienceOrb || entity instanceof EntityArrow || (entity == this.player && !player.v())) { // CraftBukkit, PAIL: Rename isSpectator this.disconnect("Attempting to attack an invalid entity"); this.minecraftServer.warning("Player " + this.player.getName() + " tried to attack an invalid entity"); return; diff --git a/nms-patches/WorldData.patch b/nms-patches/WorldData.patch index 07e5410fd7..a45ed3fc7b 100644 --- a/nms-patches/WorldData.patch +++ b/nms-patches/WorldData.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/WorldData.java 2015-03-01 00:59:18.411214060 +0000 -+++ src/main/java/net/minecraft/server/WorldData.java 2015-03-01 00:59:18.411214060 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/WorldData.java 2015-03-19 21:25:55.170142151 +0000 ++++ src/main/java/net/minecraft/server/WorldData.java 2015-03-19 21:25:55.170142151 +0000 @@ -1,6 +1,11 @@ package net.minecraft.server; @@ -63,7 +63,7 @@ public void setDifficulty(EnumDifficulty enumdifficulty) { this.z = enumdifficulty; + // CraftBukkit start -+ PacketPlayOutServerDifficulty packet = new PacketPlayOutServerDifficulty(this.y(), this.z()); // PAIL: Rename ++ PacketPlayOutServerDifficulty packet = new PacketPlayOutServerDifficulty(this.y(), this.z()); // PAIL: Rename getDifficulty, isDifficultyLocked + for (EntityPlayer player : (java.util.List) (java.util.List) world.players) { + player.playerConnection.sendPacket(packet); + } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java index e015a39e04..9f095488d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java @@ -24,7 +24,7 @@ public class CraftGuardian extends CraftMonster implements Guardian { @Override public boolean isElder() { - return ((EntityGuardian)entity).cn(); + return ((EntityGuardian)entity).cn(); // PAIL: Rename isElder } @Override @@ -32,22 +32,22 @@ public class CraftGuardian extends CraftMonster implements Guardian { EntityGuardian entityGuardian = (EntityGuardian) entity; if (!isElder() && shouldBeElder) { - entityGuardian.a( true ); + entityGuardian.a( true ); // PAIL: Rename setElder } else if (isElder() && !shouldBeElder) { - entityGuardian.a( false ); + entityGuardian.a( false ); // PAIL: Rename setElder // Since minecraft does not reset the elder Guardian to a guardian we have to do that entity.setSize(0.85F, 0.85F); // Since aW() calls its supers it will try to re register attributes which is invalid - // PAIL: rename and check these on update - entityGuardian.getAttributeInstance(GenericAttributes.e).setValue(6.0D); - entityGuardian.getAttributeInstance(GenericAttributes.d).setValue(0.5D); - entityGuardian.getAttributeInstance(GenericAttributes.b).setValue(16.0D); + // check these on update + entityGuardian.getAttributeInstance(GenericAttributes.e).setValue(6.0D); // PAIL: Rename ATTACK_DAMAGE + entityGuardian.getAttributeInstance(GenericAttributes.d).setValue(0.5D); // PAIL: Rename MOVEMENT_SPEED + entityGuardian.getAttributeInstance(GenericAttributes.b).setValue(16.0D); // PAIL: Rename FOLLOW_RANGE entityGuardian.getAttributeInstance(GenericAttributes.maxHealth).setValue(30.0D); // Update pathfinding (random stroll back to 80) - entityGuardian.br.b(80); + entityGuardian.br.b(80); // PAIL: Rename goalRandomStroll.setTimeBetweenMovement // Tell minecraft that we need persistence since the guardian changed entityGuardian.initAttributes(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 05923b4484..16a35b8571 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -759,7 +759,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return; } - getHandle().e((Entity) getHandle()); // RENAME + getHandle().e((Entity) getHandle()); // PAIL: Rename setSpectatorTarget getHandle().playerInteractManager.setGameMode(WorldSettings.EnumGamemode.getById(mode.getValue())); getHandle().fallDistance = 0; getHandle().playerConnection.sendPacket(new PacketPlayOutGameStateChange(3, mode.getValue())); diff --git a/src/test/java/org/bukkit/PerMaterialTest.java b/src/test/java/org/bukkit/PerMaterialTest.java index 2e212ef7f7..e36a3e7580 100644 --- a/src/test/java/org/bukkit/PerMaterialTest.java +++ b/src/test/java/org/bukkit/PerMaterialTest.java @@ -34,7 +34,7 @@ public class PerMaterialTest extends AbstractTestingBase { @BeforeClass public static void getFireValues() { - fireValues = Util.getInternalState(BlockFire.class, Blocks.FIRE, "T"); + fireValues = Util.getInternalState(BlockFire.class, Blocks.FIRE, "T"); // PAIL: Rename flameChances } @Parameters(name= "{index}: {0}")