From dcb9d6a5ef2d572b041696d5728f660aa8549e47 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Thu, 19 Sep 2013 13:25:08 -0500 Subject: Update CraftBukkit to 1.6.4 --- src/main/java/net/minecraft/server/BlockFire.java | 6 +- .../java/net/minecraft/server/BlockLeaves.java | 2 +- .../java/net/minecraft/server/BlockPortal.java | 4 +- .../minecraft/server/BlockPressurePlateBinary.java | 2 +- src/main/java/net/minecraft/server/BlockSoil.java | 2 +- .../java/net/minecraft/server/BlockTripwire.java | 4 +- src/main/java/net/minecraft/server/BlockVine.java | 2 +- src/main/java/net/minecraft/server/Chunk.java | 4 +- .../java/net/minecraft/server/DedicatedServer.java | 29 ++-- src/main/java/net/minecraft/server/Entity.java | 102 ++++++------ .../java/net/minecraft/server/EntityArrow.java | 10 +- .../java/net/minecraft/server/EntityBlaze.java | 10 +- src/main/java/net/minecraft/server/EntityBoat.java | 16 +- .../java/net/minecraft/server/EntityChicken.java | 10 +- src/main/java/net/minecraft/server/EntityCow.java | 12 +- .../java/net/minecraft/server/EntityCreature.java | 16 +- .../java/net/minecraft/server/EntityCreeper.java | 12 +- .../server/EntityDamageSourceIndirect.java | 2 +- .../net/minecraft/server/EntityEnderCrystal.java | 2 +- .../net/minecraft/server/EntityEnderDragon.java | 16 +- .../java/net/minecraft/server/EntityEnderman.java | 12 +- .../net/minecraft/server/EntityExperienceOrb.java | 6 +- .../net/minecraft/server/EntityFallingBlock.java | 2 +- .../java/net/minecraft/server/EntityFireball.java | 14 +- .../java/net/minecraft/server/EntityFireworks.java | 2 +- .../net/minecraft/server/EntityFishingHook.java | 4 +- .../java/net/minecraft/server/EntityGhast.java | 18 +-- .../java/net/minecraft/server/EntityHanging.java | 6 +- .../java/net/minecraft/server/EntityHorse.java | 48 +++--- .../java/net/minecraft/server/EntityHuman.java | 94 +++++------ .../net/minecraft/server/EntityInsentient.java | 66 ++++---- .../java/net/minecraft/server/EntityIronGolem.java | 24 +-- src/main/java/net/minecraft/server/EntityItem.java | 6 +- .../net/minecraft/server/EntityLargeFireball.java | 8 +- .../java/net/minecraft/server/EntityLeash.java | 12 +- .../java/net/minecraft/server/EntityLiving.java | 175 +++++++++++---------- .../java/net/minecraft/server/EntityMagmaCube.java | 14 +- .../minecraft/server/EntityMinecartAbstract.java | 22 +-- .../java/net/minecraft/server/EntityMonster.java | 8 +- .../java/net/minecraft/server/EntityOcelot.java | 14 +- src/main/java/net/minecraft/server/EntityPig.java | 16 +- .../java/net/minecraft/server/EntityPigZombie.java | 12 +- .../java/net/minecraft/server/EntityPlayer.java | 25 ++- .../java/net/minecraft/server/EntityPotion.java | 28 ++-- .../net/minecraft/server/EntityProjectile.java | 6 +- .../java/net/minecraft/server/EntitySheep.java | 14 +- .../net/minecraft/server/EntitySilverfish.java | 12 +- .../java/net/minecraft/server/EntitySkeleton.java | 30 ++-- .../java/net/minecraft/server/EntitySlime.java | 14 +- .../net/minecraft/server/EntitySmallFireball.java | 2 +- .../java/net/minecraft/server/EntitySnowman.java | 10 +- .../java/net/minecraft/server/EntitySpider.java | 10 +- .../java/net/minecraft/server/EntitySquid.java | 18 +-- .../java/net/minecraft/server/EntityTNTPrimed.java | 2 +- .../net/minecraft/server/EntityTrackerEntry.java | 10 +- .../java/net/minecraft/server/EntityWitch.java | 14 +- .../java/net/minecraft/server/EntityWither.java | 25 ++- .../net/minecraft/server/EntityWitherSkull.java | 4 +- src/main/java/net/minecraft/server/EntityWolf.java | 18 +-- .../java/net/minecraft/server/EntityZombie.java | 20 +-- .../java/net/minecraft/server/FoodMetaData.java | 2 +- src/main/java/net/minecraft/server/ItemBoat.java | 4 +- .../java/net/minecraft/server/ItemFishingRod.java | 4 +- src/main/java/net/minecraft/server/ItemLeash.java | 4 +- src/main/java/net/minecraft/server/ItemStack.java | 4 +- .../java/net/minecraft/server/MinecraftServer.java | 98 ++++++------ .../java/net/minecraft/server/MobEffectList.java | 8 +- .../minecraft/server/PathfinderGoalBreakDoor.java | 2 +- .../net/minecraft/server/PathfinderGoalBreed.java | 2 +- .../minecraft/server/PathfinderGoalEatTile.java | 2 +- .../minecraft/server/PathfinderGoalMakeLove.java | 4 +- .../server/PathfinderGoalMeleeAttack.java | 6 +- .../net/minecraft/server/PathfinderGoalPanic.java | 2 +- .../net/minecraft/server/PathfinderGoalSit.java | 2 +- .../net/minecraft/server/PathfinderGoalTame.java | 6 +- .../net/minecraft/server/PathfinderGoalTarget.java | 2 +- .../net/minecraft/server/PendingConnection.java | 36 ++--- .../net/minecraft/server/PlayerConnection.java | 22 ++- .../minecraft/server/PlayerInteractManager.java | 8 +- .../net/minecraft/server/PortalTravelAgent.java | 2 +- src/main/java/net/minecraft/server/World.java | 10 +- .../java/net/minecraft/server/WorldServer.java | 6 +- .../bukkit/craftbukkit/entity/CraftFireball.java | 4 +- .../org/bukkit/craftbukkit/entity/CraftFish.java | 2 +- .../org/bukkit/craftbukkit/entity/CraftHorse.java | 4 +- .../bukkit/craftbukkit/entity/CraftIronGolem.java | 4 +- .../bukkit/craftbukkit/entity/CraftItemFrame.java | 8 +- .../craftbukkit/entity/CraftLargeFireball.java | 2 +- .../craftbukkit/entity/CraftLivingEntity.java | 8 +- .../org/bukkit/craftbukkit/entity/CraftPlayer.java | 4 +- .../craftbukkit/entity/CraftThrownPotion.java | 4 +- 91 files changed, 710 insertions(+), 674 deletions(-) (limited to 'src') diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java index f52d7845..9364fb94 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -79,7 +79,7 @@ public class BlockFire extends Block { fireExtinguished(world, i, j, k); // CraftBukkit - invalid place location } - if (!flag && world.Q() && (world.F(i, j, k) || world.F(i - 1, j, k) || world.F(i + 1, j, k) || world.F(i, j, k - 1) || world.F(i, j, k + 1))) { + if (!flag && world.Q() && (world.isRainingAt(i, j, k) || world.isRainingAt(i - 1, j, k) || world.isRainingAt(i + 1, j, k) || world.isRainingAt(i, j, k - 1) || world.isRainingAt(i, j, k + 1))) { fireExtinguished(world, i, j, k); // CraftBukkit - extinguished by rain } else { int l = world.getData(i, j, k); @@ -129,7 +129,7 @@ public class BlockFire extends Block { j2 /= 2; } - if (j2 > 0 && random.nextInt(l1) <= j2 && (!world.Q() || !world.F(i1, k1, j1)) && !world.F(i1 - 1, k1, k) && !world.F(i1 + 1, k1, j1) && !world.F(i1, k1, j1 - 1) && !world.F(i1, k1, j1 + 1)) { + if (j2 > 0 && random.nextInt(l1) <= j2 && (!world.Q() || !world.isRainingAt(i1, k1, j1)) && !world.isRainingAt(i1 - 1, k1, k) && !world.isRainingAt(i1 + 1, k1, j1) && !world.isRainingAt(i1, k1, j1 - 1) && !world.isRainingAt(i1, k1, j1 + 1)) { int k2 = l + random.nextInt(5) / 4; if (k2 > 15) { @@ -188,7 +188,7 @@ public class BlockFire extends Block { } // CraftBukkit end - if (random.nextInt(i1 + 10) < 5 && !world.F(i, j, k)) { + if (random.nextInt(i1 + 10) < 5 && !world.isRainingAt(i, j, k)) { int k1 = i1 + random.nextInt(5) / 4; if (k1 > 15) { diff --git a/src/main/java/net/minecraft/server/BlockLeaves.java b/src/main/java/net/minecraft/server/BlockLeaves.java index 4e979a05..0cf3a0ef 100644 --- a/src/main/java/net/minecraft/server/BlockLeaves.java +++ b/src/main/java/net/minecraft/server/BlockLeaves.java @@ -178,7 +178,7 @@ public class BlockLeaves extends BlockTransparant { } public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { - if (!world.isStatic && entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) { + if (!world.isStatic && entityhuman.by() != null && entityhuman.by().id == Item.SHEARS.id) { entityhuman.a(StatisticList.C[this.id], 1); this.b(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3)); } else { diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java index a3632d9e..4f297f89 100644 --- a/src/main/java/net/minecraft/server/BlockPortal.java +++ b/src/main/java/net/minecraft/server/BlockPortal.java @@ -27,7 +27,7 @@ public class BlockPortal extends BlockHalfTransparant { Entity entity = ItemMonsterEgg.a(world, 57, (double) i + 0.5D, (double) l + 1.1D, (double) k + 0.5D); if (entity != null) { - entity.portalCooldown = entity.ab(); + entity.portalCooldown = entity.ac(); } } } @@ -185,7 +185,7 @@ public class BlockPortal extends BlockHalfTransparant { world.getServer().getPluginManager().callEvent(event); // CraftBukkit end - entity.aa(); + entity.ab(); } } } diff --git a/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java b/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java index 27892a94..23c6f874 100644 --- a/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java +++ b/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java @@ -63,7 +63,7 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract { } // CraftBukkit end - if (!entity.at()) { + if (!entity.au()) { return 15; } } diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java index d5561b45..98611262 100644 --- a/src/main/java/net/minecraft/server/BlockSoil.java +++ b/src/main/java/net/minecraft/server/BlockSoil.java @@ -29,7 +29,7 @@ public class BlockSoil extends Block { } public void a(World world, int i, int j, int k, Random random) { - if (!this.m(world, i, j, k) && !world.F(i, j + 1, k)) { + if (!this.m(world, i, j, k) && !world.isRainingAt(i, j + 1, k)) { int l = world.getData(i, j, k); if (l > 0) { diff --git a/src/main/java/net/minecraft/server/BlockTripwire.java b/src/main/java/net/minecraft/server/BlockTripwire.java index cdf5f1e2..42398891 100644 --- a/src/main/java/net/minecraft/server/BlockTripwire.java +++ b/src/main/java/net/minecraft/server/BlockTripwire.java @@ -76,7 +76,7 @@ public class BlockTripwire extends Block { public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) { if (!world.isStatic) { - if (entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) { + if (entityhuman.by() != null && entityhuman.by().id == Item.SHEARS.id) { world.setData(i, j, k, l | 8, 4); } } @@ -140,7 +140,7 @@ public class BlockTripwire extends Block { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); - if (!entity.at()) { + if (!entity.au()) { flag1 = true; break; } diff --git a/src/main/java/net/minecraft/server/BlockVine.java b/src/main/java/net/minecraft/server/BlockVine.java index 187de073..22c50bd4 100644 --- a/src/main/java/net/minecraft/server/BlockVine.java +++ b/src/main/java/net/minecraft/server/BlockVine.java @@ -301,7 +301,7 @@ public class BlockVine extends Block { } public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { - if (!world.isStatic && entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) { + if (!world.isStatic && entityhuman.by() != null && entityhuman.by().id == Item.SHEARS.id) { entityhuman.a(StatisticList.C[this.id], 1); this.b(world, i, j, k, new ItemStack(Block.VINE, 1, 0)); } else { diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index 5b13deaf..3fa774ff 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -658,7 +658,7 @@ public class Chunk { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); - entity.Q(); + entity.R(); } this.world.a(this.entitySlices[i]); @@ -719,7 +719,7 @@ public class Chunk { if (entity1 != entity && entity1.boundingBox.b(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) { list.add(entity1); - Entity[] aentity = entity1.an(); + Entity[] aentity = entity1.ao(); if (aentity != null) { for (int i1 = 0; i1 < aentity.length; ++i1) { diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java index 95d7e5de..f871b739 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -48,7 +48,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer System.setErr(new PrintStream(new LoggerOutputStream(this.getLogger().getLogger(), Level.SEVERE), true)); // CraftBukkit end - this.getLogger().info("Starting minecraft server version 1.6.2"); + this.getLogger().info("Starting minecraft server version 1.6.4"); if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) { this.getLogger().warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); } @@ -69,6 +69,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer this.setTexturePack(this.propertyManager.getString("texture-pack", "")); this.setMotd(this.propertyManager.getString("motd", "A Minecraft Server")); this.setForceGamemode(this.propertyManager.getBoolean("force-gamemode", false)); + this.e(this.propertyManager.getInt("player-idle-timeout", 0)); if (this.propertyManager.getInt("difficulty", 1) < 0) { this.propertyManager.a("difficulty", Integer.valueOf(0)); } else if (this.propertyManager.getInt("difficulty", 1) > 3) { @@ -201,7 +202,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer protected void a(CrashReport crashreport) { while (this.isRunning()) { - this.ar(); + this.as(); try { Thread.sleep(10L); @@ -224,7 +225,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer public void t() { // CraftBukkit - protected -> public super.t(); - this.ar(); + this.as(); } public boolean getAllowNether() { @@ -236,8 +237,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } public void a(MojangStatisticsGenerator mojangstatisticsgenerator) { - mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.as().getHasWhitelist())); - mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(this.as().getWhitelisted().size())); + mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.at().getHasWhitelist())); + mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(this.at().getWhitelisted().size())); super.a(mojangstatisticsgenerator); } @@ -249,7 +250,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer this.l.add(new ServerCommand(s, icommandlistener)); } - public void ar() { + public void as() { while (!this.l.isEmpty()) { ServerCommand servercommand = (ServerCommand) this.l.remove(0); @@ -268,7 +269,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer return true; } - public DedicatedPlayerList as() { + public DedicatedPlayerList at() { return (DedicatedPlayerList) super.getPlayerList(); } @@ -302,7 +303,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer return file1 != null ? file1.getAbsolutePath() : "No settings file"; } - public void at() { + public void au() { ServerGUI.a(this); this.t = true; } @@ -326,9 +327,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer public boolean a(World world, int i, int j, int k, EntityHuman entityhuman) { if (world.worldProvider.dimension != 0) { return false; - } else if (this.as().getOPs().isEmpty()) { + } else if (this.at().getOPs().isEmpty()) { return false; - } else if (this.as().isOp(entityhuman.getName())) { + } else if (this.at().isOp(entityhuman.getName())) { return false; } else if (this.getSpawnProtection() <= 0) { return false; @@ -350,7 +351,13 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer return this.propertyManager.getInt("op-permission-level", 4); } + public void e(int i) { + super.e(i); + this.propertyManager.a("player-idle-timeout", Integer.valueOf(i)); + this.a(); + } + public PlayerList getPlayerList() { - return this.as(); + return this.at(); } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 2b951285..21580888 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -227,10 +227,10 @@ public abstract class Entity { } public void l_() { - this.x(); + this.y(); } - public void x() { + public void y() { this.world.methodProfiler.a("entityBaseTick"); if (this.vehicle != null && this.vehicle.dead) { this.vehicle = null; @@ -248,12 +248,12 @@ public abstract class Entity { this.world.methodProfiler.a("portal"); MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer(); - i = this.y(); + i = this.z(); if (this.ap) { if (true || minecraftserver.getAllowNether()) { // CraftBukkit if (this.vehicle == null && this.aq++ >= i) { this.aq = i; - this.portalCooldown = this.ab(); + this.portalCooldown = this.ac(); byte b0; if (this.world.worldProvider.dimension == -1) { @@ -284,7 +284,7 @@ public abstract class Entity { this.world.methodProfiler.b(); } - if (this.isSprinting() && !this.G()) { + if (this.isSprinting() && !this.H()) { int j = MathHelper.floor(this.locX); i = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height); @@ -296,7 +296,7 @@ public abstract class Entity { } } - this.H(); + this.I(); if (this.world.isStatic) { this.fireTicks = 0; } else if (this.fireTicks > 0) { @@ -314,13 +314,13 @@ public abstract class Entity { } } - if (this.I()) { - this.z(); + if (this.J()) { + this.A(); this.fallDistance *= 0.5F; } if (this.locY < -64.0D) { - this.B(); + this.C(); } if (!this.world.isStatic) { @@ -331,11 +331,11 @@ public abstract class Entity { this.world.methodProfiler.b(); } - public int y() { + public int z() { return 0; } - protected void z() { + protected void A() { if (!this.fireProof) { // CraftBukkit start - Fallen in lava TODO: this event spams! if (this instanceof EntityLiving) { @@ -387,7 +387,7 @@ public abstract class Entity { this.fireTicks = 0; } - protected void B() { + protected void C() { this.die(); } @@ -658,7 +658,7 @@ public abstract class Entity { this.S = (float) ((double) this.S + (double) MathHelper.sqrt(d10 * d10 + d11 * d11 + d12 * d12) * 0.6D); if (this.S > (float) this.c && j1 > 0) { this.c = (int) this.S + 1; - if (this.G()) { + if (this.H()) { float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.35F; if (f > 1.0F) { @@ -674,7 +674,7 @@ public abstract class Entity { } try { - this.C(); + this.D(); } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Checking entity tile collision"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision"); @@ -683,7 +683,7 @@ public abstract class Entity { throw new ReportedException(crashreport); } - boolean flag2 = this.F(); + boolean flag2 = this.G(); if (this.world.e(this.boundingBox.shrink(0.001D, 0.001D, 0.001D))) { this.burn(1); @@ -715,7 +715,7 @@ public abstract class Entity { } } - protected void C() { + protected void D() { int i = MathHelper.floor(this.boundingBox.a + 0.001D); int j = MathHelper.floor(this.boundingBox.b + 0.001D); int k = MathHelper.floor(this.boundingBox.c + 0.001D); @@ -776,7 +776,7 @@ public abstract class Entity { } } - public AxisAlignedBB D() { + public AxisAlignedBB E() { return null; } @@ -796,15 +796,15 @@ public abstract class Entity { } } - public boolean F() { - return this.inWater || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ)); + public boolean G() { + return this.inWater || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ)); } - public boolean G() { + public boolean H() { return this.inWater; } - public boolean H() { + public boolean I() { if (this.world.a(this.boundingBox.grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D, 0.001D, 0.001D), Material.WATER, this)) { if (!this.inWater && !this.justCreated) { float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.2F; @@ -864,7 +864,7 @@ public abstract class Entity { return 0.0F; } - public boolean I() { + public boolean J() { return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA); } @@ -1013,7 +1013,7 @@ public abstract class Entity { this.an = true; } - protected void J() { + protected void K() { this.velocityChanged = true; } @@ -1021,23 +1021,23 @@ public abstract class Entity { if (this.isInvulnerable()) { return false; } else { - this.J(); + this.K(); return false; } } - public boolean K() { + public boolean L() { return false; } - public boolean L() { + public boolean M() { return false; } public void b(Entity entity, int i) {} public boolean c(NBTTagCompound nbttagcompound) { - String s = this.P(); + String s = this.Q(); if (!this.dead && s != null) { nbttagcompound.setString("id", s); @@ -1049,7 +1049,7 @@ public abstract class Entity { } public boolean d(NBTTagCompound nbttagcompound) { - String s = this.P(); + String s = this.Q(); if (!this.dead && s != null && this.passenger == null) { nbttagcompound.setString("id", s); @@ -1150,7 +1150,7 @@ public abstract class Entity { this.setPosition(this.locX, this.locY, this.locZ); this.b(this.yaw, this.pitch); this.a(nbttagcompound); - if (this.O()) { + if (this.P()) { this.setPosition(this.locX, this.locY, this.locZ); } @@ -1214,11 +1214,11 @@ public abstract class Entity { } } - protected boolean O() { + protected boolean P() { return true; } - protected final String P() { + protected final String Q() { return EntityTypes.b(this); } @@ -1226,7 +1226,7 @@ public abstract class Entity { protected abstract void b(NBTTagCompound nbttagcompound); - public void Q() {} + public void R() {} protected NBTTagList a(double... adouble) { NBTTagList nbttaglist = new NBTTagList(); @@ -1305,7 +1305,7 @@ public abstract class Entity { return null; } - public void U() { + public void V() { if (this.vehicle.dead) { this.vehicle = null; } else { @@ -1314,7 +1314,7 @@ public abstract class Entity { this.motZ = 0.0D; this.l_(); if (this.vehicle != null) { - this.vehicle.V(); + this.vehicle.W(); this.g += (double) (this.vehicle.yaw - this.vehicle.lastYaw); for (this.f += (double) (this.vehicle.pitch - this.vehicle.lastPitch); this.g >= 180.0D; this.g -= 360.0D) { @@ -1359,17 +1359,17 @@ public abstract class Entity { } } - public void V() { + public void W() { if (this.passenger != null) { - this.passenger.setPosition(this.locX, this.locY + this.X() + this.passenger.W(), this.locZ); + this.passenger.setPosition(this.locX, this.locY + this.Y() + this.passenger.X(), this.locZ); } } - public double W() { + public double X() { return (double) this.height; } - public double X() { + public double Y() { return (double) this.length * 0.75D; } @@ -1455,17 +1455,17 @@ public abstract class Entity { } } - public float Y() { + public float Z() { return 0.1F; } - public Vec3D Z() { + public Vec3D aa() { return null; } - public void aa() { + public void ab() { if (this.portalCooldown > 0) { - this.portalCooldown = this.ab(); + this.portalCooldown = this.ac(); } else { double d0 = this.lastX - this.locX; double d1 = this.lastZ - this.locZ; @@ -1478,7 +1478,7 @@ public abstract class Entity { } } - public int ab() { + public int ac() { return 900; } @@ -1492,7 +1492,7 @@ public abstract class Entity { return !this.fireProof && (this.fireTicks > 0 || this.f(0)); } - public boolean af() { + public boolean ag() { return this.vehicle != null; } @@ -1659,7 +1659,7 @@ public abstract class Entity { } } - public void al() { + public void am() { this.K = true; this.fallDistance = 0.0F; } @@ -1674,7 +1674,7 @@ public abstract class Entity { return LocaleI18n.get("entity." + s + ".name"); } - public Entity[] an() { + public Entity[] ao() { return null; } @@ -1686,7 +1686,7 @@ public abstract class Entity { return 0.0F; } - public boolean ap() { + public boolean aq() { return true; } @@ -1808,15 +1808,15 @@ public abstract class Entity { return true; } - public int ar() { + public int as() { return 3; } - public int as() { + public int at() { return this.as; } - public boolean at() { + public boolean au() { return false; } @@ -1833,7 +1833,7 @@ public abstract class Entity { return this.uniqueID; } - public boolean aw() { + public boolean ax() { return true; } diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index a4766c5e..c9ec78a1 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -175,7 +175,7 @@ public class EntityArrow extends Entity implements IProjectile { for (l = 0; l < list.size(); ++l) { Entity entity1 = (Entity) list.get(l); - if (entity1.K() && (entity1 != this.shooter || this.au >= 5)) { + if (entity1.L() && (entity1 != this.shooter || this.au >= 5)) { f1 = 0.3F; AxisAlignedBB axisalignedbb1 = entity1.boundingBox.grow((double) f1, (double) f1, (double) f1); MovingObjectPosition movingobjectposition1 = axisalignedbb1.a(vec3d, vec3d1); @@ -242,7 +242,7 @@ public class EntityArrow extends Entity implements IProjectile { EntityLiving entityliving = (EntityLiving) movingobjectposition.entity; if (!this.world.isStatic) { - entityliving.m(entityliving.aT() + 1); + entityliving.m(entityliving.aU() + 1); } if (this.aw > 0) { @@ -329,7 +329,7 @@ public class EntityArrow extends Entity implements IProjectile { float f4 = 0.99F; f1 = 0.05F; - if (this.G()) { + if (this.H()) { for (int j1 = 0; j1 < 4; ++j1) { f3 = 0.25F; this.world.addParticle("bubble", this.locX - this.motX * (double) f3, this.locY - this.motY * (double) f3, this.locZ - this.motZ * (double) f3, this.motX, this.motY, this.motZ); @@ -343,7 +343,7 @@ public class EntityArrow extends Entity implements IProjectile { this.motZ *= (double) f4; this.motY -= (double) f1; this.setPosition(this.locX, this.locY, this.locZ); - this.C(); + this.D(); } } @@ -425,7 +425,7 @@ public class EntityArrow extends Entity implements IProjectile { this.aw = i; } - public boolean ap() { + public boolean aq() { return false; } diff --git a/src/main/java/net/minecraft/server/EntityBlaze.java b/src/main/java/net/minecraft/server/EntityBlaze.java index ad610291..8c1c7e66 100644 --- a/src/main/java/net/minecraft/server/EntityBlaze.java +++ b/src/main/java/net/minecraft/server/EntityBlaze.java @@ -12,8 +12,8 @@ public class EntityBlaze extends EntityMonster { this.b = 10; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.e).setValue(6.0D); } @@ -26,11 +26,11 @@ public class EntityBlaze extends EntityMonster { return "mob.blaze.breathe"; } - protected String aN() { + protected String aO() { return "mob.blaze.hit"; } - protected String aO() { + protected String aP() { return "mob.blaze.death"; } @@ -40,7 +40,7 @@ public class EntityBlaze extends EntityMonster { public void c() { if (!this.world.isStatic) { - if (this.F()) { + if (this.G()) { this.damageEntity(DamageSource.DROWN, 1.0F); } diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java index e1a5dc2b..0a0df02b 100644 --- a/src/main/java/net/minecraft/server/EntityBoat.java +++ b/src/main/java/net/minecraft/server/EntityBoat.java @@ -67,11 +67,11 @@ public class EntityBoat extends Entity { return entity.boundingBox; } - public AxisAlignedBB D() { + public AxisAlignedBB E() { return this.boundingBox; } - public boolean L() { + public boolean M() { return true; } @@ -88,7 +88,7 @@ public class EntityBoat extends Entity { this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit } - public double X() { + public double Y() { return (double) this.length * 0.0D - 0.30000001192092896D; } @@ -112,7 +112,7 @@ public class EntityBoat extends Entity { this.c(-this.h()); this.a(10); this.setDamage(this.getDamage() + f * 10.0F); - this.J(); + this.K(); boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild; if (flag || this.getDamage() > 40.0F) { @@ -143,7 +143,7 @@ public class EntityBoat extends Entity { } } - public boolean K() { + public boolean L() { return !this.dead; } @@ -370,7 +370,7 @@ public class EntityBoat extends Entity { for (l = 0; l < list.size(); ++l) { Entity entity = (Entity) list.get(l); - if (entity != this.passenger && entity.L() && entity instanceof EntityBoat) { + if (entity != this.passenger && entity.M() && entity instanceof EntityBoat) { entity.collide(this); } } @@ -412,12 +412,12 @@ public class EntityBoat extends Entity { } } - public void V() { + public void W() { if (this.passenger != null) { double d0 = Math.cos((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D; double d1 = Math.sin((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D; - this.passenger.setPosition(this.locX + d0, this.locY + this.X() + this.passenger.W(), this.locZ + d1); + this.passenger.setPosition(this.locX + d0, this.locY + this.Y() + this.passenger.X(), this.locZ + d1); } } diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java index d6dc9b43..fc75f2b3 100644 --- a/src/main/java/net/minecraft/server/EntityChicken.java +++ b/src/main/java/net/minecraft/server/EntityChicken.java @@ -23,12 +23,12 @@ public class EntityChicken extends EntityAnimal { this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this)); } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(4.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } @@ -69,11 +69,11 @@ public class EntityChicken extends EntityAnimal { return "mob.chicken.say"; } - protected String aN() { + protected String aO() { return "mob.chicken.hurt"; } - protected String aO() { + protected String aP() { return "mob.chicken.hurt"; } diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java index ed49016e..501e71c8 100644 --- a/src/main/java/net/minecraft/server/EntityCow.java +++ b/src/main/java/net/minecraft/server/EntityCow.java @@ -21,12 +21,12 @@ public class EntityCow extends EntityAnimal { this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this)); } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D); } @@ -35,11 +35,11 @@ public class EntityCow extends EntityAnimal { return "mob.cow.say"; } - protected String aN() { + protected String aO() { return "mob.cow.hurt"; } - protected String aO() { + protected String aP() { return "mob.cow.hurt"; } @@ -47,7 +47,7 @@ public class EntityCow extends EntityAnimal { this.makeSound("mob.cow.step", 0.15F, 1.0F); } - protected float aZ() { + protected float ba() { return 0.4F; } diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java index 44b60246..a2ad05d9 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -29,7 +29,7 @@ public abstract class EntityCreature extends EntityInsentient { return false; } - protected void bk() { + protected void bl() { this.world.methodProfiler.a("ai"); if (this.bo > 0 && --this.bo == 0) { AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d); @@ -89,8 +89,8 @@ public abstract class EntityCreature extends EntityInsentient { } int i = MathHelper.floor(this.boundingBox.b + 0.5D); - boolean flag = this.G(); - boolean flag1 = this.I(); + boolean flag = this.H(); + boolean flag1 = this.J(); this.pitch = 0.0F; if (this.pathEntity != null && this.random.nextInt(100) != 0) { @@ -157,7 +157,7 @@ public abstract class EntityCreature extends EntityInsentient { this.world.methodProfiler.b(); } else { - super.bk(); + super.bl(); this.pathEntity = null; } } @@ -257,8 +257,8 @@ public abstract class EntityCreature extends EntityInsentient { protected void bF() { super.bF(); - if (this.bH() && this.bI() != null && this.bI().world == this.world) { - Entity entity = this.bI(); + if (this.bH() && this.getLeashHolder() != null && this.getLeashHolder().world == this.world) { + Entity entity = this.getLeashHolder(); this.b((int) entity.locX, (int) entity.locY, (int) entity.locZ, 5); float f = this.d(entity); @@ -266,7 +266,7 @@ public abstract class EntityCreature extends EntityInsentient { if (this instanceof EntityTameableAnimal && ((EntityTameableAnimal) this).isSitting()) { if (f > 10.0F) { this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit - this.a(true, true); + this.unleash(true, true); } return; @@ -295,7 +295,7 @@ public abstract class EntityCreature extends EntityInsentient { if (f > 10.0F) { this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit - this.a(true, true); + this.unleash(true, true); } } else if (!this.bH() && this.bt) { this.bt = false; diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java index 00c13523..5424003d 100644 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ b/src/main/java/net/minecraft/server/EntityCreeper.java @@ -26,16 +26,16 @@ public class EntityCreeper extends EntityMonster { this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, false)); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } - public boolean be() { + public boolean bf() { return true; } - public int ar() { + public int as() { return this.getGoalTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F); } @@ -112,11 +112,11 @@ public class EntityCreeper extends EntityMonster { super.l_(); } - protected String aN() { + protected String aO() { return "mob.creeper.say"; } - protected String aO() { + protected String aP() { return "mob.creeper.death"; } diff --git a/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java b/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java index 1d1cd75c..1cb96229 100644 --- a/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java +++ b/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java @@ -19,7 +19,7 @@ public class EntityDamageSourceIndirect extends EntityDamageSource { public ChatMessage getLocalizedDeathMessage(EntityLiving entityliving) { String s = this.owner == null ? this.p.getScoreboardDisplayName() : this.owner.getScoreboardDisplayName(); - ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).aY() : null; + ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).aZ() : null; String s1 = "death.attack." + this.translationIndex; String s2 = s1 + ".item"; diff --git a/src/main/java/net/minecraft/server/EntityEnderCrystal.java b/src/main/java/net/minecraft/server/EntityEnderCrystal.java index ebf76a0b..3d6e2343 100644 --- a/src/main/java/net/minecraft/server/EntityEnderCrystal.java +++ b/src/main/java/net/minecraft/server/EntityEnderCrystal.java @@ -47,7 +47,7 @@ public class EntityEnderCrystal extends Entity { protected void a(NBTTagCompound nbttagcompound) {} - public boolean K() { + public boolean L() { return true; } diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java index a8608c9e..e1eded3a 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -47,8 +47,8 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo this.am = true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(200.0D); } @@ -502,7 +502,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo return super.damageEntity(damagesource, f); } - protected void aA() { + protected void aB() { ++this.bB; if (this.bB >= 180 && this.bB <= 200) { float f = (this.random.nextFloat() - 0.5F) * 8.0F; @@ -613,13 +613,13 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo BlockEnderPortal.a = false; } - protected void bo() {} + protected void u() {} - public Entity[] an() { + public Entity[] ao() { return this.children; } - public boolean K() { + public boolean L() { return false; } @@ -631,11 +631,11 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo return "mob.enderdragon.growl"; } - protected String aN() { + protected String aO() { return "mob.enderdragon.hit"; } - protected float aZ() { + protected float ba() { return 5.0F; } diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java index 52dd1347..bd19ff3e 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -24,8 +24,8 @@ public class EntityEnderman extends EntityMonster { this.Y = 1.0F; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(40.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D); this.getAttributeInstance(GenericAttributes.e).setValue(7.0D); @@ -91,7 +91,7 @@ public class EntityEnderman extends EntityMonster { } public void c() { - if (this.F()) { + if (this.G()) { this.damageEntity(DamageSource.DROWN, 1.0F); } @@ -161,7 +161,7 @@ public class EntityEnderman extends EntityMonster { } } - if (this.F() || this.isBurning()) { + if (this.G() || this.isBurning()) { this.target = null; this.a(false); this.bv = false; @@ -290,11 +290,11 @@ public class EntityEnderman extends EntityMonster { return this.bX() ? "mob.endermen.scream" : "mob.endermen.idle"; } - protected String aN() { + protected String aO() { return "mob.endermen.hit"; } - protected String aO() { + protected String aP() { return "mob.endermen.death"; } diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java index 5247d5ad..fab2b647 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -114,7 +114,7 @@ public class EntityExperienceOrb extends Entity { } } - public boolean H() { + public boolean I() { return this.world.a(this.boundingBox, Material.WATER, (Entity) this); } @@ -126,7 +126,7 @@ public class EntityExperienceOrb extends Entity { if (this.isInvulnerable()) { return false; } else { - this.J(); + this.K(); this.d = (int) ((float) this.d - f); if (this.d <= 0) { this.die(); @@ -187,7 +187,7 @@ public class EntityExperienceOrb extends Entity { return i >= 2477 ? 2477 : (i >= 1237 ? 1237 : (i >= 617 ? 617 : (i >= 307 ? 307 : (i >= 149 ? 149 : (i >= 73 ? 73 : (i >= 37 ? 37 : (i >= 17 ? 17 : (i >= 7 ? 7 : (i >= 3 ? 3 : 1))))))))); } - public boolean ap() { + public boolean aq() { return false; } } diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java index daa376c3..b552421b 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -56,7 +56,7 @@ public class EntityFallingBlock extends Entity { protected void a() {} - public boolean K() { + public boolean L() { return !this.dead; } diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java index 3bb90f3d..23510bff 100644 --- a/src/main/java/net/minecraft/server/EntityFireball.java +++ b/src/main/java/net/minecraft/server/EntityFireball.java @@ -15,7 +15,7 @@ public abstract class EntityFireball extends Entity { public double dirX; public double dirY; public double dirZ; - public float yield = 1; // CraftBukkit + public float bukkitYield = 1; // CraftBukkit public boolean isIncendiary = true; // CraftBukkit public EntityFireball(World world) { @@ -106,7 +106,7 @@ public abstract class EntityFireball extends Entity { for (int j = 0; j < list.size(); ++j) { Entity entity1 = (Entity) list.get(j); - if (entity1.K() && (!entity1.h(this.shooter) || this.au >= 25)) { + if (entity1.L() && (!entity1.h(this.shooter) || this.au >= 25)) { float f = 0.3F; AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f); MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); @@ -163,7 +163,7 @@ public abstract class EntityFireball extends Entity { this.yaw = this.lastYaw + (this.yaw - this.lastYaw) * 0.2F; float f2 = this.c(); - if (this.G()) { + if (this.H()) { for (int k = 0; k < 4; ++k) { float f3 = 0.25F; @@ -219,11 +219,11 @@ public abstract class EntityFireball extends Entity { } } - public boolean K() { + public boolean L() { return true; } - public float Y() { + public float Z() { return 1.0F; } @@ -231,9 +231,9 @@ public abstract class EntityFireball extends Entity { if (this.isInvulnerable()) { return false; } else { - this.J(); + this.K(); if (damagesource.getEntity() != null) { - Vec3D vec3d = damagesource.getEntity().Z(); + Vec3D vec3d = damagesource.getEntity().aa(); if (vec3d != null) { this.motX = vec3d.c; diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java index ebf38f28..dc35ae5c 100644 --- a/src/main/java/net/minecraft/server/EntityFireworks.java +++ b/src/main/java/net/minecraft/server/EntityFireworks.java @@ -115,7 +115,7 @@ public class EntityFireworks extends Entity { return super.d(f); } - public boolean ap() { + public boolean aq() { return false; } } diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java index 72aacea5..ee8fb09a 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -93,7 +93,7 @@ public class EntityFishingHook extends Entity { this.b(this.yaw, this.pitch); } else { if (!this.world.isStatic) { - ItemStack itemstack = this.owner.bx(); + ItemStack itemstack = this.owner.by(); if (this.owner.dead || !this.owner.isAlive() || itemstack == null || itemstack.getItem() != Item.FISHING_ROD || this.e(this.owner) > 1024.0D) { this.die(); @@ -158,7 +158,7 @@ public class EntityFishingHook extends Entity { for (int j = 0; j < list.size(); ++j) { Entity entity1 = (Entity) list.get(j); - if (entity1.K() && (entity1 != this.owner || this.j >= 5)) { + if (entity1.L() && (entity1 != this.owner || this.j >= 5)) { float f = 0.3F; AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f); MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java index 169d549f..a2c215e1 100644 --- a/src/main/java/net/minecraft/server/EntityGhast.java +++ b/src/main/java/net/minecraft/server/EntityGhast.java @@ -42,17 +42,17 @@ public class EntityGhast extends EntityFlying implements IMonster { this.datawatcher.a(16, Byte.valueOf((byte) 0)); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); } - protected void bk() { + protected void bl() { if (!this.world.isStatic && this.world.difficulty == 0) { this.die(); } - this.bo(); + this.u(); this.bo = this.bp; double d0 = this.i - this.locX; double d1 = this.j - this.locY; @@ -134,8 +134,8 @@ public class EntityGhast extends EntityFlying implements IMonster { this.world.a((EntityHuman) null, 1008, (int) this.locX, (int) this.locY, (int) this.locZ, 0); EntityLargeFireball entitylargefireball = new EntityLargeFireball(this.world, this, d5, d6, d7); - // CraftBukkit - set yield when setting explosionpower - entitylargefireball.yield = entitylargefireball.e = this.explosionPower; + // CraftBukkit - set bukkitYield when setting explosionpower + entitylargefireball.bukkitYield = entitylargefireball.yield = this.explosionPower; double d8 = 4.0D; Vec3D vec3d = this.j(1.0F); @@ -185,11 +185,11 @@ public class EntityGhast extends EntityFlying implements IMonster { return "mob.ghast.moan"; } - protected String aN() { + protected String aO() { return "mob.ghast.scream"; } - protected String aO() { + protected String aP() { return "mob.ghast.death"; } @@ -218,7 +218,7 @@ public class EntityGhast extends EntityFlying implements IMonster { // CraftBukkit end } - protected float aZ() { + protected float ba() { return 10.0F; } diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java index 7097a880..86c5302f 100644 --- a/src/main/java/net/minecraft/server/EntityHanging.java +++ b/src/main/java/net/minecraft/server/EntityHanging.java @@ -199,7 +199,7 @@ public abstract class EntityHanging extends Entity { } } - public boolean K() { + public boolean L() { return true; } @@ -239,7 +239,7 @@ public abstract class EntityHanging extends Entity { // CraftBukkit end this.die(); - this.J(); + this.K(); this.b(damagesource.getEntity()); } @@ -318,7 +318,7 @@ public abstract class EntityHanging extends Entity { public abstract int e(); - protected boolean O() { + protected boolean P() { return false; } diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java index bc7acb97..3195aaf2 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java @@ -55,7 +55,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { this.goalSelector.a(6, new PathfinderGoalRandomStroll(this, 0.7D)); this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F)); this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); - this.cH(); + this.loadChest(); } protected void a() { @@ -239,7 +239,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { } public int t(int i) { - int j = MathHelper.a(this.getTemper() + i, 0, this.cq()); + int j = MathHelper.a(this.getTemper() + i, 0, this.getMaxDomestication()); this.setTemper(j); return j; @@ -251,11 +251,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { return this.passenger != null && this.passenger.equals(entity) ? false : super.damageEntity(damagesource, f); } - public int aP() { + public int aQ() { return by[this.cf()]; } - public boolean L() { + public boolean M() { return this.passenger == null; } @@ -325,7 +325,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { return this.hasChest() /* && (i == 1 || i == 2) */ ? 17 : 2; // CraftBukkit - Remove type check } - public void cH() { // CraftBukkit - private -> public + public void loadChest() { // CraftBukkit - private -> public InventoryHorseChest inventoryhorsechest = this.inventoryChest; this.inventoryChest = new InventoryHorseChest("HorseChest", this.cG(), this); // CraftBukkit - add this horse @@ -402,7 +402,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { return this.getAttributeInstance(attributeJumpStrength).getValue(); } - protected String aO() { + protected String aP() { this.cM(); int i = this.getType(); @@ -416,7 +416,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { return i == 4 ? Item.BONE.id : (i == 3 ? (flag ? 0 : Item.ROTTEN_FLESH.id) : Item.LEATHER.id); } - protected String aN() { + protected String aO() { this.cM(); if (this.random.nextInt(3) == 0) { this.cO(); @@ -433,7 +433,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { protected String r() { this.cM(); - if (this.random.nextInt(10) == 0 && !this.bb()) { + if (this.random.nextInt(10) == 0 && !this.bc()) { this.cO(); } @@ -478,9 +478,9 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { } } - protected void ay() { - super.ay(); - this.aW().b(attributeJumpStrength); + protected void az() { + super.az(); + this.aX().b(attributeJumpStrength); this.getAttributeInstance(GenericAttributes.a).setValue(53.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.22499999403953552D); } @@ -489,11 +489,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { return 6; } - public int cq() { + public int getMaxDomestication() { return this.maxDomestication; // CraftBukkit - return stored max domestication instead of 100 } - protected float aZ() { + protected float ba() { return 0.8F; } @@ -602,7 +602,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { flag = true; } - if (b1 > 0 && (flag || !this.isTame()) && b1 < this.cq()) { + if (b1 > 0 && (flag || !this.isTame()) && b1 < this.getMaxDomestication()) { flag = true; this.t(b1); } @@ -625,7 +625,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { this.setHasChest(true); this.makeSound("mob.chickenplop", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); flag = true; - this.cH(); + this.loadChest(); } if (!flag && this.ca() && !this.co() && itemstack.id == Item.SADDLE.id) { @@ -675,7 +675,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { return i == 2 || i == 1; } - protected boolean bb() { + protected boolean bc() { return this.passenger != null && this.co() ? true : this.cg() || this.ch(); } @@ -845,7 +845,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { String s = this.cp(); if (s != null) { - this.makeSound(s, this.aZ(), this.ba()); + this.makeSound(s, this.ba(), this.bb()); } } @@ -911,7 +911,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { } this.Y = 1.0F; - this.aR = this.bf() * 0.1F; + this.aR = this.bg() * 0.1F; if (!this.world.isStatic) { this.i((float) this.getAttributeInstance(GenericAttributes.d).getValue()); super.e(f, f1); @@ -997,7 +997,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { this.maxDomestication = nbttagcompound.getInt("Bukkit.MaxDomestication"); } // CraftBukkit end - AttributeInstance attributeinstance = this.aW().a("Speed"); + AttributeInstance attributeinstance = this.aX().a("Speed"); if (attributeinstance != null) { this.getAttributeInstance(GenericAttributes.d).setValue(attributeinstance.b() * 0.25D); @@ -1006,7 +1006,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { if (this.hasChest()) { NBTTagList nbttaglist = nbttagcompound.getList("Items"); - this.cH(); + this.loadChest(); for (int i = 0; i < nbttaglist.size(); ++i) { NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.get(i); @@ -1160,7 +1160,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { return (GroupDataEntity) object; } - protected boolean be() { + protected boolean bf() { return true; } @@ -1188,15 +1188,15 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { } } - public void V() { - super.V(); + public void W() { + super.W(); if (this.bM > 0.0F) { float f = MathHelper.sin(this.aN * 3.1415927F / 180.0F); float f1 = MathHelper.cos(this.aN * 3.1415927F / 180.0F); float f2 = 0.7F * this.bM; float f3 = 0.15F * this.bM; - this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.X() + this.passenger.W() + (double) f3, this.locZ - (double) (f2 * f1)); + this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.Y() + this.passenger.X() + (double) f3, this.locZ - (double) (f2 * f1)); if (this.passenger instanceof EntityLiving) { ((EntityLiving) this.passenger).aN = this.aN; } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java index e1a3ca11..e4fe7703 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -77,9 +77,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen this.maxFireTicks = 20; } - protected void ay() { - super.ay(); - this.aW().b(GenericAttributes.e).setValue(1.0D); + protected void az() { + super.az(); + this.aX().b(GenericAttributes.e).setValue(1.0D); } protected void a() { @@ -89,19 +89,19 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen this.datawatcher.a(18, Integer.valueOf(0)); } - public boolean bq() { + public boolean br() { return this.f != null; } - public void bs() { + public void bt() { if (this.f != null) { this.f.b(this.world, this, this.g); } - this.bt(); + this.bu(); } - public void bt() { + public void bu() { this.f = null; this.g = 0; if (!this.world.isStatic) { @@ -110,7 +110,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } public boolean isBlocking() { - return this.bq() && Item.byId[this.f.id].c_(this.f) == EnumAnimation.BLOCK; + return this.br() && Item.byId[this.f.id].c_(this.f) == EnumAnimation.BLOCK; } public void l_() { @@ -126,7 +126,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen this.n(); } } else { - this.bt(); + this.bu(); } } @@ -209,11 +209,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } } - public int y() { + public int z() { return this.abilities.isInvulnerable ? 0 : 80; } - public int ab() { + public int ac() { return 10; } @@ -283,11 +283,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } } - this.bt(); + this.bu(); } } - protected boolean bb() { + protected boolean bc() { return this.getHealth() <= 0.0F || this.isSleeping(); } @@ -328,7 +328,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } } - public void U() { + public void V() { if (!this.world.isStatic && this.isSneaking()) { this.mount((Entity) null); this.setSneaking(false); @@ -339,7 +339,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen float f = this.yaw; float f1 = this.pitch; - super.U(); + super.V(); this.bs = this.bt; this.bt = 0.0F; this.k(this.locX - d0, this.locY - d1, this.locZ - d2); @@ -351,9 +351,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } } - protected void bk() { - super.bk(); - this.aV(); + protected void bl() { + super.bl(); + this.aW(); } public void c() { @@ -747,11 +747,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen this.inventory.a(f); } - public int aP() { + public int aQ() { return this.inventory.l(); } - public float bw() { + public float bx() { int i = 0; ItemStack[] aitemstack = this.inventory.armor; int j = aitemstack.length; @@ -777,14 +777,14 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen f = this.c(damagesource, f); float f1 = f; - f = Math.max(f - this.bm(), 0.0F); - this.m(this.bm() - (f1 - f)); + f = Math.max(f - this.bn(), 0.0F); + this.m(this.bn() - (f1 - f)); if (f != 0.0F) { this.a(damagesource.f()); float f2 = this.getHealth(); this.setHealth(this.getHealth() - f); - this.aQ().a(damagesource, f2, f); + this.aR().a(damagesource, f2, f); } } } @@ -804,7 +804,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen public void c(ItemStack itemstack) {} public boolean p(Entity entity) { - ItemStack itemstack = this.bx(); + ItemStack itemstack = this.by(); ItemStack itemstack1 = itemstack != null ? itemstack.cloneItemStack() : null; if (!entity.c(this)) { @@ -816,7 +816,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen if (itemstack.a(this, (EntityLiving) entity)) { // CraftBukkit - bypass infinite items; <= 0 -> == 0 if (itemstack.count == 0 && !this.abilities.canInstantlyBuild) { - this.by(); + this.bz(); } return true; @@ -825,9 +825,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen return false; } else { - if (itemstack != null && itemstack == this.bx()) { + if (itemstack != null && itemstack == this.by()) { if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) { - this.by(); + this.bz(); } else if (itemstack.count < itemstack1.count && this.abilities.canInstantlyBuild) { itemstack.count = itemstack1.count; } @@ -837,20 +837,20 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } } - public ItemStack bx() { + public ItemStack by() { return this.inventory.getItemInHand(); } - public void by() { + public void bz() { this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null); } - public double W() { + public double X() { return (double) (this.height - 0.5F); } public void attack(Entity entity) { - if (entity.ap()) { + if (entity.aq()) { if (!entity.i(this)) { float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue(); int i = 0; @@ -866,7 +866,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } if (f > 0.0F || f1 > 0.0F) { - boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.e() && !this.G() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving; + boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.e() && !this.H() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving; if (flag && f > 0.0F) { f *= 1.5F; @@ -918,7 +918,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } } - ItemStack itemstack = this.bx(); + ItemStack itemstack = this.by(); Object object = entity; if (entity instanceof EntityComplexPart) { @@ -933,7 +933,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen itemstack.a((EntityLiving) object, this); // CraftBukkit - bypass infinite items; <= 0 -> == 0 if (itemstack.count == 0) { - this.by(); + this.bz(); } } @@ -1002,7 +1002,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } } - if (this.af()) { + if (this.ag()) { this.mount((Entity) null); } @@ -1202,8 +1202,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen public void a(Statistic statistic, int i) {} - protected void bd() { - super.bd(); + protected void be() { + super.be(); this.a(StatisticList.u, 1); if (this.isSprinting()) { this.a(0.8F); @@ -1232,7 +1232,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen this.checkMovement(this.locX - d0, this.locY - d1, this.locZ - d2); } - public float bf() { + public float bg() { return (float) this.getAttributeInstance(GenericAttributes.d).getValue(); } @@ -1246,7 +1246,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen this.a(StatisticList.q, i); this.a(0.015F * (float) i * 0.01F); } - } else if (this.G()) { + } else if (this.H()) { i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F); if (i > 0) { this.a(StatisticList.m, i); @@ -1312,9 +1312,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen } } - public void al() { + public void am() { if (!this.abilities.isFlying) { - super.al(); + super.am(); } } @@ -1374,7 +1374,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen return (flag || this.foodData.c()) && !this.abilities.isInvulnerable; } - public boolean bI() { + public boolean bJ() { return this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth(); } @@ -1401,8 +1401,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen return true; } - if (this.bx() != null) { - ItemStack itemstack = this.bx(); + if (this.by() != null) { + ItemStack itemstack = this.by(); if (itemstack.b(block) || itemstack.a(block) > 1.0F) { return true; @@ -1481,7 +1481,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen return i == 0 ? this.inventory.getItemInHand() : this.inventory.armor[i - 1]; } - public ItemStack aY() { + public ItemStack aZ() { return this.inventory.getItemInHand(); } @@ -1493,7 +1493,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen return this.inventory.armor; } - public boolean aw() { + public boolean ax() { return !this.abilities.isFlying; } @@ -1518,7 +1518,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen this.getDataWatcher().watch(17, Float.valueOf(f)); } - public float bm() { + public float bn() { return this.getDataWatcher().getFloat(17); } } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java index b590c370..90d46f74 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -50,9 +50,9 @@ public abstract class EntityInsentient extends EntityLiving { } } - protected void ay() { - super.ay(); - this.aW().b(GenericAttributes.b).setValue(16.0D); + protected void az() { + super.az(); + this.aX().b(GenericAttributes.b).setValue(16.0D); } public ControllerLook getControllerLook() { @@ -103,12 +103,12 @@ public abstract class EntityInsentient extends EntityLiving { String s = this.r(); if (s != null) { - this.makeSound(s, this.aZ(), this.ba()); + this.makeSound(s, this.ba(), this.bb()); } } - public void x() { - super.x(); + public void y() { + super.y(); this.world.methodProfiler.a("mobBaseTick"); if (this.isAlive() && this.random.nextInt(1000) < this.a_++) { this.a_ = -this.o(); @@ -154,7 +154,7 @@ public abstract class EntityInsentient extends EntityLiving { } protected float f(float f, float f1) { - if (this.be()) { + if (this.bf()) { this.bn.a(); return f1; } else { @@ -371,7 +371,7 @@ public abstract class EntityInsentient extends EntityLiving { this.world.methodProfiler.b(); } - protected boolean be() { + protected boolean bf() { return false; } @@ -379,7 +379,7 @@ public abstract class EntityInsentient extends EntityLiving { return true; } - protected void bo() { + protected void u() { if (this.persistent) { this.aV = 0; } else { @@ -404,10 +404,10 @@ public abstract class EntityInsentient extends EntityLiving { } } - protected void bh() { + protected void bi() { ++this.aV; this.world.methodProfiler.a("checkDespawn"); - this.bo(); + this.u(); this.world.methodProfiler.b(); this.world.methodProfiler.a("sensing"); this.bq.a(); @@ -422,7 +422,7 @@ public abstract class EntityInsentient extends EntityLiving { this.navigation.f(); this.world.methodProfiler.b(); this.world.methodProfiler.a("mob tick"); - this.bj(); + this.bk(); this.world.methodProfiler.b(); this.world.methodProfiler.a("controls"); this.world.methodProfiler.a("move"); @@ -435,11 +435,11 @@ public abstract class EntityInsentient extends EntityLiving { this.world.methodProfiler.b(); } - protected void bk() { - super.bk(); + protected void bl() { + super.bl(); this.be = 0.0F; this.bf = 0.0F; - this.bo(); + this.u(); float f = 8.0F; if (this.random.nextFloat() < 0.02F) { @@ -467,8 +467,8 @@ public abstract class EntityInsentient extends EntityLiving { this.pitch = this.f; } - boolean flag = this.G(); - boolean flag1 = this.I(); + boolean flag = this.H(); + boolean flag1 = this.J(); if (flag || flag1) { this.bd = this.random.nextFloat() < 0.8F; @@ -522,7 +522,7 @@ public abstract class EntityInsentient extends EntityLiving { return 4; } - public int ar() { + public int as() { if (this.getGoalTarget() == null) { return 3; } else { @@ -537,7 +537,7 @@ public abstract class EntityInsentient extends EntityLiving { } } - public ItemStack aY() { + public ItemStack aZ() { return this.equipment[0]; } @@ -704,8 +704,8 @@ public abstract class EntityInsentient extends EntityLiving { protected void bx() { float f = this.world.b(this.locX, this.locY, this.locZ); - if (this.aY() != null && this.random.nextFloat() < 0.25F * f) { - EnchantmentManager.a(this.random, this.aY(), (int) (5.0F + f * (float) this.random.nextInt(18))); + if (this.aZ() != null && this.random.nextFloat() < 0.25F * f) { + EnchantmentManager.a(this.random, this.aZ(), (int) (5.0F + f * (float) this.random.nextInt(18))); } for (int i = 0; i < 4; ++i) { @@ -771,14 +771,14 @@ public abstract class EntityInsentient extends EntityLiving { } public final boolean c(EntityHuman entityhuman) { - if (this.bH() && this.bI() == entityhuman) { + if (this.bH() && this.getLeashHolder() == entityhuman) { // CraftBukkit start if (CraftEventFactory.callPlayerUnleashEntityEvent(this, entityhuman).isCancelled()) { - ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, this, this.bI())); + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, this, this.getLeashHolder())); return false; } // CraftBukkit end - this.a(true, !entityhuman.abilities.canInstantlyBuild); + this.unleash(true, !entityhuman.abilities.canInstantlyBuild); return true; } else { ItemStack itemstack = entityhuman.inventory.getItemInHand(); @@ -787,11 +787,11 @@ public abstract class EntityInsentient extends EntityLiving { if (!(this instanceof EntityTameableAnimal) || !((EntityTameableAnimal) this).isTamed()) { // CraftBukkit start if (CraftEventFactory.callPlayerLeashEntityEvent(this, entityhuman, entityhuman).isCancelled()) { - ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, this, this.bI())); + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, this, this.getLeashHolder())); return false; } // CraftBukkit end - this.b(entityhuman, true); + this.setLeashHolder(entityhuman, true); --itemstack.count; return true; } @@ -799,11 +799,11 @@ public abstract class EntityInsentient extends EntityLiving { if (entityhuman.getName().equalsIgnoreCase(((EntityTameableAnimal) this).getOwnerName())) { // CraftBukkit start if (CraftEventFactory.callPlayerLeashEntityEvent(this, entityhuman, entityhuman).isCancelled()) { - ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, this, this.bI())); + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, this, this.getLeashHolder())); return false; } // CraftBukkit end - this.b(entityhuman, true); + this.setLeashHolder(entityhuman, true); --itemstack.count; return true; } @@ -825,12 +825,12 @@ public abstract class EntityInsentient extends EntityLiving { if (this.bv) { if (this.bw == null || this.bw.dead) { this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.HOLDER_GONE)); // CraftBukkit - this.a(true, true); + this.unleash(true, true); } } } - public void a(boolean flag, boolean flag1) { + public void unleash(boolean flag, boolean flag1) { if (this.bv) { this.bv = false; this.bw = null; @@ -852,11 +852,11 @@ public abstract class EntityInsentient extends EntityLiving { return this.bv; } - public Entity bI() { + public Entity getLeashHolder() { return this.bw; } - public void b(Entity entity, boolean flag) { + public void setLeashHolder(Entity entity, boolean flag) { this.bv = true; this.bw = entity; if (!this.world.isStatic && flag && this.world instanceof WorldServer) { @@ -892,7 +892,7 @@ public abstract class EntityInsentient extends EntityLiving { this.bw = entityleash; } else { this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit - this.a(false, true); + this.unleash(false, true); } } diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java index fb4f9356..9247f1bb 100644 --- a/src/main/java/net/minecraft/server/EntityIronGolem.java +++ b/src/main/java/net/minecraft/server/EntityIronGolem.java @@ -31,11 +31,11 @@ public class EntityIronGolem extends EntityGolem { this.datawatcher.a(16, Byte.valueOf((byte) 0)); } - public boolean be() { + public boolean bf() { return true; } - protected void bj() { + protected void bk() { if (--this.bq <= 0) { this.bq = 70 + this.random.nextInt(50); this.bp = this.world.villages.getClosestVillage(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ), 32); @@ -48,11 +48,11 @@ public class EntityIronGolem extends EntityGolem { } } - super.bj(); + super.bk(); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(100.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } @@ -62,7 +62,7 @@ public class EntityIronGolem extends EntityGolem { } protected void n(Entity entity) { - if (entity instanceof IMonster && this.aC().nextInt(20) == 0) { + if (entity instanceof IMonster && this.aD().nextInt(20) == 0) { this.setGoalTarget((EntityLiving) entity); } @@ -92,12 +92,12 @@ public class EntityIronGolem extends EntityGolem { } public boolean a(Class oclass) { - return this.bW() && EntityHuman.class.isAssignableFrom(oclass) ? false : super.a(oclass); + return this.isPlayerCreated() && EntityHuman.class.isAssignableFrom(oclass) ? false : super.a(oclass); } public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); - nbttagcompound.setBoolean("PlayerCreated", this.bW()); + nbttagcompound.setBoolean("PlayerCreated", this.isPlayerCreated()); } public void a(NBTTagCompound nbttagcompound) { @@ -131,11 +131,11 @@ public class EntityIronGolem extends EntityGolem { return "none"; } - protected String aN() { + protected String aO() { return "mob.irongolem.hit"; } - protected String aO() { + protected String aP() { return "mob.irongolem.death"; } @@ -168,7 +168,7 @@ public class EntityIronGolem extends EntityGolem { return this.bs; } - public boolean bW() { + public boolean isPlayerCreated() { return (this.datawatcher.getByte(16) & 1) != 0; } @@ -183,7 +183,7 @@ public class EntityIronGolem extends EntityGolem { } public void die(DamageSource damagesource) { - if (!this.bW() && this.killer != null && this.bp != null) { + if (!this.isPlayerCreated() && this.killer != null && this.bp != null) { this.bp.a(this.killer.getName(), -5); } diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java index 8e1b0241..584102ed 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -157,7 +157,7 @@ public class EntityItem extends Entity { this.age = 4800; } - public boolean H() { + public boolean I() { return this.world.a(this.boundingBox, Material.WATER, (Entity) this); } @@ -171,7 +171,7 @@ public class EntityItem extends Entity { } else if (this.getItemStack() != null && this.getItemStack().id == Item.NETHER_STAR.id && damagesource.c()) { return false; } else { - this.J(); + this.K(); this.d = (int) ((float) this.d - f); if (this.d <= 0) { this.die(); @@ -266,7 +266,7 @@ public class EntityItem extends Entity { return LocaleI18n.get("item." + this.getItemStack().a()); } - public boolean ap() { + public boolean aq() { return false; } diff --git a/src/main/java/net/minecraft/server/EntityLargeFireball.java b/src/main/java/net/minecraft/server/EntityLargeFireball.java index 748acd81..df86311f 100644 --- a/src/main/java/net/minecraft/server/EntityLargeFireball.java +++ b/src/main/java/net/minecraft/server/EntityLargeFireball.java @@ -4,7 +4,7 @@ import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit public class EntityLargeFireball extends EntityFireball { - public int e = 1; + public int yield = 1; public EntityLargeFireball(World world) { super(world); @@ -36,14 +36,14 @@ public class EntityLargeFireball extends EntityFireball { public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); - nbttagcompound.setInt("ExplosionPower", this.e); + nbttagcompound.setInt("ExplosionPower", this.yield); } public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); if (nbttagcompound.hasKey("ExplosionPower")) { - // CraftBukkit - set yield when setting explosionpower - this.yield = this.e = nbttagcompound.getInt("ExplosionPower"); + // CraftBukkit - set bukkitYield when setting explosionpower + this.bukkitYield = this.yield = nbttagcompound.getInt("ExplosionPower"); } } } diff --git a/src/main/java/net/minecraft/server/EntityLeash.java b/src/main/java/net/minecraft/server/EntityLeash.java index da2632d5..a2687c2d 100644 --- a/src/main/java/net/minecraft/server/EntityLeash.java +++ b/src/main/java/net/minecraft/server/EntityLeash.java @@ -41,7 +41,7 @@ public class EntityLeash extends EntityHanging { public void a(NBTTagCompound nbttagcompound) {} public boolean c(EntityHuman entityhuman) { - ItemStack itemstack = entityhuman.aY(); + ItemStack itemstack = entityhuman.aZ(); boolean flag = false; double d0; List list; @@ -56,14 +56,14 @@ public class EntityLeash extends EntityHanging { while (iterator.hasNext()) { entityinsentient = (EntityInsentient) iterator.next(); - if (entityinsentient.bH() && entityinsentient.bI() == entityhuman) { + if (entityinsentient.bH() && entityinsentient.getLeashHolder() == entityhuman) { // CraftBukkit start if (CraftEventFactory.callPlayerLeashEntityEvent(entityinsentient, this, entityhuman).isCancelled()) { - ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, entityinsentient, entityinsentient.bI())); + ((EntityPlayer) entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, entityinsentient, entityinsentient.getLeashHolder())); continue; } // CraftBukkit end - entityinsentient.b(this, true); + entityinsentient.setLeashHolder(this, true); flag = true; } } @@ -83,13 +83,13 @@ public class EntityLeash extends EntityHanging { while (iterator.hasNext()) { entityinsentient = (EntityInsentient) iterator.next(); - if (entityinsentient.bH() && entityinsentient.bI() == this) { + if (entityinsentient.bH() && entityinsentient.getLeashHolder() == this) { // CraftBukkit start if (CraftEventFactory.callPlayerUnleashEntityEvent(entityinsentient, entityhuman).isCancelled()) { die = false; continue; } - entityinsentient.a(true, !entityhuman.abilities.canInstantlyBuild); // false -> survival mode boolean + entityinsentient.unleash(true, !entityhuman.abilities.canInstantlyBuild); // false -> survival mode boolean // CraftBukkit end } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index ea799195..16a16cf3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -81,7 +81,7 @@ public abstract class EntityLiving extends Entity { public EntityLiving(World world) { super(world); - this.ay(); + this.az(); // CraftBukkit - setHealth(getMaxHealth()) inlined and simplified to skip the instanceof check for EntityPlayer, as getBukkitEntity() is not initialized in constructor this.datawatcher.watch(6, (float) this.getAttributeInstance(GenericAttributes.a).getValue()); this.m = true; @@ -100,18 +100,18 @@ public abstract class EntityLiving extends Entity { this.datawatcher.a(6, Float.valueOf(1.0F)); } - protected void ay() { - this.aW().b(GenericAttributes.a); - this.aW().b(GenericAttributes.c); - this.aW().b(GenericAttributes.d); - if (!this.be()) { + protected void az() { + this.aX().b(GenericAttributes.a); + this.aX().b(GenericAttributes.c); + this.aX().b(GenericAttributes.d); + if (!this.bf()) { this.getAttributeInstance(GenericAttributes.d).setValue(0.10000000149011612D); } } protected void a(double d0, boolean flag) { - if (!this.G()) { - this.H(); + if (!this.H()) { + this.I(); } if (flag && this.fallDistance > 0.0F) { @@ -136,13 +136,13 @@ public abstract class EntityLiving extends Entity { super.a(d0, flag); } - public boolean az() { + public boolean aA() { return false; } - public void x() { + public void y() { this.aD = this.aE; - super.x(); + super.y(); this.world.methodProfiler.a("livingEntityBaseTick"); if (this.isAlive() && this.inBlock()) { this.damageEntity(DamageSource.STUCK, 1.0F); @@ -155,7 +155,7 @@ public abstract class EntityLiving extends Entity { boolean flag = this instanceof EntityHuman && ((EntityHuman) this).abilities.isInvulnerable; if (this.isAlive() && this.a(Material.WATER)) { - if (!this.az() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) { + if (!this.aA() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) { this.setAirTicks(this.h(this.getAirTicks())); if (this.getAirTicks() == -20) { this.setAirTicks(0); @@ -173,7 +173,7 @@ public abstract class EntityLiving extends Entity { } this.extinguish(); - if (!this.world.isStatic && this.af() && this.vehicle instanceof EntityLiving) { + if (!this.world.isStatic && this.ag() && this.vehicle instanceof EntityLiving) { this.mount((Entity) null); } } else { @@ -193,12 +193,13 @@ public abstract class EntityLiving extends Entity { --this.hurtTicks; } - if (this.noDamageTicks > 0) { + // CraftBukkit + if (this.noDamageTicks > 0 && !(this instanceof EntityPlayer)) { --this.noDamageTicks; } if (this.getHealth() <= 0.0F) { - this.aA(); + this.aB(); } if (this.lastDamageByPlayerTime > 0) { @@ -215,7 +216,7 @@ public abstract class EntityLiving extends Entity { this.b((EntityLiving) null); } - this.aI(); + this.aJ(); this.aZ = this.aY; this.aO = this.aN; this.aQ = this.aP; @@ -240,7 +241,7 @@ public abstract class EntityLiving extends Entity { return false; } - protected void aA() { + protected void aB() { ++this.deathTicks; if (this.deathTicks >= 20 && !this.dead) { // CraftBukkit - (this.deathTicks == 20) -> (this.deathTicks >= 20 && !this.dead) int i; @@ -282,7 +283,7 @@ public abstract class EntityLiving extends Entity { return false; } - public Random aC() { + public Random aD() { return this.random; } @@ -290,7 +291,7 @@ public abstract class EntityLiving extends Entity { return this.lastDamager; } - public int aE() { + public int aF() { return this.j; } @@ -299,11 +300,11 @@ public abstract class EntityLiving extends Entity { this.j = this.ticksLived; } - public EntityLiving aF() { + public EntityLiving aG() { return this.bn; } - public int aG() { + public int aH() { return this.bo; } @@ -317,7 +318,7 @@ public abstract class EntityLiving extends Entity { this.bo = this.ticksLived; } - public int aH() { + public int aI() { return this.aV; } @@ -327,7 +328,7 @@ public abstract class EntityLiving extends Entity { nbttagcompound.setShort("HurtTime", (short) this.hurtTicks); nbttagcompound.setShort("DeathTime", (short) this.deathTicks); nbttagcompound.setShort("AttackTime", (short) this.attackTicks); - nbttagcompound.setFloat("AbsorptionAmount", this.bm()); + nbttagcompound.setFloat("AbsorptionAmount", this.bn()); ItemStack[] aitemstack = this.getEquipment(); int i = aitemstack.length; @@ -341,7 +342,7 @@ public abstract class EntityLiving extends Entity { } } - nbttagcompound.set("Attributes", GenericAttributes.a(this.aW())); + nbttagcompound.set("Attributes", GenericAttributes.a(this.aX())); aitemstack = this.getEquipment(); i = aitemstack.length; @@ -369,7 +370,7 @@ public abstract class EntityLiving extends Entity { public void a(NBTTagCompound nbttagcompound) { this.m(nbttagcompound.getFloat("AbsorptionAmount")); if (nbttagcompound.hasKey("Attributes") && this.world != null && !this.world.isStatic) { - GenericAttributes.a(this.aW(), nbttagcompound.getList("Attributes"), this.world == null ? null : this.world.getLogger()); + GenericAttributes.a(this.aX(), nbttagcompound.getList("Attributes"), this.world == null ? null : this.world.getLogger()); } if (nbttagcompound.hasKey("ActiveEffects")) { @@ -413,7 +414,7 @@ public abstract class EntityLiving extends Entity { this.attackTicks = nbttagcompound.getShort("AttackTime"); } - protected void aI() { + protected void aJ() { Iterator iterator = this.effects.keySet().iterator(); while (iterator.hasNext()) { @@ -475,7 +476,7 @@ public abstract class EntityLiving extends Entity { } } - public void aJ() { + public void aK() { Iterator iterator = this.effects.keySet().iterator(); while (iterator.hasNext()) { @@ -531,7 +532,7 @@ public abstract class EntityLiving extends Entity { return true; } - public boolean aL() { + public boolean aM() { return this.getMonsterType() == EnumMonsterType.UNDEAD; } @@ -546,22 +547,22 @@ public abstract class EntityLiving extends Entity { protected void a(MobEffect mobeffect) { this.updateEffects = true; if (!this.world.isStatic) { - MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aW(), mobeffect.getAmplifier()); + MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aX(), mobeffect.getAmplifier()); } } protected void a(MobEffect mobeffect, boolean flag) { this.updateEffects = true; if (flag && !this.world.isStatic) { - MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aW(), mobeffect.getAmplifier()); - MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aW(), mobeffect.getAmplifier()); + MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aX(), mobeffect.getAmplifier()); + MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aX(), mobeffect.getAmplifier()); } } protected void b(MobEffect mobeffect) { this.updateEffects = true; if (!this.world.isStatic) { - MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aW(), mobeffect.getAmplifier()); + MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aX(), mobeffect.getAmplifier()); } } @@ -682,7 +683,7 @@ public abstract class EntityLiving extends Entity { if (flag) { this.world.broadcastEntityEffect(this, (byte) 2); if (damagesource != DamageSource.DROWN) { - this.J(); + this.K(); } if (entity != null) { @@ -703,12 +704,12 @@ public abstract class EntityLiving extends Entity { if (this.getHealth() <= 0.0F) { if (flag) { - this.makeSound(this.aO(), this.aZ(), this.ba()); + this.makeSound(this.aP(), this.ba(), this.bb()); } this.die(damagesource); } else if (flag) { - this.makeSound(this.aN(), this.aZ(), this.ba()); + this.makeSound(this.aO(), this.ba(), this.bb()); } return true; @@ -735,7 +736,7 @@ public abstract class EntityLiving extends Entity { public void die(DamageSource damagesource) { Entity entity = damagesource.getEntity(); - EntityLiving entityliving = this.aR(); + EntityLiving entityliving = this.aS(); if (this.bb >= 0 && entityliving != null) { entityliving.b(this, this.bb); @@ -791,11 +792,11 @@ public abstract class EntityLiving extends Entity { } } - protected String aN() { + protected String aO() { return "damage.hit"; } - protected String aO() { + protected String aP() { return "damage.hit"; } @@ -858,7 +859,7 @@ public abstract class EntityLiving extends Entity { } } - public int aP() { + public int aQ() { int i = 0; ItemStack[] aitemstack = this.getEquipment(); int j = aitemstack.length; @@ -880,7 +881,7 @@ public abstract class EntityLiving extends Entity { protected float b(DamageSource damagesource, float f) { if (!damagesource.ignoresArmor()) { - int i = 25 - this.aP(); + int i = 25 - this.aQ(); float f1 = f * (float) i; this.h(f); @@ -930,23 +931,23 @@ public abstract class EntityLiving extends Entity { f = this.c(damagesource, f); float f1 = f; - f = Math.max(f - this.bm(), 0.0F); - this.m(this.bm() - (f1 - f)); + f = Math.max(f - this.bn(), 0.0F); + this.m(this.bn() - (f1 - f)); if (f != 0.0F) { float f2 = this.getHealth(); this.setHealth(f2 - f); - this.aQ().a(damagesource, f2, f); - this.m(this.bm() - f); + this.aR().a(damagesource, f2, f); + this.m(this.bn() - f); } } } - public CombatTracker aQ() { + public CombatTracker aR() { return this.combatTracker; } - public EntityLiving aR() { + public EntityLiving aS() { return (EntityLiving) (this.combatTracker.c() != null ? this.combatTracker.c() : (this.killer != null ? this.killer : (this.lastDamager != null ? this.lastDamager : null))); } @@ -954,7 +955,7 @@ public abstract class EntityLiving extends Entity { return (float) this.getAttributeInstance(GenericAttributes.a).getValue(); } - public final int aT() { + public final int aU() { return this.datawatcher.getByte(9); } @@ -966,7 +967,7 @@ public abstract class EntityLiving extends Entity { return this.hasEffect(MobEffectList.FASTER_DIG) ? 6 - (1 + this.getEffect(MobEffectList.FASTER_DIG).getAmplifier()) * 1 : (this.hasEffect(MobEffectList.SLOWER_DIG) ? 6 + (1 + this.getEffect(MobEffectList.SLOWER_DIG).getAmplifier()) * 2 : 6); } - public void aU() { + public void aV() { if (!this.au || this.av >= this.h() / 2 || this.av < 0) { this.av = -1; this.au = true; @@ -976,11 +977,11 @@ public abstract class EntityLiving extends Entity { } } - protected void B() { + protected void C() { this.damageEntity(DamageSource.OUT_OF_WORLD, 4.0F); } - protected void aV() { + protected void aW() { int i = this.h(); if (this.au) { @@ -997,10 +998,10 @@ public abstract class EntityLiving extends Entity { } public AttributeInstance getAttributeInstance(IAttribute iattribute) { - return this.aW().a(iattribute); + return this.aX().a(iattribute); } - public AttributeMapBase aW() { + public AttributeMapBase aX() { if (this.d == null) { this.d = new AttributeMapServer(); } @@ -1012,7 +1013,7 @@ public abstract class EntityLiving extends Entity { return EnumMonsterType.UNDEFINED; } - public abstract ItemStack aY(); + public abstract ItemStack aZ(); public abstract ItemStack getEquipment(int i); @@ -1033,15 +1034,15 @@ public abstract class EntityLiving extends Entity { public abstract ItemStack[] getEquipment(); - protected float aZ() { + protected float ba() { return 1.0F; } - protected float ba() { + protected float bb() { return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } - protected boolean bb() { + protected boolean bc() { return this.getHealth() <= 0.0F; } @@ -1080,7 +1081,7 @@ public abstract class EntityLiving extends Entity { this.enderTeleportTo(d0, d1, d2); } - protected void bd() { + protected void be() { this.motY = 0.41999998688697815D; if (this.hasEffect(MobEffectList.JUMP)) { this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F); @@ -1099,9 +1100,9 @@ public abstract class EntityLiving extends Entity { public void e(float f, float f1) { double d0; - if (this.G() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) { + if (this.H() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) { d0 = this.locY; - this.a(f, f1, this.be() ? 0.04F : 0.02F); + this.a(f, f1, this.bf() ? 0.04F : 0.02F); this.move(this.motX, this.motY, this.motZ); this.motX *= 0.800000011920929D; this.motY *= 0.800000011920929D; @@ -1110,7 +1111,7 @@ public abstract class EntityLiving extends Entity { if (this.positionChanged && this.c(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) { this.motY = 0.30000001192092896D; } - } else if (this.I() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) { + } else if (this.J() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) { d0 = this.locY; this.a(f, f1, 0.02F); this.move(this.motX, this.motY, this.motZ); @@ -1137,7 +1138,7 @@ public abstract class EntityLiving extends Entity { float f4; if (this.onGround) { - f4 = this.bf() * f3; + f4 = this.bg() * f3; } else { f4 = this.aR; } @@ -1217,12 +1218,12 @@ public abstract class EntityLiving extends Entity { this.aH += this.aG; } - protected boolean be() { + protected boolean bf() { return false; } - public float bf() { - return this.be() ? this.bp : 0.1F; + public float bg() { + return this.bf() ? this.bp : 0.1F; } public void i(float f) { @@ -1241,7 +1242,7 @@ public abstract class EntityLiving extends Entity { public void l_() { super.l_(); if (!this.world.isStatic) { - int i = this.aT(); + int i = this.aU(); if (i > 0) { if (this.aw <= 0) { @@ -1383,7 +1384,7 @@ public abstract class EntityLiving extends Entity { --this.bh; this.setPosition(d0, d1, d2); this.b(this.yaw, this.pitch); - } else if (!this.bl()) { + } else if (!this.bm()) { this.motX *= 0.98D; this.motY *= 0.98D; this.motZ *= 0.98D; @@ -1402,19 +1403,19 @@ public abstract class EntityLiving extends Entity { } this.world.methodProfiler.a("ai"); - if (this.bb()) { + if (this.bc()) { this.bd = false; this.be = 0.0F; this.bf = 0.0F; this.bg = 0.0F; - } else if (this.bl()) { - if (this.be()) { + } else if (this.bm()) { + if (this.bf()) { this.world.methodProfiler.a("newAi"); - this.bh(); + this.bi(); this.world.methodProfiler.b(); } else { this.world.methodProfiler.a("oldAi"); - this.bk(); + this.bl(); this.world.methodProfiler.b(); this.aP = this.yaw; } @@ -1423,9 +1424,9 @@ public abstract class EntityLiving extends Entity { this.world.methodProfiler.b(); this.world.methodProfiler.a("jump"); if (this.bd) { - if (!this.G() && !this.I()) { + if (!this.H() && !this.J()) { if (this.onGround && this.bq == 0) { - this.bd(); + this.be(); this.bq = 10; } } else { @@ -1444,15 +1445,15 @@ public abstract class EntityLiving extends Entity { this.world.methodProfiler.b(); this.world.methodProfiler.a("push"); if (!this.world.isStatic) { - this.bi(); + this.bj(); } this.world.methodProfiler.b(); } - protected void bh() {} + protected void bi() {} - protected void bi() { + protected void bj() { List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D)); if (list != null && !list.isEmpty()) { @@ -1466,7 +1467,7 @@ public abstract class EntityLiving extends Entity { } // CraftBukkit end - if (entity.L()) { + if (entity.M()) { this.n(entity); } } @@ -1477,16 +1478,16 @@ public abstract class EntityLiving extends Entity { entity.collide(this); } - public void U() { - super.U(); + public void V() { + super.V(); this.aW = this.aX; this.aX = 0.0F; this.fallDistance = 0.0F; } - protected void bj() {} + protected void bk() {} - protected void bk() { + protected void bl() { ++this.aV; } @@ -1516,7 +1517,7 @@ public abstract class EntityLiving extends Entity { return this.world.a(this.world.getVec3DPool().create(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ), this.world.getVec3DPool().create(entity.locX, entity.locY + (double) entity.getHeadHeight(), entity.locZ)) == null; } - public Vec3D Z() { + public Vec3D aa() { return this.j(1.0F); } @@ -1544,15 +1545,15 @@ public abstract class EntityLiving extends Entity { } } - public boolean bl() { + public boolean bm() { return !this.world.isStatic; } - public boolean K() { + public boolean L() { return !this.dead; } - public boolean L() { + public boolean M() { return !this.dead; } @@ -1560,7 +1561,7 @@ public abstract class EntityLiving extends Entity { return this.length * 0.85F; } - protected void J() { + protected void K() { this.velocityChanged = this.random.nextDouble() >= this.getAttributeInstance(GenericAttributes.c).getValue(); } @@ -1568,7 +1569,7 @@ public abstract class EntityLiving extends Entity { return this.aP; } - public float bm() { + public float bn() { return this.br; } diff --git a/src/main/java/net/minecraft/server/EntityMagmaCube.java b/src/main/java/net/minecraft/server/EntityMagmaCube.java index 018457e9..c2947b7a 100644 --- a/src/main/java/net/minecraft/server/EntityMagmaCube.java +++ b/src/main/java/net/minecraft/server/EntityMagmaCube.java @@ -7,8 +7,8 @@ public class EntityMagmaCube extends EntitySlime { this.fireProof = true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D); } @@ -16,7 +16,7 @@ public class EntityMagmaCube extends EntitySlime { return this.world.difficulty > 0 && this.world.b(this.boundingBox) && this.world.getCubes(this, this.boundingBox).isEmpty() && !this.world.containsLiquid(this.boundingBox); } - public int aP() { + public int aQ() { return this.getSize() * 3; } @@ -69,7 +69,7 @@ public class EntityMagmaCube extends EntitySlime { this.h *= 0.9F; } - protected void bd() { + protected void be() { this.motY = (double) (0.42F + (float) this.getSize() * 0.1F); this.an = true; } @@ -84,11 +84,11 @@ public class EntityMagmaCube extends EntitySlime { return super.bO() + 2; } - protected String aN() { + protected String aO() { return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); } - protected String aO() { + protected String aP() { return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); } @@ -96,7 +96,7 @@ public class EntityMagmaCube extends EntitySlime { return this.getSize() > 1 ? "mob.magmacube.big" : "mob.magmacube.small"; } - public boolean I() { + public boolean J() { return false; } diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java index 7c3af5b6..b8f10308 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java @@ -79,14 +79,14 @@ public abstract class EntityMinecartAbstract extends Entity { } public AxisAlignedBB g(Entity entity) { - return entity.L() ? entity.boundingBox : null; + return entity.M() ? entity.boundingBox : null; } - public AxisAlignedBB D() { + public AxisAlignedBB E() { return null; } - public boolean L() { + public boolean M() { return true; } @@ -103,7 +103,7 @@ public abstract class EntityMinecartAbstract extends Entity { this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit } - public double X() { + public double Y() { return (double) this.length * 0.0D - 0.30000001192092896D; } @@ -128,7 +128,7 @@ public abstract class EntityMinecartAbstract extends Entity { this.h(-this.k()); this.c(10); - this.J(); + this.K(); this.setDamage(this.getDamage() + f * 10.0F); boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild; @@ -172,7 +172,7 @@ public abstract class EntityMinecartAbstract extends Entity { this.a(itemstack, 0.0F); } - public boolean K() { + public boolean L() { return !this.dead; } @@ -205,7 +205,7 @@ public abstract class EntityMinecartAbstract extends Entity { } if (this.locY < -64.0D) { - this.B(); + this.C(); } int i; @@ -214,12 +214,12 @@ public abstract class EntityMinecartAbstract extends Entity { this.world.methodProfiler.a("portal"); MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer(); - i = this.y(); + i = this.z(); if (this.ap) { if (true || minecraftserver.getAllowNether()) { // CraftBukkit - multi-world should still allow teleport even if default vanilla nether disabled if (this.vehicle == null && this.aq++ >= i) { this.aq = i; - this.portalCooldown = this.ab(); + this.portalCooldown = this.ac(); byte b0; if (this.world.worldProvider.dimension == -1) { @@ -295,7 +295,7 @@ public abstract class EntityMinecartAbstract extends Entity { this.b(d4); } - this.C(); + this.D(); this.pitch = 0.0F; double d6 = this.lastX - this.locX; double d7 = this.lastZ - this.locZ; @@ -335,7 +335,7 @@ public abstract class EntityMinecartAbstract extends Entity { for (int j1 = 0; j1 < list.size(); ++j1) { Entity entity = (Entity) list.get(j1); - if (entity != this.passenger && entity.L() && entity instanceof EntityMinecartAbstract) { + if (entity != this.passenger && entity.M() && entity instanceof EntityMinecartAbstract) { entity.collide(this); } } diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java index c31426b6..ea7df627 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -10,7 +10,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { } public void c() { - this.aV(); + this.aW(); float f = this.d(1.0F); if (f > 0.5F) { @@ -136,8 +136,8 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { return this.world.difficulty > 0 && this.i_() && super.canSpawn(); } - protected void ay() { - super.ay(); - this.aW().b(GenericAttributes.e); + protected void az() { + super.az(); + this.aX().b(GenericAttributes.e); } } diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java index 069408db..14bc0dd8 100644 --- a/src/main/java/net/minecraft/server/EntityOcelot.java +++ b/src/main/java/net/minecraft/server/EntityOcelot.java @@ -27,7 +27,7 @@ public class EntityOcelot extends EntityTameableAnimal { this.datawatcher.a(18, Byte.valueOf((byte) 0)); } - public void bj() { + public void bk() { if (this.getControllerMove().a()) { double d0 = this.getControllerMove().b(); @@ -51,12 +51,12 @@ public class EntityOcelot extends EntityTameableAnimal { return !this.isTamed(); // CraftBukkit } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D); } @@ -77,15 +77,15 @@ public class EntityOcelot extends EntityTameableAnimal { return this.isTamed() ? (this.bY() ? "mob.cat.purr" : (this.random.nextInt(4) == 0 ? "mob.cat.purreow" : "mob.cat.meow")) : ""; } - protected String aN() { + protected String aO() { return "mob.cat.hitt"; } - protected String aO() { + protected String aP() { return "mob.cat.hitt"; } - protected float aZ() { + protected float ba() { return 0.4F; } diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java index d24623ca..1f0f4dd6 100644 --- a/src/main/java/net/minecraft/server/EntityPig.java +++ b/src/main/java/net/minecraft/server/EntityPig.java @@ -22,22 +22,22 @@ public class EntityPig extends EntityAnimal { this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } - protected void bh() { - super.bh(); + protected void bi() { + super.bi(); } public boolean by() { - ItemStack itemstack = ((EntityHuman) this.passenger).aY(); + ItemStack itemstack = ((EntityHuman) this.passenger).aZ(); return itemstack != null && itemstack.id == Item.CARROT_STICK.id; } @@ -61,11 +61,11 @@ public class EntityPig extends EntityAnimal { return "mob.pig.say"; } - protected String aN() { + protected String aO() { return "mob.pig.say"; } - protected String aO() { + protected String aP() { return "mob.pig.death"; } diff --git a/src/main/java/net/minecraft/server/EntityPigZombie.java b/src/main/java/net/minecraft/server/EntityPigZombie.java index 57b004f1..df4c3840 100644 --- a/src/main/java/net/minecraft/server/EntityPigZombie.java +++ b/src/main/java/net/minecraft/server/EntityPigZombie.java @@ -21,14 +21,14 @@ public class EntityPigZombie extends EntityZombie { this.fireProof = true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(bp).setValue(0.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.5D); this.getAttributeInstance(GenericAttributes.e).setValue(5.0D); } - protected boolean be() { + protected boolean bf() { return false; } @@ -44,7 +44,7 @@ public class EntityPigZombie extends EntityZombie { this.bu = this.target; if (this.soundDelay > 0 && --this.soundDelay == 0) { - this.makeSound("mob.zombiepig.zpigangry", this.aZ() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F); + this.makeSound("mob.zombiepig.zpigangry", this.ba() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F); } super.l_(); @@ -121,11 +121,11 @@ public class EntityPigZombie extends EntityZombie { return "mob.zombiepig.zpig"; } - protected String aN() { + protected String aO() { return "mob.zombiepig.zpighurt"; } - protected String aO() { + protected String aP() { return "mob.zombiepig.zpigdeath"; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index 58e52179..2e234f11 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -4,6 +4,7 @@ import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.LinkedList; @@ -39,6 +40,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private int bU; private int bV; private boolean bW = true; + private long bX = 0L; private int containerCounter; public boolean h; public int ping; @@ -158,10 +160,9 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.activeContainer = this.defaultContainer; } - // CraftBukkit start - Check inventory status every tick - if (!this.activeContainer.a(this)) { // Should be stillValid - this.closeInventory(); - this.activeContainer = this.defaultContainer; + // CraftBukkit start + if (this.noDamageTicks > 0) { + --this.noDamageTicks; } // CraftBukkit end @@ -216,6 +217,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } } + + if (this.bX > 0L && this.server.ar() > 0 && MinecraftServer.aq() - this.bX > (long) (this.server.ar() * 1000 * 60)) { + this.playerConnection.disconnect("You have been idle for too long!"); + } } public void h() { @@ -242,8 +247,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.bR = this.foodData.e() == 0.0F; } - if (this.getHealth() + this.bm() != this.bO) { - this.bO = this.getHealth() + this.bm(); + if (this.getHealth() + this.bn() != this.bO) { + this.bO = this.getHealth() + this.bn(); // CraftBukkit - Update ALL the scores! this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.f, this.getLocalizedName(), com.google.common.collect.ImmutableList.of(this)); } @@ -301,7 +306,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } } - ChatMessage chatmessage = this.aQ().b(); + ChatMessage chatmessage = this.aR().b(); String deathmessage = chatmessage.toString(); org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage); @@ -340,7 +345,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { scoreboardscore.incrementScore(); } - EntityLiving entityliving = this.aR(); + EntityLiving entityliving = this.aS(); if (entityliving != null) { entityliving.b(this, this.bb); @@ -873,6 +878,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return new ChunkCoordinates(MathHelper.floor(this.locX), MathHelper.floor(this.locY + 0.5D), MathHelper.floor(this.locZ)); } + public void u() { + this.bX = MinecraftServer.aq(); + } + // CraftBukkit start public long timeOffset = 0; public boolean relativeTime = true; diff --git a/src/main/java/net/minecraft/server/EntityPotion.java b/src/main/java/net/minecraft/server/EntityPotion.java index a4330c74..cde3d7c3 100644 --- a/src/main/java/net/minecraft/server/EntityPotion.java +++ b/src/main/java/net/minecraft/server/EntityPotion.java @@ -12,7 +12,7 @@ import org.bukkit.entity.LivingEntity; public class EntityPotion extends EntityProjectile { - public ItemStack c; // CraftBukkit private --> public + public ItemStack item; // CraftBukkit private --> public public EntityPotion(World world) { super(world); @@ -24,12 +24,12 @@ public class EntityPotion extends EntityProjectile { public EntityPotion(World world, EntityLiving entityliving, ItemStack itemstack) { super(world, entityliving); - this.c = itemstack; + this.item = itemstack; } public EntityPotion(World world, double d0, double d1, double d2, ItemStack itemstack) { super(world, d0, d1, d2); - this.c = itemstack; + this.item = itemstack; } protected float e() { @@ -45,24 +45,24 @@ public class EntityPotion extends EntityProjectile { } public void setPotionValue(int i) { - if (this.c == null) { - this.c = new ItemStack(Item.POTION, 1, 0); + if (this.item == null) { + this.item = new ItemStack(Item.POTION, 1, 0); } - this.c.setData(i); + this.item.setData(i); } public int getPotionValue() { - if (this.c == null) { - this.c = new ItemStack(Item.POTION, 1, 0); + if (this.item == null) { + this.item = new ItemStack(Item.POTION, 1, 0); } - return this.c.getData(); + return this.item.getData(); } protected void a(MovingObjectPosition movingobjectposition) { if (!this.world.isStatic) { - List list = Item.POTION.g(this.c); + List list = Item.POTION.g(this.item); if (true || list != null && !list.isEmpty()) { // CraftBukkit - Call event even if no effects to apply AxisAlignedBB axisalignedbb = this.boundingBox.grow(4.0D, 2.0D, 4.0D); @@ -138,20 +138,20 @@ public class EntityPotion extends EntityProjectile { public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); if (nbttagcompound.hasKey("Potion")) { - this.c = ItemStack.createStack(nbttagcompound.getCompound("Potion")); + this.item = ItemStack.createStack(nbttagcompound.getCompound("Potion")); } else { this.setPotionValue(nbttagcompound.getInt("potionValue")); } - if (this.c == null) { + if (this.item == null) { this.die(); } } public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); - if (this.c != null) { - nbttagcompound.setCompound("Potion", this.c.save(new NBTTagCompound())); + if (this.item != null) { + nbttagcompound.setCompound("Potion", this.item.save(new NBTTagCompound())); } } } diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java index 6b161e49..0809b6f3 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java @@ -128,7 +128,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile { for (int j = 0; j < list.size(); ++j) { Entity entity1 = (Entity) list.get(j); - if (entity1.K() && (entity1 != entityliving || this.j >= 5)) { + if (entity1.L() && (entity1 != entityliving || this.j >= 5)) { float f = 0.3F; AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f); MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); @@ -151,7 +151,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile { if (movingobjectposition != null) { if (movingobjectposition.type == EnumMovingObjectType.TILE && this.world.getTypeId(movingobjectposition.b, movingobjectposition.c, movingobjectposition.d) == Block.PORTAL.id) { - this.aa(); + this.ab(); } else { this.a(movingobjectposition); // CraftBukkit start @@ -190,7 +190,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile { float f2 = 0.99F; float f3 = this.e(); - if (this.G()) { + if (this.H()) { for (int k = 0; k < 4; ++k) { float f4 = 0.25F; diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java index 04e24a0e..9df1c388 100644 --- a/src/main/java/net/minecraft/server/EntitySheep.java +++ b/src/main/java/net/minecraft/server/EntitySheep.java @@ -32,13 +32,13 @@ public class EntitySheep extends EntityAnimal { this.bq.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event } - protected boolean be() { + protected boolean bf() { return true; } - protected void bh() { + protected void bi() { this.br = this.bs.f(); - super.bh(); + super.bi(); } public void c() { @@ -49,8 +49,8 @@ public class EntitySheep extends EntityAnimal { super.c(); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(8.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D); } @@ -125,11 +125,11 @@ public class EntitySheep extends EntityAnimal { return "mob.sheep.say"; } - protected String aN() { + protected String aO() { return "mob.sheep.say"; } - protected String aO() { + protected String aP() { return "mob.sheep.say"; } diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java index 1d537d00..0e9abd63 100644 --- a/src/main/java/net/minecraft/server/EntitySilverfish.java +++ b/src/main/java/net/minecraft/server/EntitySilverfish.java @@ -11,8 +11,8 @@ public class EntitySilverfish extends EntityMonster { this.a(0.3F, 0.7F); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(8.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D); this.getAttributeInstance(GenericAttributes.e).setValue(1.0D); @@ -32,11 +32,11 @@ public class EntitySilverfish extends EntityMonster { return "mob.silverfish.say"; } - protected String aN() { + protected String aO() { return "mob.silverfish.hit"; } - protected String aO() { + protected String aP() { return "mob.silverfish.kill"; } @@ -72,8 +72,8 @@ public class EntitySilverfish extends EntityMonster { super.l_(); } - protected void bk() { - super.bk(); + protected void bl() { + super.bl(); if (!this.world.isStatic) { int i; int j; diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java index 1422a1c8..df606053 100644 --- a/src/main/java/net/minecraft/server/EntitySkeleton.java +++ b/src/main/java/net/minecraft/server/EntitySkeleton.java @@ -24,8 +24,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { } } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } @@ -34,7 +34,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { this.datawatcher.a(13, new Byte((byte) 0)); } - public boolean be() { + public boolean bf() { return true; } @@ -42,11 +42,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { return "mob.skeleton.say"; } - protected String aN() { + protected String aO() { return "mob.skeleton.hurt"; } - protected String aO() { + protected String aP() { return "mob.skeleton.death"; } @@ -110,8 +110,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { super.c(); } - public void U() { - super.U(); + public void V() { + super.V(); if (this.vehicle instanceof EntityCreature) { EntityCreature entitycreature = (EntityCreature) this.vehicle; @@ -189,7 +189,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { public GroupDataEntity a(GroupDataEntity groupdataentity) { groupdataentity = super.a(groupdataentity); - if (this.world.worldProvider instanceof WorldProviderHell && this.aC().nextInt(5) > 0) { + if (this.world.worldProvider instanceof WorldProviderHell && this.aD().nextInt(5) > 0) { this.goalSelector.a(4, this.bq); this.setSkeletonType(1); this.setEquipment(0, new ItemStack(Item.STONE_SWORD)); @@ -216,7 +216,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { public void bT() { this.goalSelector.a((PathfinderGoal) this.bq); this.goalSelector.a((PathfinderGoal) this.bp); - ItemStack itemstack = this.aY(); + ItemStack itemstack = this.aZ(); if (itemstack != null && itemstack.id == Item.BOW.id) { this.goalSelector.a(4, this.bp); @@ -227,8 +227,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { public void a(EntityLiving entityliving, float f) { EntityArrow entityarrow = new EntityArrow(this.world, this, entityliving, 1.6F, (float) (14 - this.world.difficulty * 4)); - int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.aY()); - int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.aY()); + int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.aZ()); + int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.aZ()); entityarrow.b((double) (f * 2.0F) + this.random.nextGaussian() * 0.25D + (double) ((float) this.world.difficulty * 0.11F)); if (i > 0) { @@ -239,11 +239,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { entityarrow.a(j); } - if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.aY()) > 0 || this.getSkeletonType() == 1) { + if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.aZ()) > 0 || this.getSkeletonType() == 1) { entityarrow.setOnFire(100); } - this.makeSound("random.bow", 1.0F, 1.0F / (this.aC().nextFloat() * 0.4F + 0.8F)); + this.makeSound("random.bow", 1.0F, 1.0F / (this.aD().nextFloat() * 0.4F + 0.8F)); this.world.addEntity(entityarrow); } @@ -284,7 +284,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity { } } - public double W() { - return super.W() - 0.5D; + public double X() { + return super.X() - 0.5D; } } diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java index 6cf90456..d888dc1c 100644 --- a/src/main/java/net/minecraft/server/EntitySlime.java +++ b/src/main/java/net/minecraft/server/EntitySlime.java @@ -86,7 +86,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { } if (this.bQ()) { - this.makeSound(this.bP(), this.aZ(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F); + this.makeSound(this.bP(), this.ba(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F); } this.h = -0.5F; @@ -101,8 +101,8 @@ public class EntitySlime extends EntityInsentient implements IMonster { } } - protected void bk() { - this.bo(); + protected void bl() { + this.u(); // CraftBukkit start Entity entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D); // EntityHuman -> Entity EntityTargetEvent event = null; @@ -132,7 +132,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { this.bd = true; if (this.bS()) { - this.makeSound(this.bP(), this.aZ(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F); + this.makeSound(this.bP(), this.ba(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F); } this.be = 1.0F - this.random.nextFloat() * 2.0F; @@ -207,11 +207,11 @@ public class EntitySlime extends EntityInsentient implements IMonster { return this.getSize(); } - protected String aN() { + protected String aO() { return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); } - protected String aO() { + protected String aP() { return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); } @@ -241,7 +241,7 @@ public class EntitySlime extends EntityInsentient implements IMonster { } } - protected float aZ() { + protected float ba() { return 0.4F * (float) this.getSize(); } diff --git a/src/main/java/net/minecraft/server/EntitySmallFireball.java b/src/main/java/net/minecraft/server/EntitySmallFireball.java index 68bd2123..94eadc16 100644 --- a/src/main/java/net/minecraft/server/EntitySmallFireball.java +++ b/src/main/java/net/minecraft/server/EntitySmallFireball.java @@ -75,7 +75,7 @@ public class EntitySmallFireball extends EntityFireball { } } - public boolean K() { + public boolean L() { return false; } diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java index 7de58d09..ec2319e3 100644 --- a/src/main/java/net/minecraft/server/EntitySnowman.java +++ b/src/main/java/net/minecraft/server/EntitySnowman.java @@ -18,19 +18,19 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity { this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget(this, EntityInsentient.class, 0, true, false, IMonster.a)); } - public boolean be() { + public boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(4.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D); } public void c() { super.c(); - if (this.F()) { + if (this.G()) { this.damageEntity(DamageSource.DROWN, 1.0F); } @@ -87,7 +87,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity { float f1 = MathHelper.sqrt(d0 * d0 + d2 * d2) * 0.2F; entitysnowball.shoot(d0, d1 + (double) f1, d2, 1.6F, 12.0F); - this.makeSound("random.bow", 1.0F, 1.0F / (this.aC().nextFloat() * 0.4F + 0.8F)); + this.makeSound("random.bow", 1.0F, 1.0F / (this.aD().nextFloat() * 0.4F + 0.8F)); this.world.addEntity(entitysnowball); } } diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java index 1ff7aaac..3c5b32ed 100644 --- a/src/main/java/net/minecraft/server/EntitySpider.java +++ b/src/main/java/net/minecraft/server/EntitySpider.java @@ -21,8 +21,8 @@ public class EntitySpider extends EntityMonster { } } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(16.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.800000011920929D); } @@ -43,11 +43,11 @@ public class EntitySpider extends EntityMonster { return "mob.spider.say"; } - protected String aN() { + protected String aO() { return "mob.spider.say"; } - protected String aO() { + protected String aP() { return "mob.spider.death"; } @@ -119,7 +119,7 @@ public class EntitySpider extends EntityMonster { return this.bT(); } - public void al() {} + public void am() {} public EnumMonsterType getMonsterType() { return EnumMonsterType.ARTHROPOD; diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java index 9f945619..e238e658 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -25,8 +25,8 @@ public class EntitySquid extends EntityWaterAnimal { this.by = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D); } @@ -34,15 +34,15 @@ public class EntitySquid extends EntityWaterAnimal { return null; } - protected String aN() { + protected String aO() { return null; } - protected String aO() { + protected String aP() { return null; } - protected float aZ() { + protected float ba() { return 0.4F; } @@ -68,7 +68,7 @@ public class EntitySquid extends EntityWaterAnimal { } /* CraftBukkit start - Delegate to Entity to use existing inWater value - public boolean G() { + public boolean H() { return this.world.a(this.boundingBox.grow(0.0D, -0.6000000238418579D, 0.0D), Material.WATER, (Entity) this); } // CraftBukkit end */ @@ -87,7 +87,7 @@ public class EntitySquid extends EntityWaterAnimal { } } - if (this.G()) { + if (this.H()) { float f; if (this.bt < 3.1415927F) { @@ -135,7 +135,7 @@ public class EntitySquid extends EntityWaterAnimal { this.move(this.motX, this.motY, this.motZ); } - protected void bk() { + protected void bl() { ++this.aV; if (this.aV > 100) { this.bA = this.bB = this.bC = 0.0F; @@ -147,7 +147,7 @@ public class EntitySquid extends EntityWaterAnimal { this.bC = MathHelper.sin(f) * 0.2F; } - this.bo(); + this.u(); } public boolean canSpawn() { diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java index 99e7ac2b..858d11ec 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java +++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java @@ -37,7 +37,7 @@ public class EntityTNTPrimed extends Entity { return false; } - public boolean K() { + public boolean L() { return !this.dead; } diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java index 8545b508..baa5b557 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -76,7 +76,7 @@ public class EntityTrackerEntry { if (this.tracker instanceof EntityItemFrame /*&& this.m % 10 == 0*/) { // CraftBukkit - Moved below, should always enter this block EntityItemFrame i3 = (EntityItemFrame) this.tracker; - ItemStack i4 = i3.h(); + ItemStack i4 = i3.getItem(); if (this.m % 10 == 0 && i4 != null && i4.getItem() instanceof ItemWorldMap) { // CraftBukkit - Moved this.m % 10 logic here so item frames do not enter the other blocks WorldMap i6 = Item.MAP.getSavedMap(i4, this.tracker.world); @@ -246,7 +246,7 @@ public class EntityTrackerEntry { } if (this.tracker instanceof EntityLiving) { - AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aW(); + AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aX(); Set set = attributemapserver.b(); if (!set.isEmpty()) { @@ -323,7 +323,7 @@ public class EntityTrackerEntry { } if (this.tracker instanceof EntityLiving) { - AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aW(); + AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aX(); Collection collection = attributemapserver.c(); // CraftBukkit start - If sending own attributes send scaled health instead of current maximum health @@ -353,8 +353,8 @@ public class EntityTrackerEntry { } // CraftBukkit end - if (this.tracker instanceof EntityInsentient && ((EntityInsentient) this.tracker).bI() != null) { - entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(1, this.tracker, ((EntityInsentient) this.tracker).bI())); + if (this.tracker instanceof EntityInsentient && ((EntityInsentient) this.tracker).getLeashHolder() != null) { + entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(1, this.tracker, ((EntityInsentient) this.tracker).getLeashHolder())); } if (this.tracker instanceof EntityLiving) { diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java index 74709c3d..d22fec15 100644 --- a/src/main/java/net/minecraft/server/EntityWitch.java +++ b/src/main/java/net/minecraft/server/EntityWitch.java @@ -31,11 +31,11 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { return "mob.witch.idle"; } - protected String aN() { + protected String aO() { return "mob.witch.hurt"; } - protected String aO() { + protected String aP() { return "mob.witch.death"; } @@ -47,13 +47,13 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { return this.getDataWatcher().getByte(21) == 1; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(26.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D); } - public boolean be() { + public boolean bf() { return true; } @@ -62,7 +62,7 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { if (this.bT()) { if (this.bs-- <= 0) { this.a(false); - ItemStack itemstack = this.aY(); + ItemStack itemstack = this.aZ(); this.setEquipment(0, (ItemStack) null); if (itemstack != null && itemstack.id == Item.POTION.id) { @@ -96,7 +96,7 @@ public class EntityWitch extends EntityMonster implements IRangedEntity { if (short1 > -1) { this.setEquipment(0, new ItemStack(Item.POTION, 1, short1)); - this.bs = this.aY().n(); + this.bs = this.aZ().n(); this.a(true); AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d); diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java index 4c0bbb43..057ce7ed 100644 --- a/src/main/java/net/minecraft/server/EntityWither.java +++ b/src/main/java/net/minecraft/server/EntityWither.java @@ -56,11 +56,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity { return "mob.wither.idle"; } - protected String aN() { + protected String aO() { return "mob.wither.hurt"; } - protected String aO() { + protected String aP() { return "mob.wither.death"; } @@ -155,7 +155,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { } } - protected void bh() { + protected void bi() { int i; if (this.bU() > 0) { @@ -179,7 +179,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { this.heal(10.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER_SPAWN); // CraftBukkit } } else { - super.bh(); + super.bi(); int j; @@ -289,9 +289,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity { this.setHealth(this.getMaxHealth() / 3.0F); } - public void al() {} + public void am() {} - public int aP() { + public int aQ() { return 4; } @@ -405,25 +405,24 @@ public class EntityWither extends EntityMonster implements IRangedEntity { // CraftBukkit end } - protected void bo() { + protected void u() { this.aV = 0; } - public boolean K() { + public boolean L() { return !this.dead; } - protected void b(float f) { - } + protected void b(float f) {} public void addEffect(MobEffect mobeffect) {} - protected boolean be() { + protected boolean bf() { return true; } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.a).setValue(300.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D); this.getAttributeInstance(GenericAttributes.b).setValue(40.0D); diff --git a/src/main/java/net/minecraft/server/EntityWitherSkull.java b/src/main/java/net/minecraft/server/EntityWitherSkull.java index 546430ca..970c91a7 100644 --- a/src/main/java/net/minecraft/server/EntityWitherSkull.java +++ b/src/main/java/net/minecraft/server/EntityWitherSkull.java @@ -40,7 +40,7 @@ public class EntityWitherSkull extends EntityFireball { this.shooter.heal(5.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER); // CraftBukkit } } else { - movingobjectposition.entity.damageEntity(DamageSource.MAGIC, 5); + movingobjectposition.entity.damageEntity(DamageSource.MAGIC, 5.0F); } if (movingobjectposition.entity instanceof EntityLiving) { @@ -73,7 +73,7 @@ public class EntityWitherSkull extends EntityFireball { } } - public boolean K() { + public boolean L() { return false; } diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java index 9d7d4a71..880a0248 100644 --- a/src/main/java/net/minecraft/server/EntityWolf.java +++ b/src/main/java/net/minecraft/server/EntityWolf.java @@ -30,8 +30,8 @@ public class EntityWolf extends EntityTameableAnimal { this.setTamed(false); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D); if (this.isTamed()) { this.getAttributeInstance(GenericAttributes.a).setValue(20.0D); @@ -40,7 +40,7 @@ public class EntityWolf extends EntityTameableAnimal { } } - public boolean be() { + public boolean bf() { return true; } @@ -53,7 +53,7 @@ public class EntityWolf extends EntityTameableAnimal { } } - protected void bj() { + protected void bk() { this.datawatcher.watch(18, Float.valueOf(this.getHealth())); } @@ -87,15 +87,15 @@ public class EntityWolf extends EntityTameableAnimal { return this.isAngry() ? "mob.wolf.growl" : (this.random.nextInt(3) == 0 ? (this.isTamed() && this.datawatcher.getFloat(18) < (this.getMaxHealth() / 2) ? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark"); } - protected String aN() { + protected String aO() { return "mob.wolf.hurt"; } - protected String aO() { + protected String aP() { return "mob.wolf.death"; } - protected float aZ() { + protected float ba() { return 0.4F; } @@ -126,14 +126,14 @@ public class EntityWolf extends EntityTameableAnimal { this.g = 10; } - if (this.F()) { + if (this.G()) { this.bs = true; this.bt = false; this.bu = 0.0F; this.bv = 0.0F; } else if ((this.bs || this.bt) && this.bt) { if (this.bu == 0.0F) { - this.makeSound("mob.wolf.shake", this.aZ(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); + this.makeSound("mob.wolf.shake", this.ba(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F); } this.bv = this.bu; diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java index 3f506c7e..1aa684f5 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -34,12 +34,12 @@ public class EntityZombie extends EntityMonster { this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, 0, false)); } - protected void ay() { - super.ay(); + protected void az() { + super.az(); this.getAttributeInstance(GenericAttributes.b).setValue(40.0D); this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D); this.getAttributeInstance(GenericAttributes.e).setValue(3.0D); - this.aW().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D); + this.aX().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D); } protected void a() { @@ -49,8 +49,8 @@ public class EntityZombie extends EntityMonster { this.getDataWatcher().a(14, Byte.valueOf((byte) 0)); } - public int aP() { - int i = super.aP() + 2; + public int aQ() { + int i = super.aQ() + 2; if (i > 20) { i = 20; @@ -59,7 +59,7 @@ public class EntityZombie extends EntityMonster { return i; } - protected boolean be() { + protected boolean bf() { return true; } @@ -188,7 +188,7 @@ public class EntityZombie extends EntityMonster { public boolean m(Entity entity) { boolean flag = super.m(entity); - if (flag && this.aY() == null && this.isBurning() && this.random.nextFloat() < (float) this.world.difficulty * 0.3F) { + if (flag && this.aZ() == null && this.isBurning() && this.random.nextFloat() < (float) this.world.difficulty * 0.3F) { // CraftBukkit start EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 2 * this.world.difficulty); this.world.getServer().getPluginManager().callEvent(event); @@ -206,11 +206,11 @@ public class EntityZombie extends EntityMonster { return "mob.zombie.say"; } - protected String aN() { + protected String aO() { return "mob.zombie.hurt"; } - protected String aO() { + protected String aP() { return "mob.zombie.death"; } @@ -347,7 +347,7 @@ public class EntityZombie extends EntityMonster { } public boolean a(EntityHuman entityhuman) { - ItemStack itemstack = entityhuman.bx(); + ItemStack itemstack = entityhuman.by(); if (itemstack != null && itemstack.getItem() == Item.GOLDEN_APPLE && itemstack.getData() == 0 && this.isVillager() && this.hasEffect(MobEffectList.WEAKNESS)) { if (!entityhuman.abilities.canInstantlyBuild) { diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java index 37349f5c..bda2efb1 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -44,7 +44,7 @@ public class FoodMetaData { } } - if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bI()) { + if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bJ()) { ++this.foodTickTimer; if (this.foodTickTimer >= 80) { // CraftBukkit - added RegainReason diff --git a/src/main/java/net/minecraft/server/ItemBoat.java b/src/main/java/net/minecraft/server/ItemBoat.java index 80a006f4..fbb7ba1f 100644 --- a/src/main/java/net/minecraft/server/ItemBoat.java +++ b/src/main/java/net/minecraft/server/ItemBoat.java @@ -41,8 +41,8 @@ public class ItemBoat extends Item { for (i = 0; i < list.size(); ++i) { Entity entity = (Entity) list.get(i); - if (entity.K()) { - float f10 = entity.Y(); + if (entity.L()) { + float f10 = entity.Z(); AxisAlignedBB axisalignedbb = entity.boundingBox.grow((double) f10, (double) f10, (double) f10); if (axisalignedbb.a(vec3d)) { diff --git a/src/main/java/net/minecraft/server/ItemFishingRod.java b/src/main/java/net/minecraft/server/ItemFishingRod.java index 2d0424ac..2ac49979 100644 --- a/src/main/java/net/minecraft/server/ItemFishingRod.java +++ b/src/main/java/net/minecraft/server/ItemFishingRod.java @@ -16,7 +16,7 @@ public class ItemFishingRod extends Item { int i = entityhuman.hookedFish.c(); itemstack.damage(i, entityhuman); - entityhuman.aU(); + entityhuman.aV(); } else { // CraftBukkit start EntityFishingHook hook = new EntityFishingHook(world, entityhuman); @@ -32,7 +32,7 @@ public class ItemFishingRod extends Item { world.addEntity(hook); // CraftBukkit - moved creation up } - entityhuman.aU(); + entityhuman.aV(); } return itemstack; diff --git a/src/main/java/net/minecraft/server/ItemLeash.java b/src/main/java/net/minecraft/server/ItemLeash.java index c0e1eb3a..e63ae3e6 100644 --- a/src/main/java/net/minecraft/server/ItemLeash.java +++ b/src/main/java/net/minecraft/server/ItemLeash.java @@ -39,7 +39,7 @@ public class ItemLeash extends Item { while (iterator.hasNext()) { EntityInsentient entityinsentient = (EntityInsentient) iterator.next(); - if (entityinsentient.bH() && entityinsentient.bI() == entityhuman) { + if (entityinsentient.bH() && entityinsentient.getLeashHolder() == entityhuman) { if (entityleash == null) { entityleash = EntityLeash.a(world, i, j, k); @@ -59,7 +59,7 @@ public class ItemLeash extends Item { continue; } // CraftBukkit end - entityinsentient.b(entityleash, true); + entityinsentient.setLeashHolder(entityleash, true); flag = true; } } diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java index 41ba8fe3..69f81ca1 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -206,7 +206,7 @@ public final class ItemStack { public void damage(int i, EntityLiving entityliving) { if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) { if (this.g()) { - if (this.isDamaged(i, entityliving.aC())) { + if (this.isDamaged(i, entityliving.aD())) { entityliving.a(this); --this.count; if (entityliving instanceof EntityHuman) { @@ -214,7 +214,7 @@ public final class ItemStack { entityhuman.a(StatisticList.F[this.id], 1); if (this.count == 0 && this.getItem() instanceof ItemBow) { - entityhuman.by(); + entityhuman.bz(); } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 26cfa0c5..029131d2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -51,28 +51,29 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo private boolean allowFlight; private String motd; private int D; - private long E; + private int E; private long F; private long G; private long H; + private long I; public final long[] f; public final long[] g; public final long[] h; public final long[] i; public final long[] j; public long[][] k; - private KeyPair I; - private String J; + private KeyPair J; private String K; + private String L; private boolean demoMode; - private boolean N; private boolean O; - private String P; - private boolean Q; - private long R; - private String S; - private boolean T; + private boolean P; + private String Q; + private boolean R; + private long S; + private String T; private boolean U; + private boolean V; // CraftBukkit start public List worlds = new ArrayList(); @@ -89,17 +90,18 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo public MinecraftServer(OptionSet options) { // CraftBukkit - signature file -> OptionSet this.c = Proxy.NO_PROXY; + this.E = 0; this.f = new long[100]; this.g = new long[100]; this.h = new long[100]; this.i = new long[100]; this.j = new long[100]; - this.P = ""; + this.Q = ""; l = this; // this.universe = file1; // CraftBukkit this.q = new CommandDispatcher(); // this.convertable = new WorldLoaderServer(server.getWorldContainer()); // CraftBukkit - moved to DedicatedServer.init - this.ar(); + this.as(); // CraftBukkit start this.options = options; @@ -126,7 +128,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo public abstract PropertyManager getPropertyManager(); // CraftBukkit end - private void ar() { + private void as() { DispenserRegistry.a(); } @@ -141,7 +143,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } protected synchronized void b(String s) { - this.S = s; + this.T = s; } protected void a(String s, String s1, long i, WorldType worldtype, String s2) { @@ -314,7 +316,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } protected void saveChunks(boolean flag) throws ExceptionWorldConflict { // CraftBukkit - added throws - if (!this.O) { + if (!this.P) { // CraftBukkit start for (int j = 0; j < this.worlds.size(); ++j) { WorldServer worldserver = this.worlds.get(j); @@ -336,7 +338,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public void stop() throws ExceptionWorldConflict { // CraftBukkit - added throws - if (!this.O) { + if (!this.P) { this.getLogger().info("Stopping server"); // CraftBukkit start if (this.server != null) { @@ -391,15 +393,15 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo if (this.init()) { long i = aq(); - for (long j = 0L; this.isRunning; this.Q = true) { + for (long j = 0L; this.isRunning; this.R = true) { long k = aq(); long l = k - i; - if (l > 2000L && i - this.R >= 15000L) { + if (l > 2000L && i - this.S >= 15000L) { if (this.server.getWarnOnOverload()) // CraftBukkit - Added option to suppress warning messages this.getLogger().warning("Can\'t keep up! Did the system time change, or is the server overloaded?"); l = 2000L; - this.R = i; + this.S = i; } if (l < 0L) { @@ -476,8 +478,8 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo AxisAlignedBB.a().a(); ++this.ticks; - if (this.T) { - this.T = false; + if (this.U) { + this.U = false; this.methodProfiler.a = true; this.methodProfiler.a(); } @@ -493,14 +495,14 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo this.methodProfiler.a("tallying"); this.j[this.ticks % 100] = System.nanoTime() - i; - this.f[this.ticks % 100] = Packet.q - this.E; - this.E = Packet.q; - this.g[this.ticks % 100] = Packet.r - this.F; - this.F = Packet.r; - this.h[this.ticks % 100] = Packet.o - this.G; - this.G = Packet.o; - this.i[this.ticks % 100] = Packet.p - this.H; - this.H = Packet.p; + this.f[this.ticks % 100] = Packet.q - this.F; + this.F = Packet.q; + this.g[this.ticks % 100] = Packet.r - this.G; + this.G = Packet.r; + this.h[this.ticks % 100] = Packet.o - this.H; + this.H = Packet.o; + this.i[this.ticks % 100] = Packet.p - this.I; + this.I = Packet.p; this.methodProfiler.b(); this.methodProfiler.a("snooper"); if (!this.n.d() && this.ticks > 100) { @@ -698,7 +700,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } if (flag) { - dedicatedserver.at(); + dedicatedserver.au(); } */ @@ -755,7 +757,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public String getVersion() { - return "1.6.2"; + return "1.6.4"; } public int A() { @@ -922,7 +924,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public KeyPair H() { - return this.I; + return this.J; } public int I() { @@ -934,27 +936,27 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public String J() { - return this.J; + return this.K; } public void j(String s) { - this.J = s; + this.K = s; } public boolean K() { - return this.J != null; + return this.K != null; } public String L() { - return this.K; + return this.L; } public void k(String s) { - this.K = s; + this.L = s; } public void a(KeyPair keypair) { - this.I = keypair; + this.J = keypair; } public void c(int i) { @@ -991,7 +993,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public void c(boolean flag) { - this.N = flag; + this.O = flag; } public Convertable getConvertable() { @@ -999,7 +1001,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public void R() { - this.O = true; + this.P = true; this.getConvertable().d(); // CraftBukkit start - This needs review, what does it do? (it's new) @@ -1017,11 +1019,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public String getTexturePack() { - return this.P; + return this.Q; } public void setTexturePack(String s) { - this.P = s; + this.Q = s; } public void a(MojangStatisticsGenerator mojangstatisticsgenerator) { @@ -1170,7 +1172,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } public void ak() { - this.T = true; + this.U = true; } public ChunkCoordinates b() { @@ -1192,11 +1194,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo public abstract IConsoleLogManager getLogger(); public void setForceGamemode(boolean flag) { - this.U = flag; + this.V = flag; } public boolean getForceGamemode() { - return this.U; + return this.V; } public Proxy ap() { @@ -1207,6 +1209,14 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo return System.currentTimeMillis(); } + public int ar() { + return this.E; + } + + public void e(int i) { + this.E = i; + } + public static PlayerList a(MinecraftServer minecraftserver) { return minecraftserver.t; } diff --git a/src/main/java/net/minecraft/server/MobEffectList.java b/src/main/java/net/minecraft/server/MobEffectList.java index 1f4d1a3d..8e494f75 100644 --- a/src/main/java/net/minecraft/server/MobEffectList.java +++ b/src/main/java/net/minecraft/server/MobEffectList.java @@ -96,8 +96,8 @@ public class MobEffectList { if (!entityliving.world.isStatic) { ((EntityHuman) entityliving).getFoodData().eat(i + 1, 1.0F); } - } else if ((this.id != HEAL.id || entityliving.aL()) && (this.id != HARM.id || !entityliving.aL())) { - if (this.id == HARM.id && !entityliving.aL() || this.id == HEAL.id && entityliving.aL()) { + } else if ((this.id != HEAL.id || entityliving.aM()) && (this.id != HARM.id || !entityliving.aM())) { + if (this.id == HARM.id && !entityliving.aM() || this.id == HEAL.id && entityliving.aM()) { entityliving.damageEntity(DamageSource.MAGIC, (float) (6 << i)); } } else { @@ -114,8 +114,8 @@ public class MobEffectList { // CraftBukkit end int j; - if ((this.id != HEAL.id || entityliving1.aL()) && (this.id != HARM.id || !entityliving1.aL())) { - if (this.id == HARM.id && !entityliving1.aL() || this.id == HEAL.id && entityliving1.aL()) { + if ((this.id != HEAL.id || entityliving1.aM()) && (this.id != HARM.id || !entityliving1.aM())) { + if (this.id == HARM.id && !entityliving1.aM() || this.id == HEAL.id && entityliving1.aM()) { j = (int) (d0 * (double) (6 << i) + 0.5D); if (entityliving == null) { entityliving1.damageEntity(DamageSource.MAGIC, (float) j); diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java index 25cf2bda..557dad37 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java @@ -31,7 +31,7 @@ public class PathfinderGoalBreakDoor extends PathfinderGoalDoorInteract { public void e() { super.e(); - if (this.a.aC().nextInt(20) == 0) { + if (this.a.aD().nextInt(20) == 0) { this.a.world.triggerEffect(1010, this.b, this.c, this.d, 0); } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java index 169af7f8..0c64660e 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java @@ -81,7 +81,7 @@ public class PathfinderGoalBreed extends PathfinderGoal { entityageable.setAge(-24000); entityageable.setPositionRotation(this.d.locX, this.d.locY, this.d.locZ, 0.0F, 0.0F); this.a.addEntity(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason - Random random = this.d.aC(); + Random random = this.d.aD(); for (int i = 0; i < 7; ++i) { double d0 = random.nextGaussian() * 0.02D; diff --git a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java index 97d679df..ed6811a5 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java @@ -18,7 +18,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal { } public boolean a() { - if (this.b.aC().nextInt(this.b.isBaby() ? 50 : 1000) != 0) { + if (this.b.aD().nextInt(this.b.isBaby() ? 50 : 1000) != 0) { return false; } else { int i = MathHelper.floor(this.b.locX); diff --git a/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java b/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java index a51ce7a6..6102f9eb 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java @@ -17,7 +17,7 @@ public class PathfinderGoalMakeLove extends PathfinderGoal { public boolean a() { if (this.b.getAge() != 0) { return false; - } else if (this.b.aC().nextInt(500) != 0) { + } else if (this.b.aD().nextInt(500) != 0) { return false; } else { this.a = this.d.villages.getClosestVillage(MathHelper.floor(this.b.locX), MathHelper.floor(this.b.locY), MathHelper.floor(this.b.locZ), 0); @@ -62,7 +62,7 @@ public class PathfinderGoalMakeLove extends PathfinderGoal { this.g(); } - if (this.b.aC().nextInt(35) == 0) { + if (this.b.aD().nextInt(35) == 0) { this.d.broadcastEntityEffect(this.b, (byte) 12); } } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java b/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java index afd726f3..a07c6cf7 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java @@ -68,7 +68,7 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal { this.b.getControllerLook().a(entityliving, 30.0F, 30.0F); if ((this.e || this.b.getEntitySenses().canSee(entityliving)) && --this.h <= 0) { - this.h = 4 + this.b.aC().nextInt(7); + this.h = 4 + this.b.aD().nextInt(7); this.b.getNavigation().a((Entity) entityliving, this.d); } @@ -78,8 +78,8 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal { if (this.b.e(entityliving.locX, entityliving.boundingBox.b, entityliving.locZ) <= d0) { if (this.c <= 0) { this.c = 20; - if (this.b.aY() != null) { - this.b.aU(); + if (this.b.aZ() != null) { + this.b.aV(); } this.b.m(entityliving); diff --git a/src/main/java/net/minecraft/server/PathfinderGoalPanic.java b/src/main/java/net/minecraft/server/PathfinderGoalPanic.java index cbf1976c..daa2f413 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalPanic.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalPanic.java @@ -37,7 +37,7 @@ public class PathfinderGoalPanic extends PathfinderGoal { public boolean b() { // CraftBukkit start - introduce a temporary timeout hack until this is fixed properly - if ((this.a.ticksLived - this.a.aE()) > 100) { + if ((this.a.ticksLived - this.a.aF()) > 100) { this.a.b((EntityLiving) null); return false; } diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSit.java b/src/main/java/net/minecraft/server/PathfinderGoalSit.java index ff300bff..4a352dc7 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSit.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalSit.java @@ -13,7 +13,7 @@ public class PathfinderGoalSit extends PathfinderGoal { public boolean a() { if (!this.entity.isTamed()) { return this.willSit && this.entity.getGoalTarget() == null; // CraftBukkit - Allow sitting for wild animals - } else if (this.entity.G()) { + } else if (this.entity.H()) { return false; } else if (!this.entity.onGround) { return false; diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTame.java b/src/main/java/net/minecraft/server/PathfinderGoalTame.java index 4b0d484c..ffc8a88a 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalTame.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalTame.java @@ -40,13 +40,13 @@ public class PathfinderGoalTame extends PathfinderGoal { } public void e() { - if (this.entity.aC().nextInt(50) == 0) { + if (this.entity.aD().nextInt(50) == 0) { if (this.entity.passenger instanceof EntityHuman) { int i = this.entity.getTemper(); - int j = this.entity.cq(); + int j = this.entity.getMaxDomestication(); // CraftBukkit - if (j > 0 && this.entity.aC().nextInt(j) < i && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this.entity, (EntityHuman) this.entity.passenger).isCancelled() && this.entity.passenger instanceof EntityHuman) { + if (j > 0 && this.entity.aD().nextInt(j) < i && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this.entity, (EntityHuman) this.entity.passenger).isCancelled() && this.entity.passenger instanceof EntityHuman) { this.entity.g((EntityHuman) this.entity.passenger); this.entity.world.broadcastEntityEffect(this.entity, (byte) 7); return; diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalTarget.java index 019048d2..2e561a7f 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalTarget.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalTarget.java @@ -144,7 +144,7 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal { } private boolean a(EntityLiving entityliving) { - this.e = 10 + this.c.aC().nextInt(5); + this.e = 10 + this.c.aD().nextInt(5); PathEntity pathentity = this.c.getNavigation().a(entityliving); if (pathentity == null) { diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java index 17490596..1bb77a9b 100644 --- a/src/main/java/net/minecraft/server/PendingConnection.java +++ b/src/main/java/net/minecraft/server/PendingConnection.java @@ -62,29 +62,27 @@ public class PendingConnection extends Connection { } public void a(Packet2Handshake packet2handshake) { - // CraftBukkit start if (this.g != null) { - this.disconnect("Invalid username " + this.g); - } - this.hostname = packet2handshake.c == null ? "" : packet2handshake.c + ':' + packet2handshake.d; - // CraftBukkit end - this.g = packet2handshake.f(); - if (!this.g.equals(StripColor.a(this.g))) { - this.disconnect("Invalid username!"); + this.disconnect("Quit repeating yourself!"); } else { - PublicKey publickey = this.server.H().getPublic(); + this.g = packet2handshake.f(); + if (!this.g.equals(StripColor.a(this.g))) { + this.disconnect("Invalid username!"); + } else { + PublicKey publickey = this.server.H().getPublic(); - if (packet2handshake.d() != 74) { - if (packet2handshake.d() > 74) { - this.disconnect("Outdated server!"); + if (packet2handshake.d() != 78) { + if (packet2handshake.d() > 78) { + this.disconnect("Outdated server!"); + } else { + this.disconnect("Outdated client!"); + } } else { - this.disconnect("Outdated client!"); + this.loginKey = this.server.getOnlineMode() ? Long.toString(random.nextLong(), 16) : "-"; + this.d = new byte[4]; + random.nextBytes(this.d); + this.networkManager.queue(new Packet253KeyRequest(this.loginKey, publickey, this.d)); } - } else { - this.loginKey = this.server.getOnlineMode() ? Long.toString(random.nextLong(), 16) : "-"; - this.d = new byte[4]; - random.nextBytes(this.d); - this.networkManager.queue(new Packet253KeyRequest(this.loginKey, publickey, this.d)); } } } @@ -154,7 +152,7 @@ public class PendingConnection extends Connection { s = pingEvent.getMotd() + "\u00A7" + playerlist.getPlayerCount() + "\u00A7" + pingEvent.getMaxPlayers(); } else { // CraftBukkit start - Don't create a list from an array - Object[] list = new Object[] { 1, 74, this.server.getVersion(), pingEvent.getMotd(), playerlist.getPlayerCount(), pingEvent.getMaxPlayers() }; + Object[] list = new Object[] { 1, 78, this.server.getVersion(), pingEvent.getMotd(), playerlist.getPlayerCount(), pingEvent.getMaxPlayers() }; StringBuilder builder = new StringBuilder(); for (Object object : list) { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index 6444a2f7..a5d7500a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -266,7 +266,7 @@ public class PlayerConnection extends Connection { float f = this.player.yaw; float f1 = this.player.pitch; - this.player.vehicle.V(); + this.player.vehicle.W(); d1 = this.player.locX; d2 = this.player.locY; d3 = this.player.locZ; @@ -280,7 +280,7 @@ public class PlayerConnection extends Connection { this.player.X = 0.0F; this.player.setLocation(d1, d2, d3, f, f1); if (this.player.vehicle != null) { - this.player.vehicle.V(); + this.player.vehicle.W(); } this.minecraftServer.getPlayerList().d(this.player); @@ -477,6 +477,7 @@ public class PlayerConnection extends Connection { WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); + this.player.u(); if (packet14blockdig.e == 4) { // CraftBukkit start // If the ticks aren't the same then the count starts from 0 and we update the lastDropTick. @@ -497,7 +498,7 @@ public class PlayerConnection extends Connection { } else if (packet14blockdig.e == 3) { this.player.a(true); } else if (packet14blockdig.e == 5) { - this.player.bs(); + this.player.bt(); } else { boolean flag = false; @@ -574,6 +575,7 @@ public class PlayerConnection extends Connection { // second one. This sadly has to remain until Mojang makes their packets saner. :( // -- Grum + this.player.u(); if (packet15place.getFace() == 255) { if (packet15place.getItemStack() != null && packet15place.getItemStack().id == this.lastMaterial && this.lastPacket != null && packet15place.timestamp - this.lastPacket < 100) { this.lastPacket = null; @@ -747,11 +749,13 @@ public class PlayerConnection extends Connection { this.server.getPluginManager().callEvent(event); if (event.isCancelled()) { this.sendPacket(new Packet16BlockItemSwitch(this.player.inventory.itemInHandIndex)); + this.player.u(); return; } // CraftBukkit end this.player.inventory.itemInHandIndex = packet16blockitemswitch.itemInHandIndex; + this.player.u(); } else { this.minecraftServer.getLogger().warning(this.player.getName() + " tried to set an invalid carried item"); this.disconnect("Nope!"); // CraftBukkit @@ -762,6 +766,7 @@ public class PlayerConnection extends Connection { if (this.player.getChatFlags() == 2) { this.sendPacket(new Packet3Chat(ChatMessage.e("chat.cannotSend").a(EnumChatFormat.RED))); } else { + this.player.u(); String s = packet3chat.message; if (s.length() > 100) { @@ -969,6 +974,7 @@ public class PlayerConnection extends Connection { public void a(Packet18ArmAnimation packet18armanimation) { if (this.player.dead) return; // CraftBukkit + this.player.u(); if (packet18armanimation.b == 1) { // CraftBukkit start - Raytrace to look for 'rogue armswings' float f = 1.0F; @@ -1000,7 +1006,7 @@ public class PlayerConnection extends Connection { if (event.isCancelled()) return; // CraftBukkit end - this.player.aU(); + this.player.aV(); } } @@ -1008,6 +1014,7 @@ public class PlayerConnection extends Connection { // CraftBukkit start if (this.player.dead) return; + this.player.u(); if (packet19entityaction.animation == 1 || packet19entityaction.animation == 2) { PlayerToggleSneakEvent event = new PlayerToggleSneakEvent(this.getPlayer(), packet19entityaction.animation == 1); this.server.getPluginManager().callEvent(event); @@ -1061,6 +1068,7 @@ public class PlayerConnection extends Connection { WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); Entity entity = worldserver.getEntity(packet7useentity.target); + this.player.u(); if (entity != null) { boolean flag = this.player.o(entity); double d0 = 36.0D; @@ -1081,7 +1089,7 @@ public class PlayerConnection extends Connection { if (triggerLeashUpdate && (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().id != Item.LEASH.id)) { // Refresh the current leash state - this.sendPacket(new Packet39AttachEntity(1, entity, ((EntityInsentient) entity).bI())); + this.sendPacket(new Packet39AttachEntity(1, entity, ((EntityInsentient) entity).getLeashHolder())); } if (triggerTagUpdate && (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().id != Item.NAME_TAG.id)) { @@ -1122,6 +1130,7 @@ public class PlayerConnection extends Connection { } public void a(Packet205ClientCommand packet205clientcommand) { + this.player.u(); if (packet205clientcommand.a == 1) { if (this.player.viewingCredits) { this.minecraftServer.getPlayerList().changeDimension(this.player, 0, PlayerTeleportEvent.TeleportCause.END_PORTAL); // CraftBukkit - reroute logic through custom portal management @@ -1163,6 +1172,7 @@ public class PlayerConnection extends Connection { public void a(Packet102WindowClick packet102windowclick) { if (this.player.dead) return; // CraftBukkit + this.player.u(); if (this.player.activeContainer.windowId == packet102windowclick.a && this.player.activeContainer.c(this.player)) { // CraftBukkit start - Call InventoryClickEvent if (packet102windowclick.slot < -1 && packet102windowclick.slot != -999) { @@ -1449,6 +1459,7 @@ public class PlayerConnection extends Connection { } public void a(Packet108ButtonClick packet108buttonclick) { + this.player.u(); if (this.player.activeContainer.windowId == packet108buttonclick.a && this.player.activeContainer.c(this.player)) { this.player.activeContainer.a((EntityHuman) this.player, packet108buttonclick.b); this.player.activeContainer.b(); @@ -1535,6 +1546,7 @@ public class PlayerConnection extends Connection { public void a(Packet130UpdateSign packet130updatesign) { if (this.player.dead) return; // CraftBukkit + this.player.u(); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); if (worldserver.isLoaded(packet130updatesign.x, packet130updatesign.y, packet130updatesign.z)) { diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java index a7afa55c..16420e46 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -261,7 +261,7 @@ public class PlayerInteractManager { event.setCancelled(this.gamemode.isAdventure() && !this.player.d(i, j, k)); // Sword + Creative mode pre-cancel - event.setCancelled(event.isCancelled() || (this.gamemode.d() && this.player.aY() != null && this.player.aY().getItem() instanceof ItemSword)); + event.setCancelled(event.isCancelled() || (this.gamemode.d() && this.player.aZ() != null && this.player.aZ().getItem() instanceof ItemSword)); // Calculate default block experience Block nmsBlock = Block.byId[block.getTypeId()]; @@ -311,13 +311,13 @@ public class PlayerInteractManager { if (this.isCreative()) { this.player.playerConnection.sendPacket(new Packet53BlockChange(i, j, k, this.world)); } else { - ItemStack itemstack = this.player.bx(); + ItemStack itemstack = this.player.by(); boolean flag1 = this.player.a(Block.byId[l]); if (itemstack != null) { itemstack.a(this.world, l, i, j, k, this.player); if (itemstack.count == 0) { - this.player.by(); + this.player.bz(); } } @@ -356,7 +356,7 @@ public class PlayerInteractManager { entityhuman.inventory.items[entityhuman.inventory.itemInHandIndex] = null; } - if (!entityhuman.bq()) { + if (!entityhuman.br()) { ((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer); } diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java index 74fcc02a..5ac2fdde 100644 --- a/src/main/java/net/minecraft/server/PortalTravelAgent.java +++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java @@ -215,7 +215,7 @@ public class PortalTravelAgent { j2 = 1; } - int k2 = entity.as(); + int k2 = entity.at(); if (j2 > -1) { int l2 = Direction.h[j2]; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 0435ca73..3924a5cf 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1033,7 +1033,7 @@ public abstract class World implements IBlockAccess { List list = this.getEntities(entity, axisalignedbb.grow(d0, d0, d0)); for (int j2 = 0; j2 < list.size(); ++j2) { - AxisAlignedBB axisalignedbb1 = ((Entity) list.get(j2)).D(); + AxisAlignedBB axisalignedbb1 = ((Entity) list.get(j2)).E(); if (axisalignedbb1 != null && axisalignedbb1.b(axisalignedbb)) { this.M.add(axisalignedbb1); @@ -1349,7 +1349,7 @@ public abstract class World implements IBlockAccess { if (flag && entity.ai) { ++entity.ticksLived; if (entity.vehicle != null) { - entity.U(); + entity.V(); } else { entity.l_(); } @@ -1549,7 +1549,7 @@ public abstract class World implements IBlockAccess { } } - if (vec3d.b() > 0.0D && entity.aw()) { + if (vec3d.b() > 0.0D && entity.ax()) { vec3d = vec3d.a(); double d1 = 0.014D; @@ -2565,7 +2565,7 @@ public abstract class World implements IBlockAccess { } if (entityhuman1.isInvisible()) { - float f = entityhuman1.bw(); + float f = entityhuman1.bx(); if (f < 0.1F) { f = 0.1F; @@ -2674,7 +2674,7 @@ public abstract class World implements IBlockAccess { return (double) this.i(1.0F) > 0.2D; } - public boolean F(int i, int j, int k) { + public boolean isRainingAt(int i, int j, int k) { if (!this.Q()) { return false; } else if (!this.l(i, j, k)) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index eb9540fd..acc1eff8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -326,7 +326,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate j1 = k + (i1 & 15); k1 = l + (i1 >> 8 & 15); l1 = this.h(j1, k1); - if (this.F(j1, l1, k1)) { + if (this.isRainingAt(j1, l1, k1)) { this.strikeLightning(new EntityLightning(this, (double) j1, (double) l1, (double) k1)); } } @@ -785,7 +785,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate protected void a(Entity entity) { super.a(entity); this.entitiesById.a(entity.id, entity); - Entity[] aentity = entity.an(); + Entity[] aentity = entity.ao(); if (aentity != null) { for (int i = 0; i < aentity.length; ++i) { @@ -797,7 +797,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate protected void b(Entity entity) { super.b(entity); this.entitiesById.d(entity.id); - Entity[] aentity = entity.an(); + Entity[] aentity = entity.ao(); if (aentity != null) { for (int i = 0; i < aentity.length; ++i) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java index b2df4f5b..6ebe28d3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java @@ -15,7 +15,7 @@ public class CraftFireball extends AbstractProjectile implements Fireball { } public float getYield() { - return getHandle().yield; + return getHandle().bukkitYield; } public boolean isIncendiary() { @@ -27,7 +27,7 @@ public class CraftFireball extends AbstractProjectile implements Fireball { } public void setYield(float yield) { - getHandle().yield = yield; + getHandle().bukkitYield = yield; } public LivingEntity getShooter() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java index 7504bd50..b6575e96 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java @@ -49,7 +49,7 @@ public class CraftFish extends AbstractProjectile implements Fish { EntityFishingHook hook = getHandle(); if (this.biteChance == -1) { - if (hook.world.F(MathHelper.floor(hook.locX), MathHelper.floor(hook.locY) + 1, MathHelper.floor(hook.locZ))) { + if (hook.world.isRainingAt(MathHelper.floor(hook.locX), MathHelper.floor(hook.locY) + 1, MathHelper.floor(hook.locZ))) { return 1/300.0; } return 1/500.0; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java index b0da3b9c..bca7a2d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java @@ -54,7 +54,7 @@ public class CraftHorse extends CraftAnimals implements Horse { public void setCarryingChest(boolean chest) { if (chest == isCarryingChest()) return; getHandle().setHasChest(chest); - getHandle().cH(); // Should be loadChest + getHandle().loadChest(); } public int getDomestication() { @@ -68,7 +68,7 @@ public class CraftHorse extends CraftAnimals implements Horse { } public int getMaxDomestication() { - return getHandle().cq(); // Should be getMaxDomestication + return getHandle().getMaxDomestication(); } public void setMaxDomestication(int value) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java index 59d9c0d3..ddee207e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java @@ -21,11 +21,11 @@ public class CraftIronGolem extends CraftGolem implements IronGolem { } public boolean isPlayerCreated() { - return getHandle().bW(); + return getHandle().isPlayerCreated(); } public void setPlayerCreated(boolean playerCreated) { - getHandle().f(playerCreated); + getHandle().setPlayerCreated(playerCreated); } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java index ba8afa31..4cb611fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java @@ -20,16 +20,16 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { getHandle().getDataWatcher().a(2, 5); getHandle().getDataWatcher().h(2); } else { - getHandle().a(CraftItemStack.asNMSCopy(item)); + getHandle().setItem(CraftItemStack.asNMSCopy(item)); } } public org.bukkit.inventory.ItemStack getItem() { - return CraftItemStack.asBukkitCopy(getHandle().h()); + return CraftItemStack.asBukkitCopy(getHandle().getItem()); } public Rotation getRotation() { - return toBukkitRotation(getHandle().i()); + return toBukkitRotation(getHandle().getRotation()); } Rotation toBukkitRotation(int value) { @@ -44,7 +44,7 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { case 3: return Rotation.COUNTER_CLOCKWISE; default: - throw new AssertionError("Unknown rotation " + getHandle().i() + " for " + getHandle()); + throw new AssertionError("Unknown rotation " + value + " for " + getHandle()); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java index f75e74de..ca037940 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java @@ -13,7 +13,7 @@ public class CraftLargeFireball extends CraftFireball implements LargeFireball { @Override public void setYield(float yield) { super.setYield(yield); - getHandle().e = (int) yield; + getHandle().yield = (int) yield; } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 83e0ee9d..52d4c3c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -410,21 +410,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { if (!(getHandle() instanceof EntityInsentient)) { return false; } - return ((EntityInsentient) getHandle()).bI() != null; + return ((EntityInsentient) getHandle()).getLeashHolder() != null; } public Entity getLeashHolder() throws IllegalStateException { if (!isLeashed()) { throw new IllegalStateException("Entity not leashed"); } - return ((EntityInsentient) getHandle()).bI().getBukkitEntity(); + return ((EntityInsentient) getHandle()).getLeashHolder().getBukkitEntity(); } private boolean unleash() { if (!isLeashed()) { return false; } - ((EntityInsentient) getHandle()).a(true, false); + ((EntityInsentient) getHandle()).unleash(true, false); return true; } @@ -442,7 +442,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } unleash(); - ((EntityInsentient) getHandle()).b(((CraftEntity) holder).getHandle(), true); + ((EntityInsentient) getHandle()).setLeashHolder(((CraftEntity) holder).getHandle(), true); return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index d5d43c9a..ac732732 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1045,7 +1045,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void updateScaledHealth() { - AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().aW(); + AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().aX(); Set set = attributemapserver.b(); injectScaledMaxHealth(set, true); @@ -1070,6 +1070,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } continue; } - collection.add(new AttributeModifiable(getHandle().aW(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true))); + collection.add(new AttributeModifiable(getHandle().aX(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true))); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java index 97d266fc..18da4266 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java @@ -29,7 +29,7 @@ public class CraftThrownPotion extends CraftProjectile implements ThrownPotion { // We run this method once since it will set the item stack if there is none. getHandle().getPotionValue(); - return CraftItemStack.asBukkitCopy(getHandle().c); + return CraftItemStack.asBukkitCopy(getHandle().item); } public void setItem(ItemStack item) { @@ -39,7 +39,7 @@ public class CraftThrownPotion extends CraftProjectile implements ThrownPotion { // The ItemStack must be a potion. Validate.isTrue(item.getType() == Material.POTION, "ItemStack must be a potion. This item stack was " + item.getType() + "."); - getHandle().c = CraftItemStack.asNMSCopy(item); + getHandle().item = CraftItemStack.asNMSCopy(item); } @Override -- cgit v1.2.3