From 897551e39e0e24812acc0704e963d347dfa4a8ef Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Thu, 12 Jan 2012 15:27:39 +0000 Subject: [PATCH] Update to mc-dev rename revision 01 --- pom.xml | 2 +- src/main/java/net/minecraft/server/Block.java | 4 +- .../net/minecraft/server/BlockDispenser.java | 2 +- .../minecraft/server/BlockPressurePlate.java | 2 +- .../net/minecraft/server/BlockStairs.java | 4 +- .../minecraft/server/ChunkProviderServer.java | 8 +- .../java/net/minecraft/server/Entity.java | 14 +- .../net/minecraft/server/EntityArrow.java | 8 +- .../java/net/minecraft/server/EntityBoat.java | 2 +- .../minecraft/server/EntityEnderDragon.java | 14 +- .../net/minecraft/server/EntityEnderman.java | 2 +- .../net/minecraft/server/EntityFireball.java | 4 +- .../minecraft/server/EntityFishingHook.java | 4 +- .../net/minecraft/server/EntityGhast.java | 2 +- .../net/minecraft/server/EntityHuman.java | 4 +- .../net/minecraft/server/EntityLiving.java | 16 +-- .../net/minecraft/server/EntityMagmaCube.java | 2 +- .../net/minecraft/server/EntityMinecart.java | 2 +- .../net/minecraft/server/EntityPainting.java | 125 +++++++++--------- .../net/minecraft/server/EntityPigZombie.java | 4 +- .../net/minecraft/server/EntityPlayer.java | 24 ++-- .../net/minecraft/server/EntityPotion.java | 2 +- .../minecraft/server/EntityProjectile.java | 4 +- .../net/minecraft/server/EntitySkeleton.java | 2 +- .../net/minecraft/server/EntitySnowman.java | 2 +- .../net/minecraft/server/EntitySquid.java | 2 +- .../server/EntityWeatherLighting.java | 2 +- .../java/net/minecraft/server/EntityWolf.java | 4 +- .../java/net/minecraft/server/Explosion.java | 4 +- .../java/net/minecraft/server/ItemBoat.java | 4 +- .../minecraft/server/ItemInWorldManager.java | 6 +- .../net/minecraft/server/ItemPainting.java | 2 +- .../net/minecraft/server/ItemWorldMap.java | 6 +- .../net/minecraft/server/MinecraftServer.java | 8 +- .../net/minecraft/server/NetLoginHandler.java | 2 +- .../minecraft/server/NetServerHandler.java | 8 +- .../minecraft/server/Packet51MapChunk.java | 18 +-- .../server/ServerConfigurationManager.java | 16 +-- .../net/minecraft/server/SpawnerCreature.java | 2 +- .../server/TileEntityMobSpawner.java | 2 +- .../minecraft/server/TileEntityPiston.java | 2 +- src/main/java/net/minecraft/server/World.java | 14 +- .../net/minecraft/server/WorldNBTStorage.java | 4 +- .../craftbukkit/ChunkCompressionThread.java | 8 +- .../org/bukkit/craftbukkit/CraftChunk.java | 4 +- .../org/bukkit/craftbukkit/CraftServer.java | 4 +- .../org/bukkit/craftbukkit/CraftWorld.java | 6 +- .../bukkit/craftbukkit/block/CraftBlock.java | 2 +- .../craftbukkit/block/CraftJukebox.java | 6 +- .../CraftRemoteConsoleCommandSender.java | 2 +- .../craftbukkit/entity/CraftComplexPart.java | 3 +- .../craftbukkit/entity/CraftEnderDragon.java | 3 +- .../craftbukkit/entity/CraftEntity.java | 4 +- .../craftbukkit/entity/CraftLivingEntity.java | 3 +- .../craftbukkit/entity/CraftPainting.java | 52 ++++---- .../craftbukkit/entity/CraftPlayer.java | 14 +- .../generator/CustomChunkGenerator.java | 10 +- .../generator/NormalChunkGenerator.java | 8 +- .../bukkit/craftbukkit/map/CraftMapView.java | 2 +- 59 files changed, 246 insertions(+), 250 deletions(-) diff --git a/pom.xml b/pom.xml index 2c87d43ed3..a3918ba815 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ org.bukkit minecraft-server - 1.0.1 + 1.0.1_01 jar compile diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java index 99a483df48..d89b150080 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -465,7 +465,7 @@ public class Block { return vec3d == null ? false : vec3d.a >= this.minX && vec3d.a <= this.maxX && vec3d.b >= this.minY && vec3d.b <= this.maxY; } - public void a_(World world, int i, int j, int k) {} + public void wasExploded(World world, int i, int j, int k) {} public boolean canPlace(World world, int i, int j, int k, int l) { return this.canPlace(world, i, j, k); @@ -568,7 +568,7 @@ public class Block { } public int g() { - return this.material.l(); + return this.material.getPushReaction(); } static { diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java index 39833823e6..4b951cb404 100644 --- a/src/main/java/net/minecraft/server/BlockDispenser.java +++ b/src/main/java/net/minecraft/server/BlockDispenser.java @@ -145,7 +145,7 @@ public class BlockDispenser extends BlockContainer { if (itemstack.id == Item.ARROW.id) { EntityArrow entityarrow = new EntityArrow(world, d0, d1, d2); - entityarrow.a((double) b0, 0.10000000149011612D, (double) b1, 1.1F, 6.0F); + entityarrow.shoot((double) b0, 0.10000000149011612D, (double) b1, 1.1F, 6.0F); entityarrow.fromPlayer = true; world.addEntity(entityarrow); world.f(1002, i, j, k, 0); diff --git a/src/main/java/net/minecraft/server/BlockPressurePlate.java b/src/main/java/net/minecraft/server/BlockPressurePlate.java index 9c17c7e7b0..23c67ff9ca 100644 --- a/src/main/java/net/minecraft/server/BlockPressurePlate.java +++ b/src/main/java/net/minecraft/server/BlockPressurePlate.java @@ -80,7 +80,7 @@ public class BlockPressurePlate extends Block { List list = null; if (this.a == EnumMobType.EVERYTHING) { - list = world.b((Entity) null, AxisAlignedBB.b((double) ((float) i + f), (double) j, (double) ((float) k + f), (double) ((float) (i + 1) - f), (double) j + 0.25D, (double) ((float) (k + 1) - f))); + list = world.getEntities(null, AxisAlignedBB.b((double) ((float) i + f), (double) j, (double) ((float) k + f), (double) ((float) (i + 1) - f), (double) j + 0.25D, (double) ((float) (k + 1) - f))); } if (this.a == EnumMobType.MOBS) { diff --git a/src/main/java/net/minecraft/server/BlockStairs.java b/src/main/java/net/minecraft/server/BlockStairs.java index c19734009d..a7d7beceee 100644 --- a/src/main/java/net/minecraft/server/BlockStairs.java +++ b/src/main/java/net/minecraft/server/BlockStairs.java @@ -125,8 +125,8 @@ public class BlockStairs extends Block { return this.a.interact(world, i, j, k, entityhuman); } - public void a_(World world, int i, int j, int k) { - this.a.a_(world, i, j, k); + public void wasExploded(World world, int i, int j, int k) { + this.a.wasExploded(world, i, j, k); } public void postPlace(World world, int i, int j, int k, EntityLiving entityliving) { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java index 36351951ab..e96bb30e1e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -254,11 +254,11 @@ public class ChunkProviderServer implements IChunkProvider { return !this.world.savingDisabled; } - public List a(EnumCreatureType enumcreaturetype, int i, int j, int k) { - return this.chunkProvider.a(enumcreaturetype, i, j, k); + public List getMobsFor(EnumCreatureType enumcreaturetype, int i, int j, int k) { + return this.chunkProvider.getMobsFor(enumcreaturetype, i, j, k); } - public ChunkPosition a(World world, String s, int i, int j, int k) { - return this.chunkProvider.a(world, s, i, j, k); + public ChunkPosition findNearestMapFeature(World world, String s, int i, int j, int k) { + return this.chunkProvider.findNearestMapFeature(world, s, i, j, k); } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index fec6ac756e..2d04e111ed 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -358,7 +358,7 @@ public abstract class Entity { public boolean d(double d0, double d1, double d2) { AxisAlignedBB axisalignedbb = this.boundingBox.c(d0, d1, d2); - List list = this.world.getEntities(this, axisalignedbb); + List list = this.world.a(this, axisalignedbb); return list.size() > 0 ? false : !this.world.c(axisalignedbb); } @@ -394,7 +394,7 @@ public abstract class Entity { if (flag) { double d8; - for (d8 = 0.05D; d0 != 0.0D && this.world.getEntities(this, this.boundingBox.c(d0, -1.0D, 0.0D)).size() == 0; d5 = d0) { + for (d8 = 0.05D; d0 != 0.0D && this.world.a(this, this.boundingBox.c(d0, -1.0D, 0.0D)).size() == 0; d5 = d0) { if (d0 < d8 && d0 >= -d8) { d0 = 0.0D; } else if (d0 > 0.0D) { @@ -404,7 +404,7 @@ public abstract class Entity { } } - for (; d2 != 0.0D && this.world.getEntities(this, this.boundingBox.c(0.0D, -1.0D, d2)).size() == 0; d7 = d2) { + for (; d2 != 0.0D && this.world.a(this, this.boundingBox.c(0.0D, -1.0D, d2)).size() == 0; d7 = d2) { if (d2 < d8 && d2 >= -d8) { d2 = 0.0D; } else if (d2 > 0.0D) { @@ -415,7 +415,7 @@ public abstract class Entity { } } - List list = this.world.getEntities(this, this.boundingBox.a(d0, d1, d2)); + List list = this.world.a(this, this.boundingBox.a(d0, d1, d2)); for (int i = 0; i < list.size(); ++i) { d1 = ((AxisAlignedBB) list.get(i)).b(this.boundingBox, d1); @@ -469,7 +469,7 @@ public abstract class Entity { AxisAlignedBB axisalignedbb1 = this.boundingBox.clone(); this.boundingBox.b(axisalignedbb); - list = this.world.getEntities(this, this.boundingBox.a(d5, d1, d7)); + list = this.world.a(this, this.boundingBox.a(d5, d1, d7)); for (k = 0; k < list.size(); ++k) { d1 = ((AxisAlignedBB) list.get(k)).b(this.boundingBox, d1); @@ -717,7 +717,7 @@ public abstract class Entity { } public boolean i_() { - return this.world.a(this.boundingBox.b(0.0D, -0.4000000059604645D, 0.0D).shrink(0.0010D, 0.0010D, 0.0010D), Material.WATER, this); + return this.world.a(this.boundingBox.grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.0010D, 0.0010D, 0.0010D), Material.WATER, this); } public boolean a(Material material) { @@ -742,7 +742,7 @@ public abstract class Entity { } public boolean aA() { - return this.world.a(this.boundingBox.b(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA); + return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA); } public void a(float f, float f1, float f2) { diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index d4bfa92968..42fc7508c1 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -52,12 +52,12 @@ public class EntityArrow extends Entity { this.motX = (double) (-MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F)); this.motZ = (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F)); this.motY = (double) (-MathHelper.sin(this.pitch / 180.0F * 3.1415927F)); - this.a(this.motX, this.motY, this.motZ, f * 1.5F, 1.0F); + this.shoot(this.motX, this.motY, this.motZ, f * 1.5F, 1.0F); } protected void b() {} - public void a(double d0, double d1, double d2, float f, float f1) { + public void shoot(double d0, double d1, double d2, float f, float f1) { float f2 = MathHelper.a(d0 * d0 + d1 * d1 + d2 * d2); d0 /= (double) f2; @@ -133,7 +133,7 @@ public class EntityArrow extends Entity { } Entity entity = null; - List list = this.world.b((Entity) this, this.boundingBox.a(this.motX, this.motY, this.motZ).b(1.0D, 1.0D, 1.0D)); + List list = this.world.getEntities(this, this.boundingBox.a(this.motX, this.motY, this.motZ).grow(1.0D, 1.0D, 1.0D)); double d0 = 0.0D; int k; @@ -144,7 +144,7 @@ public class EntityArrow extends Entity { if (entity1.e_() && (entity1 != this.shooter || this.l >= 5)) { f1 = 0.3F; - AxisAlignedBB axisalignedbb1 = entity1.boundingBox.b((double) f1, (double) f1, (double) f1); + AxisAlignedBB axisalignedbb1 = entity1.boundingBox.grow((double) f1, (double) f1, (double) f1); MovingObjectPosition movingobjectposition1 = axisalignedbb1.a(vec3d, vec3d1); if (movingobjectposition1 != null) { diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java index 6ed6d9287c..347b0f3f6c 100644 --- a/src/main/java/net/minecraft/server/EntityBoat.java +++ b/src/main/java/net/minecraft/server/EntityBoat.java @@ -372,7 +372,7 @@ public class EntityBoat extends Entity { } // CraftBukkit end - List list = this.world.b((Entity) this, this.boundingBox.b(0.20000000298023224D, 0.0D, 0.20000000298023224D)); + List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D)); int l; if (list != null && list.size() > 0) { diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java index 7a44670699..c956dda130 100644 --- a/src/main/java/net/minecraft/server/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java @@ -20,7 +20,7 @@ public class EntityEnderDragon extends EntityComplex { public double c; public double[][] d = new double[64][3]; public int e = -1; - public EntityComplexPart[] f; + public EntityComplexPart[] children; public EntityComplexPart g; public EntityComplexPart h; public EntityComplexPart i; @@ -38,7 +38,7 @@ public class EntityEnderDragon extends EntityComplex { public EntityEnderDragon(World world) { super(world); - this.f = new EntityComplexPart[] { this.g = new EntityComplexPart(this, "head", 6.0F, 6.0F), this.h = new EntityComplexPart(this, "body", 8.0F, 8.0F), this.i = new EntityComplexPart(this, "tail", 4.0F, 4.0F), this.j = new EntityComplexPart(this, "tail", 4.0F, 4.0F), this.k = new EntityComplexPart(this, "tail", 4.0F, 4.0F), this.l = new EntityComplexPart(this, "wing", 4.0F, 4.0F), this.m = new EntityComplexPart(this, "wing", 4.0F, 4.0F)}; + this.children = new EntityComplexPart[] { this.g = new EntityComplexPart(this, "head", 6.0F, 6.0F), this.h = new EntityComplexPart(this, "body", 8.0F, 8.0F), this.i = new EntityComplexPart(this, "tail", 4.0F, 4.0F), this.j = new EntityComplexPart(this, "tail", 4.0F, 4.0F), this.k = new EntityComplexPart(this, "tail", 4.0F, 4.0F), this.l = new EntityComplexPart(this, "wing", 4.0F, 4.0F), this.m = new EntityComplexPart(this, "wing", 4.0F, 4.0F)}; this.t = 200; this.setHealth(this.t); this.texture = "/mob/enderdragon/ender.png"; @@ -286,9 +286,9 @@ public class EntityEnderDragon extends EntityComplex { } if (!this.world.isStatic && this.as == 0) { - this.a(this.world.b((Entity) this, this.l.boundingBox.b(4.0D, 2.0D, 4.0D).d(0.0D, -2.0D, 0.0D))); - this.a(this.world.b((Entity) this, this.m.boundingBox.b(4.0D, 2.0D, 4.0D).d(0.0D, -2.0D, 0.0D))); - this.b(this.world.b((Entity) this, this.g.boundingBox.b(1.0D, 1.0D, 1.0D))); + this.a(this.world.getEntities(this, this.l.boundingBox.grow(4.0D, 2.0D, 4.0D).d(0.0D, -2.0D, 0.0D))); + this.a(this.world.getEntities(this, this.m.boundingBox.grow(4.0D, 2.0D, 4.0D).d(0.0D, -2.0D, 0.0D))); + this.b(this.world.getEntities(this, this.g.boundingBox.grow(1.0D, 1.0D, 1.0D))); } double[] adouble = this.a(5, 1.0F); @@ -347,7 +347,7 @@ public class EntityEnderDragon extends EntityComplex { if (this.random.nextInt(10) == 0) { float f = 32.0F; - List list = this.world.a(EntityEnderCrystal.class, this.boundingBox.b((double) f, (double) f, (double) f)); + List list = this.world.a(EntityEnderCrystal.class, this.boundingBox.grow((double) f, (double) f, (double) f)); EntityEnderCrystal entityendercrystal = null; double d0 = Double.MAX_VALUE; Iterator iterator = list.iterator(); @@ -624,7 +624,7 @@ public class EntityEnderDragon extends EntityComplex { protected void ak() {} public Entity[] aG() { - return this.f; + return this.children; } public boolean e_() { diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java index a3d3da621e..67f68936f7 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -230,7 +230,7 @@ public class EntityEnderman extends EntityMonster { if (flag1) { this.setPosition(this.locX, this.locY, this.locZ); - if (this.world.getEntities(this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox)) { + if (this.world.a(this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox)) { flag = true; } } diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java index cd0955cb4c..667bf22173 100644 --- a/src/main/java/net/minecraft/server/EntityFireball.java +++ b/src/main/java/net/minecraft/server/EntityFireball.java @@ -101,7 +101,7 @@ public class EntityFireball extends Entity { } Entity entity = null; - List list = this.world.b((Entity) this, this.boundingBox.a(this.motX, this.motY, this.motZ).b(1.0D, 1.0D, 1.0D)); + List list = this.world.getEntities(this, this.boundingBox.a(this.motX, this.motY, this.motZ).grow(1.0D, 1.0D, 1.0D)); double d0 = 0.0D; for (int j = 0; j < list.size(); ++j) { @@ -109,7 +109,7 @@ public class EntityFireball extends Entity { if (entity1.e_() && (!entity1.a((Entity) this.shooter) || this.k >= 25)) { float f = 0.3F; - AxisAlignedBB axisalignedbb = entity1.boundingBox.b((double) f, (double) f, (double) f); + AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f); MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); if (movingobjectposition1 != null) { diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java index 5e099849a3..f3c544e7e4 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -161,7 +161,7 @@ public class EntityFishingHook extends Entity { } Entity entity = null; - List list = this.world.b((Entity) this, this.boundingBox.a(this.motX, this.motY, this.motZ).b(1.0D, 1.0D, 1.0D)); + List list = this.world.getEntities(this, this.boundingBox.a(this.motX, this.motY, this.motZ).grow(1.0D, 1.0D, 1.0D)); double d4 = 0.0D; double d5; @@ -171,7 +171,7 @@ public class EntityFishingHook extends Entity { if (entity1.e_() && (entity1 != this.owner || this.j >= 5)) { float f = 0.3F; - AxisAlignedBB axisalignedbb = entity1.boundingBox.b((double) f, (double) f, (double) f); + AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f); MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); if (movingobjectposition1 != null) { diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java index 119b9c87a6..3e22dc9699 100644 --- a/src/main/java/net/minecraft/server/EntityGhast.java +++ b/src/main/java/net/minecraft/server/EntityGhast.java @@ -174,7 +174,7 @@ public class EntityGhast extends EntityFlying implements IMonster { for (int i = 1; (double) i < d3; ++i) { axisalignedbb.d(d4, d5, d6); - if (this.world.getEntities(this, axisalignedbb).size() > 0) { + if (this.world.a(this, axisalignedbb).size() > 0) { return false; } } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java index 14d35021b2..b5fd582158 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -334,7 +334,7 @@ public abstract class EntityHuman extends EntityLiving { this.s += (f - this.s) * 0.4F; this.ax += (f1 - this.ax) * 0.8F; if (this.getHealth() > 0) { - List list = this.world.b((Entity) this, this.boundingBox.b(1.0D, 0.0D, 1.0D)); + List list = this.world.getEntities(this, this.boundingBox.grow(1.0D, 0.0D, 1.0D)); if (list != null) { for (int i = 0; i < list.size(); ++i) { @@ -653,7 +653,7 @@ public abstract class EntityHuman extends EntityLiving { } if (!(entityliving instanceof EntityHuman) || this.y()) { - List list = this.world.a(EntityWolf.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).b(16.0D, 4.0D, 16.0D)); + List list = this.world.a(EntityWolf.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).grow(16.0D, 4.0D, 16.0D)); Iterator iterator = list.iterator(); while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index 81eb857808..9682b8a225 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -56,7 +56,7 @@ public abstract class EntityLiving extends Entity { public float aC; public float aD; public float aE; - public EntityHuman aF = null; // CraftBukkit - prot to pub - "killer" + public EntityHuman killer = null; // CraftBukkit - prot to pub protected int aG = 0; public int aH = 0; public int aI = 0; @@ -200,7 +200,7 @@ public abstract class EntityLiving extends Entity { if (this.aG > 0) { --this.aG; } else { - this.aF = null; + this.killer = null; } this.aq(); @@ -213,7 +213,7 @@ public abstract class EntityLiving extends Entity { // CraftBukkit start public int getExpReward() { - int exp = a(this.aF); + int exp = a(this.killer); if (!this.world.isStatic && (this.aG > 0 || this.ac()) && !this.l()) { return exp; @@ -464,13 +464,13 @@ public abstract class EntityLiving extends Entity { if (entity != null) { if (entity instanceof EntityHuman) { this.aG = 60; - this.aF = (EntityHuman) entity; + this.killer = (EntityHuman) entity; } else if (entity instanceof EntityWolf) { EntityWolf entitywolf = (EntityWolf) entity; if (entitywolf.isTamed()) { this.aG = 60; - this.aF = null; + this.killer = null; } } } @@ -859,7 +859,7 @@ public abstract class EntityLiving extends Entity { --this.aK; this.setPosition(d0, d1, d2); this.c(this.yaw, this.pitch); - List list = this.world.getEntities(this, this.boundingBox.shrink(0.03125D, 0.0D, 0.03125D)); + List list = this.world.a(this, this.boundingBox.shrink(0.03125D, 0.0D, 0.03125D)); if (list.size() > 0) { double d4 = 0.0D; @@ -913,7 +913,7 @@ public abstract class EntityLiving extends Entity { this.a(this.aT, this.aU); this.ak = f; // MethodProfiler.a("push"); // CraftBukkit - not in production code - List list1 = this.world.b((Entity) this, this.boundingBox.b(0.20000000298023224D, 0.0D, 0.20000000298023224D)); + List list1 = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D)); if (list1 != null && list1.size() > 0) { for (int j = 0; j < list1.size(); ++j) { @@ -1076,7 +1076,7 @@ public abstract class EntityLiving extends Entity { public void an() {} public boolean g() { - return this.world.containsEntity(this.boundingBox) && this.world.getEntities(this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox); + return this.world.containsEntity(this.boundingBox) && this.world.a(this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox); } protected void ao() { diff --git a/src/main/java/net/minecraft/server/EntityMagmaCube.java b/src/main/java/net/minecraft/server/EntityMagmaCube.java index 9301a71bb7..aa11acd06e 100644 --- a/src/main/java/net/minecraft/server/EntityMagmaCube.java +++ b/src/main/java/net/minecraft/server/EntityMagmaCube.java @@ -10,7 +10,7 @@ public class EntityMagmaCube extends EntitySlime { } public boolean g() { - return this.world.difficulty > 0 && this.world.containsEntity(this.boundingBox) && this.world.getEntities(this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox); + return this.world.difficulty > 0 && this.world.containsEntity(this.boundingBox) && this.world.a(this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox); } protected int O() { diff --git a/src/main/java/net/minecraft/server/EntityMinecart.java b/src/main/java/net/minecraft/server/EntityMinecart.java index 4d755d0aa0..951b972d05 100644 --- a/src/main/java/net/minecraft/server/EntityMinecart.java +++ b/src/main/java/net/minecraft/server/EntityMinecart.java @@ -567,7 +567,7 @@ public class EntityMinecart extends Entity implements IInventory { } // CraftBukkit end - List list = this.world.b((Entity) this, this.boundingBox.b(0.20000000298023224D, 0.0D, 0.20000000298023224D)); + List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D)); if (list != null && list.size() > 0) { for (int l1 = 0; l1 < list.size(); ++l1) { diff --git a/src/main/java/net/minecraft/server/EntityPainting.java b/src/main/java/net/minecraft/server/EntityPainting.java index 98a2b6ee2f..51169030c7 100644 --- a/src/main/java/net/minecraft/server/EntityPainting.java +++ b/src/main/java/net/minecraft/server/EntityPainting.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.List; // CraftBukkit start -import org.bukkit.Bukkit; import org.bukkit.entity.Painting; import org.bukkit.event.painting.PaintingBreakByEntityEvent; import org.bukkit.event.painting.PaintingBreakEvent.RemoveCause; @@ -14,26 +13,26 @@ import org.bukkit.event.painting.PaintingBreakEvent; public class EntityPainting extends Entity { private int f; - public int a; - public int b; - public int c; - public int d; - public EnumArt e; + public int direction; + public int x; + public int y; + public int z; + public EnumArt art; public EntityPainting(World world) { super(world); this.f = 0; - this.a = 0; + this.direction = 0; this.height = 0.0F; this.b(0.5F, 0.5F); - this.e = EnumArt.values()[this.random.nextInt(EnumArt.values().length)]; // CraftBukkit - generate a non-null painting + this.art = EnumArt.values()[this.random.nextInt(EnumArt.values().length)]; // CraftBukkit - generate a non-null painting } public EntityPainting(World world, int i, int j, int k, int l) { this(world); - this.b = i; - this.c = j; - this.d = k; + this.x = i; + this.y = j; + this.z = k; ArrayList arraylist = new ArrayList(); EnumArt[] aenumart = EnumArt.values(); int i1 = aenumart.length; @@ -41,28 +40,28 @@ public class EntityPainting extends Entity { for (int j1 = 0; j1 < i1; ++j1) { EnumArt enumart = aenumart[j1]; - this.e = enumart; - this.b(l); - if (this.j()) { + this.art = enumart; + this.setDirection(l); + if (this.survives()) { arraylist.add(enumart); } } if (arraylist.size() > 0) { - this.e = (EnumArt) arraylist.get(this.random.nextInt(arraylist.size())); + this.art = (EnumArt) arraylist.get(this.random.nextInt(arraylist.size())); } - this.b(l); + this.setDirection(l); } protected void b() {} - public void b(int i) { - this.a = i; + public void setDirection(int i) { + this.direction = i; this.lastYaw = this.yaw = (float) (i * 90); - float f = (float) this.e.B; - float f1 = (float) this.e.C; - float f2 = (float) this.e.B; + float f = (float) this.art.B; + float f1 = (float) this.art.C; + float f2 = (float) this.art.B; if (i != 0 && i != 2) { f = 0.5F; @@ -73,9 +72,9 @@ public class EntityPainting extends Entity { f /= 32.0F; f1 /= 32.0F; f2 /= 32.0F; - float f3 = (float) this.b + 0.5F; - float f4 = (float) this.c + 0.5F; - float f5 = (float) this.d + 0.5F; + float f3 = (float) this.x + 0.5F; + float f4 = (float) this.y + 0.5F; + float f5 = (float) this.z + 0.5F; float f6 = 0.5625F; if (i == 0) { @@ -95,22 +94,22 @@ public class EntityPainting extends Entity { } if (i == 0) { - f3 -= this.c(this.e.B); + f3 -= this.c(this.art.B); } if (i == 1) { - f5 += this.c(this.e.B); + f5 += this.c(this.art.B); } if (i == 2) { - f3 += this.c(this.e.B); + f3 += this.c(this.art.B); } if (i == 3) { - f5 -= this.c(this.e.B); + f5 -= this.c(this.art.B); } - f4 += this.c(this.e.C); + f4 += this.c(this.art.C); this.setPosition((double) f3, (double) f4, (double) f5); float f7 = -0.00625F; @@ -124,7 +123,7 @@ public class EntityPainting extends Entity { public void w_() { if (this.f++ == 100 && !this.world.isStatic) { this.f = 0; - if (!this.j()) { + if (!this.survives()) { // CraftBukkit start Material material = this.world.getMaterial((int)this.locX, (int)this.locY, (int)this.locZ); RemoveCause cause; @@ -152,33 +151,33 @@ public class EntityPainting extends Entity { } } - public boolean j() { - if (this.world.getEntities(this, this.boundingBox).size() > 0) { + public boolean survives() { + if (this.world.a(this, this.boundingBox).size() > 0) { return false; } else { - int i = this.e.B / 16; - int j = this.e.C / 16; - int k = this.b; - int l = this.c; - int i1 = this.d; + int i = this.art.B / 16; + int j = this.art.C / 16; + int k = this.x; + int l = this.y; + int i1 = this.z; - if (this.a == 0) { - k = MathHelper.floor(this.locX - (double) ((float) this.e.B / 32.0F)); + if (this.direction == 0) { + k = MathHelper.floor(this.locX - (double) ((float) this.art.B / 32.0F)); } - if (this.a == 1) { - i1 = MathHelper.floor(this.locZ - (double) ((float) this.e.B / 32.0F)); + if (this.direction == 1) { + i1 = MathHelper.floor(this.locZ - (double) ((float) this.art.B / 32.0F)); } - if (this.a == 2) { - k = MathHelper.floor(this.locX - (double) ((float) this.e.B / 32.0F)); + if (this.direction == 2) { + k = MathHelper.floor(this.locX - (double) ((float) this.art.B / 32.0F)); } - if (this.a == 3) { - i1 = MathHelper.floor(this.locZ - (double) ((float) this.e.B / 32.0F)); + if (this.direction == 3) { + i1 = MathHelper.floor(this.locZ - (double) ((float) this.art.B / 32.0F)); } - l = MathHelper.floor(this.locY - (double) ((float) this.e.C / 32.0F)); + l = MathHelper.floor(this.locY - (double) ((float) this.art.C / 32.0F)); int j1; @@ -186,10 +185,10 @@ public class EntityPainting extends Entity { for (j1 = 0; j1 < j; ++j1) { Material material; - if (this.a != 0 && this.a != 2) { - material = this.world.getMaterial(this.b, l + j1, i1 + k1); + if (this.direction != 0 && this.direction != 2) { + material = this.world.getMaterial(this.x, l + j1, i1 + k1); } else { - material = this.world.getMaterial(k + k1, l + j1, this.d); + material = this.world.getMaterial(k + k1, l + j1, this.z); } if (!material.isBuildable()) { @@ -198,7 +197,7 @@ public class EntityPainting extends Entity { } } - List list = this.world.b((Entity) this, this.boundingBox); + List list = this.world.getEntities(this, this.boundingBox); for (j1 = 0; j1 < list.size(); ++j1) { if (list.get(j1) instanceof EntityPainting) { @@ -246,18 +245,18 @@ public class EntityPainting extends Entity { } public void b(NBTTagCompound nbttagcompound) { - nbttagcompound.setByte("Dir", (byte) this.a); - nbttagcompound.setString("Motive", this.e.A); - nbttagcompound.setInt("TileX", this.b); - nbttagcompound.setInt("TileY", this.c); - nbttagcompound.setInt("TileZ", this.d); + nbttagcompound.setByte("Dir", (byte) this.direction); + nbttagcompound.setString("Motive", this.art.A); + nbttagcompound.setInt("TileX", this.x); + nbttagcompound.setInt("TileY", this.y); + nbttagcompound.setInt("TileZ", this.z); } public void a(NBTTagCompound nbttagcompound) { - this.a = nbttagcompound.getByte("Dir"); - this.b = nbttagcompound.getInt("TileX"); - this.c = nbttagcompound.getInt("TileY"); - this.d = nbttagcompound.getInt("TileZ"); + this.direction = nbttagcompound.getByte("Dir"); + this.x = nbttagcompound.getInt("TileX"); + this.y = nbttagcompound.getInt("TileY"); + this.z = nbttagcompound.getInt("TileZ"); String s = nbttagcompound.getString("Motive"); EnumArt[] aenumart = EnumArt.values(); int i = aenumart.length; @@ -266,15 +265,15 @@ public class EntityPainting extends Entity { EnumArt enumart = aenumart[j]; if (enumart.A.equals(s)) { - this.e = enumart; + this.art = enumart; } } - if (this.e == null) { - this.e = EnumArt.KEBAB; + if (this.art == null) { + this.art = EnumArt.KEBAB; } - this.b(this.a); + this.setDirection(this.direction); } public void move(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/server/EntityPigZombie.java b/src/main/java/net/minecraft/server/EntityPigZombie.java index f773d065a1..ac081d4716 100644 --- a/src/main/java/net/minecraft/server/EntityPigZombie.java +++ b/src/main/java/net/minecraft/server/EntityPigZombie.java @@ -33,7 +33,7 @@ public class EntityPigZombie extends EntityZombie { } public boolean g() { - return this.world.difficulty > 0 && this.world.containsEntity(this.boundingBox) && this.world.getEntities(this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox); + return this.world.difficulty > 0 && this.world.containsEntity(this.boundingBox) && this.world.a(this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox); } public void b(NBTTagCompound nbttagcompound) { @@ -58,7 +58,7 @@ public class EntityPigZombie extends EntityZombie { Entity entity = damagesource.getEntity(); if (entity instanceof EntityHuman) { - List list = this.world.b((Entity) this, this.boundingBox.b(32.0D, 32.0D, 32.0D)); + List list = this.world.getEntities(this, this.boundingBox.grow(32.0D, 32.0D, 32.0D)); for (int j = 0; j < list.size(); ++j) { Entity entity1 = (Entity) list.get(j); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index d6811cd991..94d2facf80 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -27,12 +27,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private int cc = -99999999; private int cd = -99999999; private boolean ce = true; - public int cf = -99999999; // CraftBukkit - priv to pub - "lastSentExp" + public int lastSentExp = -99999999; // CraftBukkit - priv to pub public int cg = 60; // CraftBukkit - private to public; temporary until we get an API out private ItemStack[] ch = new ItemStack[] { null, null, null, null, null}; private int ci = 0; public boolean h; - public int i; + public int ping; public boolean j = false; public EntityPlayer(MinecraftServer minecraftserver, World world, String s, ItemInWorldManager iteminworldmanager) { @@ -70,14 +70,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); if (nbttagcompound.hasKey("playerGameType")) { - this.itemInWorldManager.a(nbttagcompound.getInt("playerGameType")); + this.itemInWorldManager.setGameMode(nbttagcompound.getInt("playerGameType")); } getPlayer().readExtraData(nbttagcompound); // CraftBukkit } public void b(NBTTagCompound nbttagcompound) { super.b(nbttagcompound); - nbttagcompound.setInt("playerGameType", this.itemInWorldManager.a()); + nbttagcompound.setInt("playerGameType", this.itemInWorldManager.getGameMode()); getPlayer().setExtraData(nbttagcompound); // CraftBukkit } @@ -102,16 +102,16 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.setPosition(position.x + 0.5, position.y, position.z + 0.5); } this.dimension = ((WorldServer) this.world).dimension; - int oldMode = itemInWorldManager.a(); + int oldMode = itemInWorldManager.getGameMode(); this.itemInWorldManager = new ItemInWorldManager((WorldServer) world); this.itemInWorldManager.player = this; - this.itemInWorldManager.a(oldMode); + this.itemInWorldManager.setGameMode(oldMode); // CraftBukkit end } public void levelDown(int i) { super.levelDown(i); - this.cf = -1; + this.lastSentExp = -1; } public void syncInventory() { @@ -281,7 +281,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.b.serverConfigurationManager.changeDimension(this, b0); - this.cf = -1; + this.lastSentExp = -1; this.cc = -1; this.cd = -1; this.a((Statistic) AchievementList.x); @@ -311,8 +311,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.ce = this.foodData.c() == 0.0F; } - if (this.expTotal != this.cf) { - this.cf = this.expTotal; + if (this.expTotal != this.lastSentExp) { + this.lastSentExp = this.expTotal; this.netServerHandler.sendPacket(new Packet43SetExperience(this.exp, this.expTotal, this.expLevel)); } } @@ -334,7 +334,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { // CraftBukkit end */ this.b.serverConfigurationManager.changeDimension(this, 1); - this.cf = -1; + this.lastSentExp = -1; this.cc = -1; this.cd = -1; } @@ -646,7 +646,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.deathTicks = 0; effects.clear(); this.activeContainer = this.defaultContainer; - this.cf = -1; // lastSentExp. Find line: "if (this.expTotal != this.XXXX) {" + this.lastSentExp = -1; // lastSentExp. Find line: "if (this.expTotal != this.XXXX) {" this.giveExp(this.newExp); } diff --git a/src/main/java/net/minecraft/server/EntityPotion.java b/src/main/java/net/minecraft/server/EntityPotion.java index 41247f5125..8a6241b8d8 100644 --- a/src/main/java/net/minecraft/server/EntityPotion.java +++ b/src/main/java/net/minecraft/server/EntityPotion.java @@ -42,7 +42,7 @@ public class EntityPotion extends EntityProjectile { List list = Item.POTION.b(this.d); if (list != null && !list.isEmpty()) { - AxisAlignedBB axisalignedbb = this.boundingBox.b(4.0D, 2.0D, 4.0D); + AxisAlignedBB axisalignedbb = this.boundingBox.grow(4.0D, 2.0D, 4.0D); List list1 = this.world.a(EntityLiving.class, axisalignedbb); if (list1 != null && !list1.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java index a0838515e8..dac092997d 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java @@ -125,7 +125,7 @@ public abstract class EntityProjectile extends Entity { if (!this.world.isStatic) { Entity entity = null; - List list = this.world.b((Entity) this, this.boundingBox.a(this.motX, this.motY, this.motZ).b(1.0D, 1.0D, 1.0D)); + List list = this.world.getEntities(this, this.boundingBox.a(this.motX, this.motY, this.motZ).grow(1.0D, 1.0D, 1.0D)); double d0 = 0.0D; for (int j = 0; j < list.size(); ++j) { @@ -133,7 +133,7 @@ public abstract class EntityProjectile extends Entity { if (entity1.e_() && (entity1 != this.shooter || this.i >= 5)) { float f = 0.3F; - AxisAlignedBB axisalignedbb = entity1.boundingBox.b((double) f, (double) f, (double) f); + AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f); MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); if (movingobjectposition1 != null) { diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java index 600809574b..2d15252eb6 100644 --- a/src/main/java/net/minecraft/server/EntitySkeleton.java +++ b/src/main/java/net/minecraft/server/EntitySkeleton.java @@ -78,7 +78,7 @@ public class EntitySkeleton extends EntityMonster { this.world.makeSound(this, "random.bow", 1.0F, 1.0F / (this.random.nextFloat() * 0.4F + 0.8F)); this.world.addEntity(entityarrow); - entityarrow.a(d0, d2 + (double) f1, d1, 1.6F, 12.0F); + entityarrow.shoot(d0, d2 + (double) f1, d1, 1.6F, 12.0F); this.attackTicks = 60; } diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java index a8d549e4a7..adbca34baf 100644 --- a/src/main/java/net/minecraft/server/EntitySnowman.java +++ b/src/main/java/net/minecraft/server/EntitySnowman.java @@ -18,7 +18,7 @@ public class EntitySnowman extends EntityGolem { public void d() { super.d(); if (this.target == null && !this.D() && this.world.random.nextInt(100) == 0) { - List list = this.world.a(EntityMonster.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).b(16.0D, 4.0D, 16.0D)); + List list = this.world.a(EntityMonster.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).grow(16.0D, 4.0D, 16.0D)); if (!list.isEmpty()) { this.setTarget((Entity) list.get(this.world.random.nextInt(list.size()))); diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java index f7766ee77b..abe5fd86c4 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -76,7 +76,7 @@ public class EntitySquid extends EntityWaterAnimal { } public boolean az() { - return this.world.a(this.boundingBox.b(0.0D, -0.6000000238418579D, 0.0D), Material.WATER, this); + return this.world.a(this.boundingBox.grow(0.0D, -0.6000000238418579D, 0.0D), Material.WATER, this); } public void d() { diff --git a/src/main/java/net/minecraft/server/EntityWeatherLighting.java b/src/main/java/net/minecraft/server/EntityWeatherLighting.java index 674988956b..8a19aa52fa 100644 --- a/src/main/java/net/minecraft/server/EntityWeatherLighting.java +++ b/src/main/java/net/minecraft/server/EntityWeatherLighting.java @@ -110,7 +110,7 @@ public class EntityWeatherLighting extends EntityWeather { if (this.lifeTicks >= 0 && !this.isEffect) { // CraftBukkit double d0 = 3.0D; - List list = this.world.b((Entity) this, AxisAlignedBB.b(this.locX - d0, this.locY - d0, this.locZ - d0, this.locX + d0, this.locY + 6.0D + d0, this.locZ + d0)); + List list = this.world.getEntities(this, AxisAlignedBB.b(this.locX - d0, this.locY - d0, this.locZ - d0, this.locX + d0, this.locY + 6.0D + d0, this.locZ + d0)); for (int l = 0; l < list.size(); ++l) { Entity entity = (Entity) list.get(l); diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java index 037906d0c4..c0ead7dd13 100644 --- a/src/main/java/net/minecraft/server/EntityWolf.java +++ b/src/main/java/net/minecraft/server/EntityWolf.java @@ -107,7 +107,7 @@ public class EntityWolf extends EntityAnimal { this.setSitting(true); } } else if (this.target == null && !this.D() && !this.isTamed() && this.world.random.nextInt(100) == 0) { - List list = this.world.a(EntitySheep.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).b(16.0D, 4.0D, 16.0D)); + List list = this.world.a(EntitySheep.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).grow(16.0D, 4.0D, 16.0D)); if (!list.isEmpty()) { // CraftBukkit start @@ -275,7 +275,7 @@ public class EntityWolf extends EntityAnimal { } if (entity instanceof EntityLiving) { - List list = this.world.a(EntityWolf.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).b(16.0D, 4.0D, 16.0D)); + List list = this.world.a(EntityWolf.class, AxisAlignedBB.b(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).grow(16.0D, 4.0D, 16.0D)); Iterator iterator = list.iterator(); while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index 7ceb116f5c..7370206bae 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -98,7 +98,7 @@ public class Explosion { int l1 = MathHelper.floor(this.posY + (double) this.size + 1.0D); int i2 = MathHelper.floor(this.posZ - (double) this.size - 1.0D); int j2 = MathHelper.floor(this.posZ + (double) this.size + 1.0D); - List list = this.world.b(this.source, AxisAlignedBB.b((double) i, (double) k, (double) i2, (double) j, (double) l1, (double) j2)); + List list = this.world.getEntities(this.source, AxisAlignedBB.b((double) i, (double) k, (double) i2, (double) j, (double) l1, (double) j2)); Vec3D vec3d = Vec3D.create(this.posX, this.posY, this.posZ); for (int k2 = 0; k2 < list.size(); ++k2) { @@ -243,7 +243,7 @@ public class Explosion { // CraftBukkit Block.byId[i1].dropNaturally(this.world, j, k, l, this.world.getData(j, k, l), event.getYield(), 0); this.world.setTypeId(j, k, l, 0); - Block.byId[i1].a_(this.world, j, k, l); + Block.byId[i1].wasExploded(this.world, j, k, l); } } diff --git a/src/main/java/net/minecraft/server/ItemBoat.java b/src/main/java/net/minecraft/server/ItemBoat.java index 1bb9970410..d31131b865 100644 --- a/src/main/java/net/minecraft/server/ItemBoat.java +++ b/src/main/java/net/minecraft/server/ItemBoat.java @@ -39,14 +39,14 @@ public class ItemBoat extends Item { Vec3D vec3d2 = entityhuman.d(f); boolean flag = false; float f9 = 1.0F; - List list = world.b((Entity) entityhuman, entityhuman.boundingBox.a(vec3d2.a * d3, vec3d2.b * d3, vec3d2.c * d3).b((double) f9, (double) f9, (double) f9)); + List list = world.getEntities(entityhuman, entityhuman.boundingBox.a(vec3d2.a * d3, vec3d2.b * d3, vec3d2.c * d3).grow((double) f9, (double) f9, (double) f9)); for (int i = 0; i < list.size(); ++i) { Entity entity = (Entity) list.get(i); if (entity.e_()) { float f10 = entity.j_(); - AxisAlignedBB axisalignedbb = entity.boundingBox.b((double) f10, (double) f10, (double) f10); + AxisAlignedBB axisalignedbb = entity.boundingBox.grow((double) f10, (double) f10, (double) f10); if (axisalignedbb.a(vec3d)) { flag = true; diff --git a/src/main/java/net/minecraft/server/ItemInWorldManager.java b/src/main/java/net/minecraft/server/ItemInWorldManager.java index a1183c0ede..af8a27e443 100644 --- a/src/main/java/net/minecraft/server/ItemInWorldManager.java +++ b/src/main/java/net/minecraft/server/ItemInWorldManager.java @@ -36,7 +36,7 @@ public class ItemInWorldManager { } // CraftBukkit end - public void a(int i) { + public void setGameMode(int i) { this.c = i; if (i == 0) { this.player.abilities.canFly = false; @@ -50,7 +50,7 @@ public class ItemInWorldManager { } } - public int a() { + public int getGameMode() { return this.c; } @@ -63,7 +63,7 @@ public class ItemInWorldManager { this.c = i; } - this.a(this.c); + this.setGameMode(this.c); } public void c() { diff --git a/src/main/java/net/minecraft/server/ItemPainting.java b/src/main/java/net/minecraft/server/ItemPainting.java index 445f53e22f..52f036b1a7 100644 --- a/src/main/java/net/minecraft/server/ItemPainting.java +++ b/src/main/java/net/minecraft/server/ItemPainting.java @@ -37,7 +37,7 @@ public class ItemPainting extends Item { } else { EntityPainting entitypainting = new EntityPainting(world, i, j, k, b0); - if (entitypainting.j()) { + if (entitypainting.survives()) { if (!world.isStatic) { // CraftBukkit start Player who = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity(); diff --git a/src/main/java/net/minecraft/server/ItemWorldMap.java b/src/main/java/net/minecraft/server/ItemWorldMap.java index c93ab32ce0..813f1d7f15 100644 --- a/src/main/java/net/minecraft/server/ItemWorldMap.java +++ b/src/main/java/net/minecraft/server/ItemWorldMap.java @@ -12,7 +12,7 @@ public class ItemWorldMap extends ItemWorldMapBase { this.e(1); } - public WorldMap a(ItemStack itemstack, World world) { + public WorldMap getSavedMap(ItemStack itemstack, World world) { WorldMap worldmap = (WorldMap) world.a(WorldMap.class, "map_" + itemstack.getData()); @@ -210,7 +210,7 @@ public class ItemWorldMap extends ItemWorldMapBase { public void a(ItemStack itemstack, World world, Entity entity, int i, boolean flag) { if (!world.isStatic) { - WorldMap worldmap = this.a(itemstack, world); + WorldMap worldmap = this.getSavedMap(itemstack, world); if (entity instanceof EntityHuman) { EntityHuman entityhuman = (EntityHuman) entity; @@ -238,7 +238,7 @@ public class ItemWorldMap extends ItemWorldMapBase { } public Packet c(ItemStack itemstack, World world, EntityHuman entityhuman) { - byte[] abyte = this.a(itemstack, world).getUpdatePacket(itemstack, world, entityhuman); + byte[] abyte = this.getSavedMap(itemstack, world).getUpdatePacket(itemstack, world, entityhuman); return abyte == null ? null : new Packet131ItemData((short) Item.MAP.id, (short) itemstack.getData(), abyte); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index c2166c0d5e..e37b56dec3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -699,15 +699,15 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe public void o() {} public String d(String s) { - RemoteControlCommandListener.a.a(); + RemoteControlCommandListener.instance.a(); // CraftBukkit start ServerCommandEvent event = new ServerCommandEvent(Event.Type.REMOTE_COMMAND, this.remoteConsole, s); this.server.getPluginManager().callEvent(event); - ServerCommand servercommand = new ServerCommand(event.getCommand(), RemoteControlCommandListener.a); - // this.consoleCommandHandler.handle(new ServerCommand(s, RemoteControlCommandListener.a)); // CraftBukkit - removed + ServerCommand servercommand = new ServerCommand(event.getCommand(), RemoteControlCommandListener.instance); + // this.consoleCommandHandler.handle(new ServerCommand(s, RemoteControlCommandListener.instance)); // CraftBukkit - removed this.server.dispatchCommand(this.remoteConsole, servercommand); // CraftBukkit // CraftBukkit end - return RemoteControlCommandListener.a.b(); + return RemoteControlCommandListener.instance.b(); } public boolean isDebugging() { diff --git a/src/main/java/net/minecraft/server/NetLoginHandler.java b/src/main/java/net/minecraft/server/NetLoginHandler.java index 073f5e2c7b..60d3487747 100644 --- a/src/main/java/net/minecraft/server/NetLoginHandler.java +++ b/src/main/java/net/minecraft/server/NetLoginHandler.java @@ -104,7 +104,7 @@ public class NetLoginHandler extends NetHandler { if (maxPlayers > 60) { maxPlayers = 60; } - netserverhandler.sendPacket(new Packet1Login("", entityplayer.id, worldserver.getSeed(), entityplayer.itemInWorldManager.a(), (byte) worldserver.worldProvider.dimension, (byte) worldserver.difficulty, (byte) worldserver.height, (byte) maxPlayers)); + netserverhandler.sendPacket(new Packet1Login("", entityplayer.id, worldserver.getSeed(), entityplayer.itemInWorldManager.getGameMode(), (byte) worldserver.worldProvider.dimension, (byte) worldserver.difficulty, (byte) worldserver.height, (byte) maxPlayers)); // CraftBukkit end netserverhandler.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z)); diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 396d68cb85..4f0a22c2f7 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -323,7 +323,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener { } float f4 = 0.0625F; - boolean flag = worldserver.getEntities(this.player, this.player.boundingBox.clone().shrink((double) f4, (double) f4, (double) f4)).size() == 0; + boolean flag = worldserver.a(this.player, this.player.boundingBox.clone().shrink((double) f4, (double) f4, (double) f4)).size() == 0; if (this.player.onGround && !packet10flying.g && d6 > 0.0D) { this.player.c(0.2F); @@ -352,14 +352,14 @@ public class NetServerHandler extends NetHandler implements ICommandListener { } this.player.setLocation(d1, d2, d3, f2, f3); - boolean flag2 = worldserver.getEntities(this.player, this.player.boundingBox.clone().shrink((double) f4, (double) f4, (double) f4)).size() == 0; + boolean flag2 = worldserver.a(this.player, this.player.boundingBox.clone().shrink((double) f4, (double) f4, (double) f4)).size() == 0; if (flag && (flag1 || !flag2) && !this.player.isSleeping()) { this.a(this.x, this.y, this.z, f2, f3); return; } - AxisAlignedBB axisalignedbb = this.player.boundingBox.clone().b((double) f4, (double) f4, (double) f4).a(0.0D, -0.55D, 0.0D); + AxisAlignedBB axisalignedbb = this.player.boundingBox.clone().grow((double) f4, (double) f4, (double) f4).a(0.0D, -0.55D, 0.0D); if (!this.minecraftServer.allowFlight && !this.player.itemInWorldManager.b() && !worldserver.b(axisalignedbb)) { if (d9 >= -0.03125D) { @@ -1086,7 +1086,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener { if (packet0keepalive.a == this.i) { int i = (int) (System.nanoTime() / 1000000L - this.j); - this.player.i = (this.player.i * 3 + i) / 4; + this.player.ping = (this.player.ping * 3 + i) / 4; } } diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java index 5bfd2fe5f3..cdc911888b 100644 --- a/src/main/java/net/minecraft/server/Packet51MapChunk.java +++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java @@ -15,8 +15,8 @@ public class Packet51MapChunk extends Packet { public int d; public int e; public int f; - public byte[] g; - public int h; // CraftBukkit - private -> public + public byte[] buffer; + public int size; // CraftBukkit - private -> public public byte[] rawData; // CraftBukkit public Packet51MapChunk() { @@ -59,17 +59,17 @@ public class Packet51MapChunk extends Packet { this.d = datainputstream.read() + 1; this.e = datainputstream.read() + 1; this.f = datainputstream.read() + 1; - this.h = datainputstream.readInt(); - byte[] abyte = new byte[this.h]; + this.size = datainputstream.readInt(); + byte[] abyte = new byte[this.size]; datainputstream.readFully(abyte); - this.g = new byte[this.d * this.e * this.f * 5 / 2]; + this.buffer = new byte[this.d * this.e * this.f * 5 / 2]; Inflater inflater = new Inflater(); inflater.setInput(abyte); try { - inflater.inflate(this.g); + inflater.inflate(this.buffer); } catch (DataFormatException dataformatexception) { throw new IOException("Bad compressed data format"); } finally { @@ -84,8 +84,8 @@ public class Packet51MapChunk extends Packet { dataoutputstream.write(this.d - 1); dataoutputstream.write(this.e - 1); dataoutputstream.write(this.f - 1); - dataoutputstream.writeInt(this.h); - dataoutputstream.write(this.g, 0, this.h); + dataoutputstream.writeInt(this.size); + dataoutputstream.write(this.buffer, 0, this.size); } public void a(NetHandler nethandler) { @@ -93,6 +93,6 @@ public class Packet51MapChunk extends Packet { } public int a() { - return 17 + this.h; + return 17 + this.size; } } diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index ef1dff1ee5..0213adc89c 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -107,7 +107,7 @@ public class ServerConfigurationManager { } public void b(EntityPlayer entityplayer) { - this.playerFileData.b(entityplayer); + this.playerFileData.load(entityplayer); } public void c(EntityPlayer entityplayer) { @@ -120,7 +120,7 @@ public class ServerConfigurationManager { worldserver.chunkProviderServer.getChunkAt((int) entityplayer.locX >> 4, (int) entityplayer.locZ >> 4); - while (worldserver.getEntities(entityplayer, entityplayer.boundingBox).size() != 0) { + while (worldserver.a(entityplayer, entityplayer.boundingBox).size() != 0) { entityplayer.setPosition(entityplayer.locX, entityplayer.locY + 1.0D, entityplayer.locZ); } @@ -142,7 +142,7 @@ public class ServerConfigurationManager { EntityPlayer entityplayer1 = (EntityPlayer) this.players.get(i); // CraftBukkit start - .name -> .listName - entityplayer.netServerHandler.sendPacket(new Packet201PlayerInfo(entityplayer1.listName, true, entityplayer1.i)); + entityplayer.netServerHandler.sendPacket(new Packet201PlayerInfo(entityplayer1.listName, true, entityplayer1.ping)); // CraftBukkit end } } @@ -161,7 +161,7 @@ public class ServerConfigurationManager { this.cserver.getPluginManager().callEvent(playerQuitEvent); // CraftBukkit end - this.playerFileData.a(entityplayer); + this.playerFileData.save(entityplayer); this.server.getWorldServer(entityplayer.dimension).kill(entityplayer); this.players.remove(entityplayer); this.getPlayerManager(entityplayer.dimension).removePlayer(entityplayer); @@ -272,13 +272,13 @@ public class ServerConfigurationManager { worldserver.chunkProviderServer.getChunkAt((int) entityplayer1.locX >> 4, (int) entityplayer1.locZ >> 4); - while (worldserver.getEntities(entityplayer1, entityplayer1.boundingBox).size() != 0) { + while (worldserver.a(entityplayer1, entityplayer1.boundingBox).size() != 0) { entityplayer1.setPosition(entityplayer1.locX, entityplayer1.locY + 1.0D, entityplayer1.locZ); } // CraftBukkit start byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId()); - entityplayer1.netServerHandler.sendPacket(new Packet9Respawn(actualDimension, (byte) worldserver.difficulty, worldserver.getSeed(), worldserver.height, entityplayer1.itemInWorldManager.a())); + entityplayer1.netServerHandler.sendPacket(new Packet9Respawn(actualDimension, (byte) worldserver.difficulty, worldserver.getSeed(), worldserver.height, entityplayer1.itemInWorldManager.getGameMode())); entityplayer1.spawnIn(worldserver); entityplayer1.dead = false; entityplayer1.netServerHandler.teleport(new Location(worldserver.getWorld(), entityplayer1.locX, entityplayer1.locY, entityplayer1.locZ, entityplayer1.yaw, entityplayer1.pitch)); @@ -671,7 +671,7 @@ public class ServerConfigurationManager { public void savePlayers() { for (int i = 0; i < this.players.size(); ++i) { - this.playerFileData.a((EntityHuman) this.players.get(i)); + this.playerFileData.save((EntityHuman) this.players.get(i)); } } @@ -705,7 +705,7 @@ public class ServerConfigurationManager { public void updateClient(EntityPlayer entityplayer) { entityplayer.updateInventory(entityplayer.defaultContainer); entityplayer.s_(); - entityplayer.cf = -1; // CraftBukkit + entityplayer.lastSentExp = -1; // CraftBukkit } public int getPlayerCount() { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java index 21b43691a8..61bd30bac3 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -197,7 +197,7 @@ public final class SpawnerCreature { } public static void a(World world, BiomeBase biomebase, int i, int j, int k, int l, Random random) { - List list = biomebase.a(EnumCreatureType.CREATURE); + List list = biomebase.getMobs(EnumCreatureType.CREATURE); if (!list.isEmpty()) { while (random.nextFloat() < biomebase.d()) { diff --git a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java index 40acc4d86b..cdc8fbd545 100644 --- a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java +++ b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java @@ -63,7 +63,7 @@ public class TileEntityMobSpawner extends TileEntity { } // CraftBukkit end - int j = this.world.a(entityliving.getClass(), AxisAlignedBB.b((double) this.x, (double) this.y, (double) this.z, (double) (this.x + 1), (double) (this.y + 1), (double) (this.z + 1)).b(8.0D, 4.0D, 8.0D)).size(); + int j = this.world.a(entityliving.getClass(), AxisAlignedBB.b((double) this.x, (double) this.y, (double) this.z, (double) (this.x + 1), (double) (this.y + 1), (double) (this.z + 1)).grow(8.0D, 4.0D, 8.0D)).size(); if (j >= 6) { this.e(); diff --git a/src/main/java/net/minecraft/server/TileEntityPiston.java b/src/main/java/net/minecraft/server/TileEntityPiston.java index b9675126d1..ffc3286bd7 100644 --- a/src/main/java/net/minecraft/server/TileEntityPiston.java +++ b/src/main/java/net/minecraft/server/TileEntityPiston.java @@ -59,7 +59,7 @@ public class TileEntityPiston extends TileEntity { AxisAlignedBB axisalignedbb = Block.PISTON_MOVING.b(this.world, this.x, this.y, this.z, this.a, f, this.c); if (axisalignedbb != null) { - List list = this.world.b((Entity) null, axisalignedbb); + List list = this.world.getEntities(null, axisalignedbb); if (!list.isEmpty()) { h.addAll(list); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 952113a42c..f45457ada1 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -960,7 +960,7 @@ public class World implements IBlockAccess { this.z.add(iworldaccess); } - public List getEntities(Entity entity, AxisAlignedBB axisalignedbb) { + public List a(Entity entity, AxisAlignedBB axisalignedbb) { this.R.clear(); int i = MathHelper.floor(axisalignedbb.a); int j = MathHelper.floor(axisalignedbb.d + 1.0D); @@ -984,7 +984,7 @@ public class World implements IBlockAccess { } double d0 = 0.25D; - List list = this.b(entity, axisalignedbb.b(d0, d0, d0)); + List list = this.getEntities(entity, axisalignedbb.grow(d0, d0, d0)); for (int j2 = 0; j2 < list.size(); ++j2) { AxisAlignedBB axisalignedbb1 = ((Entity) list.get(j2)).h_(); @@ -1305,7 +1305,7 @@ public class World implements IBlockAccess { } public boolean containsEntity(AxisAlignedBB axisalignedbb) { - List list = this.b((Entity) null, axisalignedbb); + List list = this.getEntities(null, axisalignedbb); for (int i = 0; i < list.size(); ++i) { Entity entity = (Entity) list.get(i); @@ -2356,7 +2356,7 @@ public class World implements IBlockAccess { return arraylist; } - public List b(Entity entity, AxisAlignedBB axisalignedbb) { + public List getEntities(Entity entity, AxisAlignedBB axisalignedbb) { this.V.clear(); int i = MathHelper.floor((axisalignedbb.a - 2.0D) / 16.0D); int j = MathHelper.floor((axisalignedbb.d + 2.0D) / 16.0D); @@ -2802,7 +2802,7 @@ public class World implements IBlockAccess { } public WorldMapBase a(Class oclass, String s) { - return this.worldMaps.a(oclass, s); + return this.worldMaps.get(oclass, s); } public int b(String s) { @@ -2833,13 +2833,13 @@ public class World implements IBlockAccess { public void a(EnumSkyBlock enumskyblock, int i, int j, int k, int l, int i1, int j1) {} public BiomeMeta a(EnumCreatureType enumcreaturetype, int i, int j, int k) { - List list = this.p().a(enumcreaturetype, i, j, k); + List list = this.p().getMobsFor(enumcreaturetype, i, j, k); return list != null && !list.isEmpty() ? (BiomeMeta) WeightedRandom.a(this.random, (Collection) list) : null; } public ChunkPosition b(String s, int i, int j, int k) { - return this.p().a(this, s, i, j, k); + return this.p().findNearestMapFeature(this, s, i, j, k); } // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java index 017575f22e..b0e0bcad5e 100644 --- a/src/main/java/net/minecraft/server/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java @@ -180,7 +180,7 @@ public class WorldNBTStorage implements PlayerFileData, IDataManager { } } - public void a(EntityHuman entityhuman) { + public void save(EntityHuman entityhuman) { try { NBTTagCompound nbttagcompound = new NBTTagCompound(); @@ -199,7 +199,7 @@ public class WorldNBTStorage implements PlayerFileData, IDataManager { } } - public void b(EntityHuman entityhuman) { + public void load(EntityHuman entityhuman) { NBTTagCompound nbttagcompound = this.getPlayerData(entityhuman.name); if (nbttagcompound != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/ChunkCompressionThread.java b/src/main/java/org/bukkit/craftbukkit/ChunkCompressionThread.java index 9f9cd483e8..dcab889bcf 100644 --- a/src/main/java/org/bukkit/craftbukkit/ChunkCompressionThread.java +++ b/src/main/java/org/bukkit/craftbukkit/ChunkCompressionThread.java @@ -57,7 +57,7 @@ public final class ChunkCompressionThread implements Runnable { Packet51MapChunk packet = (Packet51MapChunk) queuedPacket.packet; // If 'packet.g' is set then this packet has already been compressed. - if (packet.g != null) { + if (packet.buffer != null) { return; } @@ -76,9 +76,9 @@ public final class ChunkCompressionThread implements Runnable { } // copy compressed data to packet - packet.g = new byte[size]; - packet.h = size; - System.arraycopy(deflateBuffer, 0, packet.g, 0, size); + packet.buffer = new byte[size]; + packet.size = size; + System.arraycopy(deflateBuffer, 0, packet.buffer, 0, size); } private void sendToNetworkQueue(QueuedPacket queuedPacket) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 3e9fcac93b..c7aed33045 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -148,7 +148,7 @@ public class CraftChunk implements Chunk { if (includeBiome) { biome = new BiomeBase[256]; - wcm.a(biome, x << 4, z << 4, 16, 16); + wcm.getBiomeBlock(biome, x << 4, z << 4, 16, 16); } if (includeBiomeTempRain) { @@ -205,7 +205,7 @@ public class CraftChunk implements Chunk { if (includeBiome) { biome = new BiomeBase[256]; - wcm.a(biome, x << 4, z << 4, 16, 16); + wcm.getBiomeBlock(biome, x << 4, z << 4, 16, 16); } if (includeBiomeTempRain) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 9709a72fde..467f360336 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -783,7 +783,7 @@ public final class CraftServer implements Server { public CraftMapView getMap(short id) { WorldMapCollection collection = console.worlds.get(0).worldMaps; - WorldMap worldmap = (WorldMap) collection.a(WorldMap.class, "map_" + id); + WorldMap worldmap = (WorldMap) collection.get(WorldMap.class, "map_" + id); if (worldmap == null) { return null; } @@ -792,7 +792,7 @@ public final class CraftServer implements Server { public CraftMapView createMap(World world) { ItemStack stack = new ItemStack(Item.MAP, 1, -1); - WorldMap worldmap = Item.MAP.a(stack, ((CraftWorld) world).getHandle()); + WorldMap worldmap = Item.MAP.getSavedMap(stack, ((CraftWorld) world).getHandle()); return worldmap.mapView; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index b1ee1cb670..270149d343 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -319,7 +319,7 @@ public class CraftWorld implements World { EntityArrow arrow = new EntityArrow(world); arrow.setPositionRotation(loc.getX(), loc.getY(), loc.getZ(), 0, 0); world.addEntity(arrow); - arrow.a(velocity.getX(), velocity.getY(), velocity.getZ(), speed, spread); + arrow.shoot(velocity.getX(), velocity.getY(), velocity.getZ(), speed, spread); return (Arrow) arrow.getBukkitEntity(); } @@ -802,7 +802,7 @@ public class CraftWorld implements World { break; } entity = new EntityPainting(world, (int) x, (int) y, (int) z, dir); - if (!((EntityPainting) entity).j()) { + if (!((EntityPainting) entity).survives()) { entity = null; } } else if (TNTPrimed.class.isAssignableFrom(clazz)) { @@ -917,6 +917,6 @@ public class CraftWorld implements World { block.setType(org.bukkit.Material.AIR); // not sure what this does, seems to have something to do with the 'base' material of a block. // For example, WOODEN_STAIRS does something with WOOD in this method - net.minecraft.server.Block.byId[blockId].a_(this.world, blockX, blockY, blockZ); + net.minecraft.server.Block.byId[blockId].wasExploded(this.world, blockX, blockY, blockZ); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 1cf5ae7c3d..cad90ff30b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -325,7 +325,7 @@ public class CraftBlock implements Block { } public PistonMoveReaction getPistonMoveReaction() { - return PistonMoveReaction.getById(net.minecraft.server.Block.byId[this.getTypeId()].material.l()); + return PistonMoveReaction.getById(net.minecraft.server.Block.byId[this.getTypeId()].material.getPushReaction()); } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java index b81afd7b12..576e7d759f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java @@ -21,14 +21,14 @@ public class CraftJukebox extends CraftBlockState implements Jukebox { } public Material getPlaying() { - return Material.getMaterial(jukebox.a); + return Material.getMaterial(jukebox.record); } public void setPlaying(Material record) { if (record == null) { record = Material.AIR; } - jukebox.a = record.getId(); + jukebox.record = record.getId(); jukebox.update(); if (record == Material.AIR) { world.getHandle().setData(getX(), getY(), getZ(), 0); @@ -44,7 +44,7 @@ public class CraftJukebox extends CraftBlockState implements Jukebox { public boolean eject() { boolean result = isPlaying(); - ((BlockJukeBox)net.minecraft.server.Block.JUKEBOX).c_(world.getHandle(), getX(), getY(), getZ()); + ((BlockJukeBox)net.minecraft.server.Block.JUKEBOX).dropRecord(world.getHandle(), getX(), getY(), getZ()); return result; } } diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java index f0754102d2..dd6eab614a 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java +++ b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java @@ -9,7 +9,7 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme } public void sendMessage(String message) { - RemoteControlCommandListener.a.sendMessage(message + "\n"); // Send a newline after each message, to preserve formatting. + RemoteControlCommandListener.instance.sendMessage(message + "\n"); // Send a newline after each message, to preserve formatting. } public String getName() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java index 13ebd70b9b..77b1fcb54c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java @@ -1,6 +1,5 @@ package org.bukkit.craftbukkit.entity; -import net.minecraft.server.Entity; import net.minecraft.server.EntityComplexPart; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.ComplexEntityPart; @@ -12,7 +11,7 @@ public class CraftComplexPart extends CraftEntity implements ComplexEntityPart { } public ComplexLivingEntity getParent() { - return (ComplexLivingEntity) getHandle().a.getBukkitEntity(); + return (ComplexLivingEntity) getHandle().owner.getBukkitEntity(); } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java index 0c595ea106..98357be2ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java @@ -5,7 +5,6 @@ import com.google.common.collect.ImmutableSet.Builder; import java.util.Set; import net.minecraft.server.EntityComplexPart; import net.minecraft.server.EntityEnderDragon; -import net.minecraft.server.EntityLiving; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.ComplexEntityPart; import org.bukkit.entity.EnderDragon; @@ -18,7 +17,7 @@ public class CraftEnderDragon extends CraftComplexLivingEntity implements EnderD public Set getParts() { Builder builder = ImmutableSet.builder(); - for (EntityComplexPart part : getHandle().f) { + for (EntityComplexPart part : getHandle().children) { builder.add((ComplexEntityPart) part.getBukkitEntity()); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 8701d4b74a..8727cd14fa 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -96,7 +96,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } else if (entity instanceof EntityComplexPart) { EntityComplexPart part = (EntityComplexPart) entity; - if (part.a instanceof EntityEnderDragon) { return new CraftEnderDragonPart(server, (EntityComplexPart) entity); } + if (part.owner instanceof EntityEnderDragon) { return new CraftEnderDragonPart(server, (EntityComplexPart) entity); } else { return new CraftComplexPart(server, (EntityComplexPart) entity); } } else if (entity instanceof EntityExperienceOrb) { return new CraftExperienceOrb(server, (EntityExperienceOrb) entity); } @@ -173,7 +173,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public List getNearbyEntities(double x, double y, double z) { @SuppressWarnings("unchecked") - List notchEntityList = entity.world.b(entity, entity.boundingBox.b(x, y, z)); + List notchEntityList = entity.world.getEntities(entity, entity.boundingBox.grow(x, y, z)); List bukkitEntityList = new java.util.ArrayList(notchEntityList.size()); for (Entity e: notchEntityList) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index baf7ee5f17..6cbf0158b4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -25,7 +25,6 @@ import java.util.HashSet; import java.util.ArrayList; import java.util.Iterator; import net.minecraft.server.DamageSource; -import net.minecraft.server.EntityHuman; import org.bukkit.entity.HumanEntity; public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -227,6 +226,6 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } public Player getKiller() { - return getHandle().aF == null ? null : (Player)getHandle().aF.getBukkitEntity(); + return getHandle().killer == null ? null : (Player)getHandle().killer.getBukkitEntity(); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java index 640cb86248..3634b85ddf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java @@ -21,7 +21,7 @@ public class CraftPainting extends CraftEntity implements Painting { } public Art getArt() { - EnumArt art = getHandle().e; + EnumArt art = getHandle().art; return CraftArt.NotchToBukkit(art); } @@ -31,14 +31,14 @@ public class CraftPainting extends CraftEntity implements Painting { public boolean setArt(Art art, boolean force) { EntityPainting painting = this.getHandle(); - EnumArt oldArt = painting.e; + EnumArt oldArt = painting.art; EnumArt newArt = CraftArt.BukkitToNotch(art); - painting.e = newArt; - painting.b(painting.a); - if (!force && !painting.j()) { + painting.art = newArt; + painting.setDirection(painting.direction); + if (!force && !painting.survives()) { // Revert painting since it doesn't fit - painting.e = oldArt; - painting.b(painting.a); + painting.art = oldArt; + painting.setDirection(painting.direction); return false; } this.update(); @@ -56,31 +56,31 @@ public class CraftPainting extends CraftEntity implements Painting { public boolean setFacingDirection(BlockFace face, boolean force) { Block block = getLocation().getBlock().getRelative(getAttachedFace()).getRelative(face.getOppositeFace()).getRelative(getFacing()); EntityPainting painting = getHandle(); - int x = painting.b, y = painting.c, z = painting.d, dir = painting.a; - painting.b = block.getX(); - painting.c = block.getY(); - painting.d = block.getZ(); + int x = painting.x, y = painting.y, z = painting.z, dir = painting.direction; + painting.x = block.getX(); + painting.y = block.getY(); + painting.z = block.getZ(); switch (face) { case EAST: default: - getHandle().b(0); + getHandle().setDirection(0); break; case NORTH: - getHandle().b(1); + getHandle().setDirection(1); break; case WEST: - getHandle().b(2); + getHandle().setDirection(2); break; case SOUTH: - getHandle().b(3); + getHandle().setDirection(3); break; } - if (!force && !painting.j()) { + if (!force && !painting.survives()) { // Revert painting since it doesn't fit - painting.b = x; - painting.c = y; - painting.d = z; - painting.b(dir); + painting.x = x; + painting.y = y; + painting.z = z; + painting.setDirection(dir); return false; } this.update(); @@ -88,7 +88,7 @@ public class CraftPainting extends CraftEntity implements Painting { } public BlockFace getFacing() { - switch (this.getHandle().a) { + switch (this.getHandle().direction) { case 0: default: return BlockFace.EAST; @@ -104,11 +104,11 @@ public class CraftPainting extends CraftEntity implements Painting { private void update() { WorldServer world = ((CraftWorld)getWorld()).getHandle(); EntityPainting painting = new EntityPainting(world); - painting.b = getHandle().b; - painting.c = getHandle().c; - painting.d = getHandle().d; - painting.e = getHandle().e; - painting.b(getHandle().a); + painting.x = getHandle().x; + painting.y = getHandle().y; + painting.z = getHandle().z; + painting.art = getHandle().art; + painting.setDirection(getHandle().direction); getHandle().die(); getHandle().velocityChanged = true; // because this occurs when the painting is broken, so it might be important world.addEntity(painting); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 3c0893b468..2627123ade 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -161,7 +161,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Change the name on the client side server.getHandle().sendAll(new Packet201PlayerInfo(oldName, false, 9999)); - server.getHandle().sendAll(new Packet201PlayerInfo(name, true, getHandle().i)); + server.getHandle().sendAll(new Packet201PlayerInfo(name, true, getHandle().ping)); } @Override @@ -335,11 +335,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void loadData() { - server.getHandle().playerFileData.b(getHandle()); + server.getHandle().playerFileData.load(getHandle()); } public void saveData() { - server.getHandle().playerFileData.a(getHandle()); + server.getHandle().playerFileData.save(getHandle()); } public void updateInventory() { @@ -459,14 +459,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return; } - getHandle().itemInWorldManager.a(mode.getValue()); + getHandle().itemInWorldManager.setGameMode(mode.getValue()); getHandle().netServerHandler.sendPacket(new Packet70Bed(3, mode.getValue())); } } @Override public GameMode getGameMode() { - return GameMode.getByValue(getHandle().itemInWorldManager.a()); + return GameMode.getByValue(getHandle().itemInWorldManager.getGameMode()); } public void giveExp(int exp) { @@ -497,7 +497,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setLevel(int level) { getHandle().expLevel = level; - getHandle().cf = -1; + getHandle().lastSentExp = -1; } public int getTotalExperience() { @@ -506,7 +506,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setTotalExperience(int exp) { getHandle().expTotal = exp; - getHandle().cf = -1; + getHandle().lastSentExp = -1; if (getTotalExperience() > getExperience()) { getHandle().expTotal = getTotalExperience(); diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index 1f47e189e4..f5001e9e3a 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -78,19 +78,19 @@ public class CustomChunkGenerator extends InternalChunkGenerator { return generator.getDefaultPopulators(world); } - public List a(EnumCreatureType type, int x, int y, int z) { + public List getMobsFor(EnumCreatureType type, int x, int y, int z) { WorldChunkManager worldchunkmanager = world.getWorldChunkManager(); if (worldchunkmanager == null) { return null; } else { - BiomeBase biomebase = worldchunkmanager.a(new ChunkCoordIntPair(x >> 4, z >> 4)); + BiomeBase biomebase = worldchunkmanager.getBiome(new ChunkCoordIntPair(x >> 4, z >> 4)); - return biomebase == null ? null : biomebase.a(type); + return biomebase == null ? null : biomebase.getMobs(type); } } - public ChunkPosition a(World world, String type, int x, int y, int z) { - return "Stronghold".equals(type) && this.strongholdGen != null ? this.strongholdGen.a(world, x, y, z) : null; + public ChunkPosition findNearestMapFeature(World world, String type, int x, int y, int z) { + return "Stronghold".equals(type) && this.strongholdGen != null ? this.strongholdGen.getNearestGeneratedFeature(world, x, y, z) : null; } } diff --git a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java index ffbb37de03..1ae9db9482 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java @@ -59,11 +59,11 @@ public class NormalChunkGenerator extends InternalChunkGenerator { return provider.canSave(); } - public List a(EnumCreatureType ect, int i, int i1, int i2) { - return provider.a(ect, i, i1, i2); + public List getMobsFor(EnumCreatureType ect, int i, int i1, int i2) { + return provider.getMobsFor(ect, i, i1, i2); } - public ChunkPosition a(World world, String string, int i, int i1, int i2) { - return provider.a(world, string, i, i1, i2); + public ChunkPosition findNearestMapFeature(World world, String string, int i, int i1, int i2) { + return provider.findNearestMapFeature(world, string, i, i1, i2); } } diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java index d695a92900..cb5b3fac5e 100644 --- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java +++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java @@ -28,7 +28,7 @@ public final class CraftMapView implements MapView { } public short getId() { - String text = worldMap.a; + String text = worldMap.id; if (text.startsWith("map_")) { try { return Short.parseShort(text.substring("map_".length()));