From 897551e39e0e24812acc0704e963d347dfa4a8ef Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Thu, 12 Jan 2012 15:27:39 +0000 Subject: Update to mc-dev rename revision 01 --- src/main/java/net/minecraft/server/Block.java | 4 +- .../java/net/minecraft/server/BlockDispenser.java | 2 +- .../net/minecraft/server/BlockPressurePlate.java | 2 +- .../java/net/minecraft/server/BlockStairs.java | 4 +- .../net/minecraft/server/ChunkProviderServer.java | 8 +- src/main/java/net/minecraft/server/Entity.java | 14 +-- .../java/net/minecraft/server/EntityArrow.java | 8 +- src/main/java/net/minecraft/server/EntityBoat.java | 2 +- .../net/minecraft/server/EntityEnderDragon.java | 14 +-- .../java/net/minecraft/server/EntityEnderman.java | 2 +- .../java/net/minecraft/server/EntityFireball.java | 4 +- .../net/minecraft/server/EntityFishingHook.java | 4 +- .../java/net/minecraft/server/EntityGhast.java | 2 +- .../java/net/minecraft/server/EntityHuman.java | 4 +- .../java/net/minecraft/server/EntityLiving.java | 16 +-- .../java/net/minecraft/server/EntityMagmaCube.java | 2 +- .../java/net/minecraft/server/EntityMinecart.java | 2 +- .../java/net/minecraft/server/EntityPainting.java | 127 ++++++++++----------- .../java/net/minecraft/server/EntityPigZombie.java | 4 +- .../java/net/minecraft/server/EntityPlayer.java | 24 ++-- .../java/net/minecraft/server/EntityPotion.java | 2 +- .../net/minecraft/server/EntityProjectile.java | 4 +- .../java/net/minecraft/server/EntitySkeleton.java | 2 +- .../java/net/minecraft/server/EntitySnowman.java | 2 +- .../java/net/minecraft/server/EntitySquid.java | 2 +- .../minecraft/server/EntityWeatherLighting.java | 2 +- src/main/java/net/minecraft/server/EntityWolf.java | 4 +- src/main/java/net/minecraft/server/Explosion.java | 4 +- src/main/java/net/minecraft/server/ItemBoat.java | 4 +- .../net/minecraft/server/ItemInWorldManager.java | 6 +- .../java/net/minecraft/server/ItemPainting.java | 2 +- .../java/net/minecraft/server/ItemWorldMap.java | 6 +- .../java/net/minecraft/server/MinecraftServer.java | 8 +- .../java/net/minecraft/server/NetLoginHandler.java | 2 +- .../net/minecraft/server/NetServerHandler.java | 8 +- .../net/minecraft/server/Packet51MapChunk.java | 18 +-- .../server/ServerConfigurationManager.java | 16 +-- .../java/net/minecraft/server/SpawnerCreature.java | 2 +- .../net/minecraft/server/TileEntityMobSpawner.java | 2 +- .../net/minecraft/server/TileEntityPiston.java | 2 +- src/main/java/net/minecraft/server/World.java | 14 +-- .../java/net/minecraft/server/WorldNBTStorage.java | 4 +- 42 files changed, 182 insertions(+), 183 deletions(-) (limited to 'src/main/java/net/minecraft/server') diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java index 99a483df..d89b1500 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 39833823..4b951cb4 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 9c17c7e7..23c67ff9 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 c1973400..a7d7bece 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 36351951..e96bb30e 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 fec6ac75..2d04e111 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 d4bfa929..42fc7508 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 6ed6d928..347b0f3f 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 7a446706..c956dda1 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 a3d3da62..67f68936 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 cd0955cb..667bf221 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 5e099849..f3c544e7 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 119b9c87..3e22dc96 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 14d35021..b5fd5821 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 81eb8578..9682b8a2 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 9301a71b..aa11acd0 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 4d755d0a..951b972d 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 98a2b6ee..51169030 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; - - if (this.a == 0) { - k = MathHelper.floor(this.locX - (double) ((float) this.e.B / 32.0F)); + 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.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 f773d065..ac081d47 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 d6811cd9..94d2facf 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 41247f51..8a6241b8 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 a0838515..dac09299 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 60080957..2d15252e 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 a8d549e4..adbca34b 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 f7766ee7..abe5fd86 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 67498895..8a19aa52 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 037906d0..c0ead7dd 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 7ceb116f..7370206b 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 1bb99704..d31131b8 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 a1183c0e..af8a27e4 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 445f53e2..52f036b1 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 c93ab32c..813f1d7f 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 c2166c0d..e37b56de 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 073f5e2c..60d34877 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 396d68cb..4f0a22c2 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 5bfd2fe5..cdc91188 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 ef1dff1e..0213adc8 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 21b43691..61bd30ba 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 40acc4d8..cdc8fbd5 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 b9675126..ffc3286b 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 952113a4..f45457ad 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 017575f2..b0e0bcad 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) { -- cgit v1.2.3