diff --git a/pom.xml b/pom.xml
index 079e5a0e9f..ec2980428b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,7 +39,7 @@
org.bukkit
minecraft-server
- 1.6.6_01
+ 1.7
jar
compile
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 29c14a0a41..9ee3399e7d 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -26,38 +26,38 @@ public class Block {
public static final BlockGrass GRASS = (BlockGrass) (new BlockGrass(2)).c(0.6F).a(g).a("grass");
public static final Block DIRT = (new BlockDirt(3, 2)).c(0.5F).a(f).a("dirt");
public static final Block COBBLESTONE = (new Block(4, 16, Material.STONE)).c(2.0F).b(10.0F).a(h).a("stonebrick");
- public static final Block WOOD = (new Block(5, 4, Material.WOOD)).c(2.0F).b(5.0F).a(e).a("wood").k();
- public static final Block SAPLING = (new BlockSapling(6, 15)).c(0.0F).a(g).a("sapling").k();
- public static final Block BEDROCK = (new Block(7, 17, Material.STONE)).c(-1.0F).b(6000000.0F).a(h).a("bedrock").j();
- public static final Block WATER = (new BlockFlowing(8, Material.WATER)).c(100.0F).f(3).a("water").j().k();
- public static final Block STATIONARY_WATER = (new BlockStationary(9, Material.WATER)).c(100.0F).f(3).a("water").j().k();
- public static final Block LAVA = (new BlockFlowing(10, Material.LAVA)).c(0.0F).a(1.0F).f(255).a("lava").j().k();
- public static final Block STATIONARY_LAVA = (new BlockStationary(11, Material.LAVA)).c(100.0F).a(1.0F).f(255).a("lava").j().k();
+ public static final Block WOOD = (new Block(5, 4, Material.WOOD)).c(2.0F).b(5.0F).a(e).a("wood").g();
+ public static final Block SAPLING = (new BlockSapling(6, 15)).c(0.0F).a(g).a("sapling").g();
+ public static final Block BEDROCK = (new Block(7, 17, Material.STONE)).i().b(6000000.0F).a(h).a("bedrock").n();
+ public static final Block WATER = (new BlockFlowing(8, Material.WATER)).c(100.0F).f(3).a("water").n().g();
+ public static final Block STATIONARY_WATER = (new BlockStationary(9, Material.WATER)).c(100.0F).f(3).a("water").n().g();
+ public static final Block LAVA = (new BlockFlowing(10, Material.LAVA)).c(0.0F).a(1.0F).f(255).a("lava").n().g();
+ public static final Block STATIONARY_LAVA = (new BlockStationary(11, Material.LAVA)).c(100.0F).a(1.0F).f(255).a("lava").n().g();
public static final Block SAND = (new BlockSand(12, 18)).c(0.5F).a(l).a("sand");
public static final Block GRAVEL = (new BlockGravel(13, 19)).c(0.6F).a(f).a("gravel");
public static final Block GOLD_ORE = (new BlockOre(14, 32)).c(3.0F).b(5.0F).a(h).a("oreGold");
public static final Block IRON_ORE = (new BlockOre(15, 33)).c(3.0F).b(5.0F).a(h).a("oreIron");
public static final Block COAL_ORE = (new BlockOre(16, 34)).c(3.0F).b(5.0F).a(h).a("oreCoal");
- public static final Block LOG = (new BlockLog(17)).c(2.0F).a(e).a("log").k();
- public static final BlockLeaves LEAVES = (BlockLeaves) (new BlockLeaves(18, 52)).c(0.2F).f(1).a(g).a("leaves").j().k();
+ public static final Block LOG = (new BlockLog(17)).c(2.0F).a(e).a("log").g();
+ public static final BlockLeaves LEAVES = (BlockLeaves) (new BlockLeaves(18, 52)).c(0.2F).f(1).a(g).a("leaves").n().g();
public static final Block SPONGE = (new BlockSponge(19)).c(0.6F).a(g).a("sponge");
public static final Block GLASS = (new BlockGlass(20, 49, Material.SHATTERABLE, false)).c(0.3F).a(j).a("glass");
public static final Block LAPIS_ORE = (new BlockOre(21, 160)).c(3.0F).b(5.0F).a(h).a("oreLapis");
public static final Block LAPIS_BLOCK = (new Block(22, 144, Material.STONE)).c(3.0F).b(5.0F).a(h).a("blockLapis");
- public static final Block DISPENSER = (new BlockDispenser(23)).c(3.5F).a(h).a("dispenser").k();
+ public static final Block DISPENSER = (new BlockDispenser(23)).c(3.5F).a(h).a("dispenser").g();
public static final Block SANDSTONE = (new BlockSandStone(24)).a(h).c(0.8F).a("sandStone");
- public static final Block NOTE_BLOCK = (new BlockNote(25)).c(0.8F).a("musicBlock").k();
- public static final Block BED = (new BlockBed(26)).c(0.2F).a("bed").j().k();
- public static final Block GOLDEN_RAIL = (new BlockMinecartTrack(27, 179, true)).c(0.7F).a(i).a("goldenRail").k();
- public static final Block DETECTOR_RAIL = (new BlockMinecartDetector(28, 195)).c(0.7F).a(i).a("detectorRail").k();
- public static final Block W = null;
- public static final Block WEB = (new BlockWeb(30, 11)).a("web");
+ public static final Block NOTE_BLOCK = (new BlockNote(25)).c(0.8F).a("musicBlock").g();
+ public static final Block BED = (new BlockBed(26)).c(0.2F).a("bed").n().g();
+ public static final Block GOLDEN_RAIL = (new BlockMinecartTrack(27, 179, true)).c(0.7F).a(i).a("goldenRail").g();
+ public static final Block DETECTOR_RAIL = (new BlockMinecartDetector(28, 195)).c(0.7F).a(i).a("detectorRail").g();
+ public static final Block PISTON_STICKY = (new BlockPiston(29, 106, true)).a("pistonStickyBase").g();
+ public static final Block WEB = (new BlockWeb(30, 11)).f(1).c(4.0F).a("web");
public static final BlockLongGrass LONG_GRASS = (BlockLongGrass) (new BlockLongGrass(31, 39)).c(0.0F).a(g).a("tallgrass");
public static final BlockDeadBush DEAD_BUSH = (BlockDeadBush) (new BlockDeadBush(32, 55)).c(0.0F).a(g).a("deadbush");
- public static final Block aa = null;
- public static final Block ab = null;
- public static final Block WOOL = (new BlockCloth()).c(0.8F).a(k).a("cloth").k();
- public static final Block ad = null;
+ public static final Block PISTON = (new BlockPiston(33, 107, false)).a("pistonBase").g();
+ public static final BlockPistonExtension PISTON_EXTENSION = (BlockPistonExtension) (new BlockPistonExtension(34, 107)).g();
+ public static final Block WOOL = (new BlockCloth()).c(0.8F).a(k).a("cloth").g();
+ public static final BlockPistonMoving PISTON_MOVING = new BlockPistonMoving(36);
public static final BlockFlower YELLOW_FLOWER = (BlockFlower) (new BlockFlower(37, 13)).c(0.0F).a(g).a("flower");
public static final BlockFlower RED_ROSE = (BlockFlower) (new BlockFlower(38, 12)).c(0.0F).a(g).a("rose");
public static final BlockFlower BROWN_MUSHROOM = (BlockFlower) (new BlockMushroom(39, 29)).c(0.0F).a(g).a(0.125F).a("mushroom");
@@ -71,53 +71,53 @@ public class Block {
public static final Block BOOKSHELF = (new BlockBookshelf(47, 35)).c(1.5F).a(e).a("bookshelf");
public static final Block MOSSY_COBBLESTONE = (new Block(48, 36, Material.STONE)).c(2.0F).b(10.0F).a(h).a("stoneMoss");
public static final Block OBSIDIAN = (new BlockObsidian(49, 37)).c(10.0F).b(2000.0F).a(h).a("obsidian");
- public static final Block TORCH = (new BlockTorch(50, 80)).c(0.0F).a(0.9375F).a(e).a("torch").k();
- public static final BlockFire FIRE = (BlockFire) (new BlockFire(51, 31)).c(0.0F).a(1.0F).a(e).a("fire").j().k();
- public static final Block MOB_SPAWNER = (new BlockMobSpawner(52, 65)).c(5.0F).a(i).a("mobSpawner").j();
- public static final Block WOOD_STAIRS = (new BlockStairs(53, WOOD)).a("stairsWood").k();
- public static final Block CHEST = (new BlockChest(54)).c(2.5F).a(e).a("chest").k();
- public static final Block REDSTONE_WIRE = (new BlockRedstoneWire(55, 164)).c(0.0F).a(d).a("redstoneDust").j().k();
+ public static final Block TORCH = (new BlockTorch(50, 80)).c(0.0F).a(0.9375F).a(e).a("torch").g();
+ public static final BlockFire FIRE = (BlockFire) (new BlockFire(51, 31)).c(0.0F).a(1.0F).a(e).a("fire").n().g();
+ public static final Block MOB_SPAWNER = (new BlockMobSpawner(52, 65)).c(5.0F).a(i).a("mobSpawner").n();
+ public static final Block WOOD_STAIRS = (new BlockStairs(53, WOOD)).a("stairsWood").g();
+ public static final Block CHEST = (new BlockChest(54)).c(2.5F).a(e).a("chest").g();
+ public static final Block REDSTONE_WIRE = (new BlockRedstoneWire(55, 164)).c(0.0F).a(d).a("redstoneDust").n().g();
public static final Block DIAMOND_ORE = (new BlockOre(56, 50)).c(3.0F).b(5.0F).a(h).a("oreDiamond");
public static final Block DIAMOND_BLOCK = (new BlockOreBlock(57, 24)).c(5.0F).b(10.0F).a(i).a("blockDiamond");
public static final Block WORKBENCH = (new BlockWorkbench(58)).c(2.5F).a(e).a("workbench");
- public static final Block CROPS = (new BlockCrops(59, 88)).c(0.0F).a(g).a("crops").j().k();
+ public static final Block CROPS = (new BlockCrops(59, 88)).c(0.0F).a(g).a("crops").n().g();
public static final Block SOIL = (new BlockSoil(60)).c(0.6F).a(f).a("farmland");
- public static final Block FURNACE = (new BlockFurnace(61, false)).c(3.5F).a(h).a("furnace").k();
- public static final Block BURNING_FURNACE = (new BlockFurnace(62, true)).c(3.5F).a(h).a(0.875F).a("furnace").k();
- public static final Block SIGN_POST = (new BlockSign(63, TileEntitySign.class, true)).c(1.0F).a(e).a("sign").j().k();
- public static final Block WOODEN_DOOR = (new BlockDoor(64, Material.WOOD)).c(3.0F).a(e).a("doorWood").j().k();
- public static final Block LADDER = (new BlockLadder(65, 83)).c(0.4F).a(e).a("ladder").k();
- public static final Block RAILS = (new BlockMinecartTrack(66, 128, false)).c(0.7F).a(i).a("rail").k();
- public static final Block COBBLESTONE_STAIRS = (new BlockStairs(67, COBBLESTONE)).a("stairsStone").k();
- public static final Block WALL_SIGN = (new BlockSign(68, TileEntitySign.class, false)).c(1.0F).a(e).a("sign").j().k();
- public static final Block LEVER = (new BlockLever(69, 96)).c(0.5F).a(e).a("lever").k();
- public static final Block STONE_PLATE = (new BlockPressurePlate(70, STONE.textureId, EnumMobType.MOBS, Material.STONE)).c(0.5F).a(h).a("pressurePlate").k();
- public static final Block IRON_DOOR_BLOCK = (new BlockDoor(71, Material.ORE)).c(5.0F).a(i).a("doorIron").j().k();
- public static final Block WOOD_PLATE = (new BlockPressurePlate(72, WOOD.textureId, EnumMobType.EVERYTHING, Material.WOOD)).c(0.5F).a(e).a("pressurePlate").k();
- public static final Block REDSTONE_ORE = (new BlockRedstoneOre(73, 51, false)).c(3.0F).b(5.0F).a(h).a("oreRedstone").k();
- public static final Block GLOWING_REDSTONE_ORE = (new BlockRedstoneOre(74, 51, true)).a(0.625F).c(3.0F).b(5.0F).a(h).a("oreRedstone").k();
- public static final Block REDSTONE_TORCH_OFF = (new BlockRedstoneTorch(75, 115, false)).c(0.0F).a(e).a("notGate").k();
- public static final Block REDSTONE_TORCH_ON = (new BlockRedstoneTorch(76, 99, true)).c(0.0F).a(0.5F).a(e).a("notGate").k();
- public static final Block STONE_BUTTON = (new BlockButton(77, STONE.textureId)).c(0.5F).a(h).a("button").k();
+ public static final Block FURNACE = (new BlockFurnace(61, false)).c(3.5F).a(h).a("furnace").g();
+ public static final Block BURNING_FURNACE = (new BlockFurnace(62, true)).c(3.5F).a(h).a(0.875F).a("furnace").g();
+ public static final Block SIGN_POST = (new BlockSign(63, TileEntitySign.class, true)).c(1.0F).a(e).a("sign").n().g();
+ public static final Block WOODEN_DOOR = (new BlockDoor(64, Material.WOOD)).c(3.0F).a(e).a("doorWood").n().g();
+ public static final Block LADDER = (new BlockLadder(65, 83)).c(0.4F).a(e).a("ladder").g();
+ public static final Block RAILS = (new BlockMinecartTrack(66, 128, false)).c(0.7F).a(i).a("rail").g();
+ public static final Block COBBLESTONE_STAIRS = (new BlockStairs(67, COBBLESTONE)).a("stairsStone").g();
+ public static final Block WALL_SIGN = (new BlockSign(68, TileEntitySign.class, false)).c(1.0F).a(e).a("sign").n().g();
+ public static final Block LEVER = (new BlockLever(69, 96)).c(0.5F).a(e).a("lever").g();
+ public static final Block STONE_PLATE = (new BlockPressurePlate(70, STONE.textureId, EnumMobType.MOBS, Material.STONE)).c(0.5F).a(h).a("pressurePlate").g();
+ public static final Block IRON_DOOR_BLOCK = (new BlockDoor(71, Material.ORE)).c(5.0F).a(i).a("doorIron").n().g();
+ public static final Block WOOD_PLATE = (new BlockPressurePlate(72, WOOD.textureId, EnumMobType.EVERYTHING, Material.WOOD)).c(0.5F).a(e).a("pressurePlate").g();
+ public static final Block REDSTONE_ORE = (new BlockRedstoneOre(73, 51, false)).c(3.0F).b(5.0F).a(h).a("oreRedstone").g();
+ public static final Block GLOWING_REDSTONE_ORE = (new BlockRedstoneOre(74, 51, true)).a(0.625F).c(3.0F).b(5.0F).a(h).a("oreRedstone").g();
+ public static final Block REDSTONE_TORCH_OFF = (new BlockRedstoneTorch(75, 115, false)).c(0.0F).a(e).a("notGate").g();
+ public static final Block REDSTONE_TORCH_ON = (new BlockRedstoneTorch(76, 99, true)).c(0.0F).a(0.5F).a(e).a("notGate").g();
+ public static final Block STONE_BUTTON = (new BlockButton(77, STONE.textureId)).c(0.5F).a(h).a("button").g();
public static final Block SNOW = (new BlockSnow(78, 66)).c(0.1F).a(k).a("snow");
public static final Block ICE = (new BlockIce(79, 67)).c(0.5F).f(3).a(j).a("ice");
public static final Block SNOW_BLOCK = (new BlockSnowBlock(80, 66)).c(0.2F).a(k).a("snow");
public static final Block CACTUS = (new BlockCactus(81, 70)).c(0.4F).a(k).a("cactus");
public static final Block CLAY = (new BlockClay(82, 72)).c(0.6F).a(f).a("clay");
- public static final Block SUGAR_CANE_BLOCK = (new BlockReed(83, 73)).c(0.0F).a(g).a("reeds").j();
- public static final Block JUKEBOX = (new BlockJukeBox(84, 74)).c(2.0F).b(10.0F).a(h).a("jukebox").k();
- public static final Block FENCE = (new BlockFence(85, 4)).c(2.0F).b(5.0F).a(e).a("fence").k();
- public static final Block PUMPKIN = (new BlockPumpkin(86, 102, false)).c(1.0F).a(e).a("pumpkin").k();
+ public static final Block SUGAR_CANE_BLOCK = (new BlockReed(83, 73)).c(0.0F).a(g).a("reeds").n();
+ public static final Block JUKEBOX = (new BlockJukeBox(84, 74)).c(2.0F).b(10.0F).a(h).a("jukebox").g();
+ public static final Block FENCE = (new BlockFence(85, 4)).c(2.0F).b(5.0F).a(e).a("fence").g();
+ public static final Block PUMPKIN = (new BlockPumpkin(86, 102, false)).c(1.0F).a(e).a("pumpkin").g();
public static final Block NETHERRACK = (new BlockBloodStone(87, 103)).c(0.4F).a(h).a("hellrock");
public static final Block SOUL_SAND = (new BlockSlowSand(88, 104)).c(0.5F).a(l).a("hellsand");
public static final Block GLOWSTONE = (new BlockLightStone(89, 105, Material.STONE)).c(0.3F).a(j).a(1.0F).a("lightgem");
public static final BlockPortal PORTAL = (BlockPortal) (new BlockPortal(90, 14)).c(-1.0F).a(j).a(0.75F).a("portal");
- public static final Block JACK_O_LANTERN = (new BlockPumpkin(91, 102, true)).c(1.0F).a(e).a(1.0F).a("litpumpkin").k();
- public static final Block CAKE_BLOCK = (new BlockCake(92, 121)).c(0.5F).a(k).a("cake").j().k();
- public static final Block DIODE_OFF = (new BlockDiode(93, false)).c(0.0F).a(e).a("diode").j().k();
- public static final Block DIODE_ON = (new BlockDiode(94, true)).c(0.0F).a(0.625F).a(e).a("diode").j().k();
- public static final Block LOCKED_CHEST = (new BlockLockedChest(95)).c(0.0F).a(1.0F).a(e).a("lockedchest").a(true).k();
- public static final Block TRAP_DOOR = (new BlockTrapdoor(96, Material.WOOD)).c(3.0F).a(e).a("trapdoor").j().k();
+ public static final Block JACK_O_LANTERN = (new BlockPumpkin(91, 102, true)).c(1.0F).a(e).a(1.0F).a("litpumpkin").g();
+ public static final Block CAKE_BLOCK = (new BlockCake(92, 121)).c(0.5F).a(k).a("cake").n().g();
+ public static final Block DIODE_OFF = (new BlockDiode(93, false)).c(0.0F).a(e).a("diode").n().g();
+ public static final Block DIODE_ON = (new BlockDiode(94, true)).c(0.0F).a(0.625F).a(e).a("diode").n().g();
+ public static final Block LOCKED_CHEST = (new BlockLockedChest(95)).c(0.0F).a(1.0F).a(e).a("lockedchest").a(true).g();
+ public static final Block TRAP_DOOR = (new BlockTrapdoor(96, Material.WOOD)).c(3.0F).a(e).a("trapdoor").n().g();
public int textureId;
public final int id;
protected float strength;
@@ -156,12 +156,12 @@ public class Block {
}
}
- private Block k() {
+ protected Block g() {
t[this.id] = true;
return this;
}
- protected void f() {}
+ protected void h() {}
protected Block(int i, int j, Material material) {
this(i, material);
@@ -201,6 +201,15 @@ public class Block {
return this;
}
+ protected Block i() {
+ this.c(-1.0F);
+ return this;
+ }
+
+ public float j() {
+ return this.strength;
+ }
+
protected Block a(boolean flag) {
n[this.id] = flag;
return this;
@@ -228,14 +237,14 @@ public class Block {
}
public void a(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist) {
- AxisAlignedBB axisalignedbb1 = this.d(world, i, j, k);
+ AxisAlignedBB axisalignedbb1 = this.e(world, i, j, k);
if (axisalignedbb1 != null && axisalignedbb.a(axisalignedbb1)) {
arraylist.add(axisalignedbb1);
}
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
return AxisAlignedBB.b((double) i + this.minX, (double) j + this.minY, (double) k + this.minZ, (double) i + this.maxX, (double) j + this.maxY, (double) k + this.maxZ);
}
@@ -244,10 +253,10 @@ public class Block {
}
public boolean a(int i, boolean flag) {
- return this.m_();
+ return this.k_();
}
- public boolean m_() {
+ public boolean k_() {
return true;
}
@@ -261,7 +270,7 @@ public class Block {
return 10;
}
- public void e(World world, int i, int j, int k) {}
+ public void c(World world, int i, int j, int k) {}
public void remove(World world, int i, int j, int k) {}
@@ -277,7 +286,7 @@ public class Block {
return this.strength < 0.0F ? 0.0F : (!entityhuman.b(this) ? 1.0F / this.strength / 100.0F : entityhuman.a(this) / this.strength / 30.0F);
}
- public void b_(World world, int i, int j, int k, int l) {
+ public final void g(World world, int i, int j, int k, int l) {
this.dropNaturally(world, i, j, k, l, 1.0F);
}
@@ -291,21 +300,27 @@ public class Block {
int k1 = this.a(l, world.random);
if (k1 > 0) {
- float f1 = 0.7F;
- double d0 = (double) (world.random.nextFloat() * f1) + (double) (1.0F - f1) * 0.5D;
- double d1 = (double) (world.random.nextFloat() * f1) + (double) (1.0F - f1) * 0.5D;
- double d2 = (double) (world.random.nextFloat() * f1) + (double) (1.0F - f1) * 0.5D;
- EntityItem entityitem = new EntityItem(world, (double) i + d0, (double) j + d1, (double) k + d2, new ItemStack(k1, 1, this.b(l)));
-
- entityitem.pickupDelay = 10;
- world.addEntity(entityitem);
+ this.a(world, i, j, k, new ItemStack(k1, 1, this.a_(l)));
}
}
}
}
}
- protected int b(int i) {
+ protected void a(World world, int i, int j, int k, ItemStack itemstack) {
+ if (!world.isStatic) {
+ float f = 0.7F;
+ double d0 = (double) (world.random.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
+ double d1 = (double) (world.random.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
+ double d2 = (double) (world.random.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
+ EntityItem entityitem = new EntityItem(world, (double) i + d0, (double) j + d1, (double) k + d2, itemstack);
+
+ entityitem.pickupDelay = 10;
+ world.addEntity(entityitem);
+ }
+ }
+
+ protected int a_(int i) {
return 0;
}
@@ -419,7 +434,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 c(World world, int i, int j, int k) {}
+ public void d(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);
@@ -455,13 +470,13 @@ public class Block {
public void a(World world, int i, int j, int k, Entity entity) {}
- public boolean c(World world, int i, int j, int k, int l) {
+ public boolean d(World world, int i, int j, int k, int l) {
return false;
}
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
entityhuman.a(StatisticList.C[this.id], 1);
- this.b_(world, i, j, k, l);
+ this.g(world, i, j, k, l);
}
public boolean f(World world, int i, int j, int k) {
@@ -475,35 +490,42 @@ public class Block {
return this;
}
- public String g() {
- return StatisticCollector.a(this.h() + ".name");
+ public String k() {
+ return StatisticCollector.a(this.l() + ".name");
}
- public String h() {
+ public String l() {
return this.name;
}
public void a(World world, int i, int j, int k, int l, int i1) {}
- public boolean i() {
+ public boolean m() {
return this.br;
}
- protected Block j() {
+ protected Block n() {
this.br = false;
return this;
}
+ public int f() {
+ return this.material.j();
+ }
+
static {
Item.byId[WOOL.id] = (new ItemCloth(WOOL.id - 256)).a("cloth");
Item.byId[LOG.id] = (new ItemLog(LOG.id - 256)).a("log");
Item.byId[STEP.id] = (new ItemStep(STEP.id - 256)).a("stoneSlab");
Item.byId[SAPLING.id] = (new ItemSapling(SAPLING.id - 256)).a("sapling");
+ Item.byId[LEAVES.id] = (new ItemLeaves(LEAVES.id - 256)).a("leaves");
+ Item.byId[PISTON.id] = new ItemPiston(PISTON.id - 256);
+ Item.byId[PISTON_STICKY.id] = new ItemPiston(PISTON_STICKY.id - 256);
for (int i = 0; i < 256; ++i) {
if (byId[i] != null && Item.byId[i] == null) {
Item.byId[i] = new ItemBlock(i - 256);
- byId[i].f();
+ byId[i].h();
}
}
diff --git a/src/main/java/net/minecraft/server/BlockButton.java b/src/main/java/net/minecraft/server/BlockButton.java
index e961f7931c..a5b3c6a277 100644
--- a/src/main/java/net/minecraft/server/BlockButton.java
+++ b/src/main/java/net/minecraft/server/BlockButton.java
@@ -11,7 +11,7 @@ public class BlockButton extends Block {
this.a(true);
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}
@@ -28,11 +28,11 @@ public class BlockButton extends Block {
}
public boolean canPlace(World world, int i, int j, int k, int l) {
- return l == 2 && world.d(i, j, k + 1) ? true : (l == 3 && world.d(i, j, k - 1) ? true : (l == 4 && world.d(i + 1, j, k) ? true : l == 5 && world.d(i - 1, j, k)));
+ return l == 2 && world.e(i, j, k + 1) ? true : (l == 3 && world.e(i, j, k - 1) ? true : (l == 4 && world.e(i + 1, j, k) ? true : l == 5 && world.e(i - 1, j, k)));
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.d(i - 1, j, k) ? true : (world.d(i + 1, j, k) ? true : (world.d(i, j, k - 1) ? true : world.d(i, j, k + 1)));
+ return world.e(i - 1, j, k) ? true : (world.e(i + 1, j, k) ? true : (world.e(i, j, k - 1) ? true : world.e(i, j, k + 1)));
}
public void postPlace(World world, int i, int j, int k, int l) {
@@ -40,13 +40,13 @@ public class BlockButton extends Block {
int j1 = i1 & 8;
i1 &= 7;
- if (l == 2 && world.d(i, j, k + 1)) {
+ if (l == 2 && world.e(i, j, k + 1)) {
i1 = 4;
- } else if (l == 3 && world.d(i, j, k - 1)) {
+ } else if (l == 3 && world.e(i, j, k - 1)) {
i1 = 3;
- } else if (l == 4 && world.d(i + 1, j, k)) {
+ } else if (l == 4 && world.e(i + 1, j, k)) {
i1 = 2;
- } else if (l == 5 && world.d(i - 1, j, k)) {
+ } else if (l == 5 && world.e(i - 1, j, k)) {
i1 = 1;
} else {
i1 = this.g(world, i, j, k);
@@ -56,7 +56,7 @@ public class BlockButton extends Block {
}
private int g(World world, int i, int j, int k) {
- return world.d(i - 1, j, k) ? 1 : (world.d(i + 1, j, k) ? 2 : (world.d(i, j, k - 1) ? 3 : (world.d(i, j, k + 1) ? 4 : 1)));
+ return world.e(i - 1, j, k) ? 1 : (world.e(i + 1, j, k) ? 2 : (world.e(i, j, k - 1) ? 3 : (world.e(i, j, k + 1) ? 4 : 1)));
}
public void doPhysics(World world, int i, int j, int k, int l) {
@@ -64,24 +64,24 @@ public class BlockButton extends Block {
int i1 = world.getData(i, j, k) & 7;
boolean flag = false;
- if (!world.d(i - 1, j, k) && i1 == 1) {
+ if (!world.e(i - 1, j, k) && i1 == 1) {
flag = true;
}
- if (!world.d(i + 1, j, k) && i1 == 2) {
+ if (!world.e(i + 1, j, k) && i1 == 2) {
flag = true;
}
- if (!world.d(i, j, k - 1) && i1 == 3) {
+ if (!world.e(i, j, k - 1) && i1 == 3) {
flag = true;
}
- if (!world.d(i, j, k + 1) && i1 == 4) {
+ if (!world.e(i, j, k + 1) && i1 == 4) {
flag = true;
}
if (flag) {
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
}
}
@@ -89,7 +89,7 @@ public class BlockButton extends Block {
private boolean h(World world, int i, int j, int k) {
if (!this.canPlace(world, i, j, k)) {
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
return false;
} else {
@@ -194,7 +194,7 @@ public class BlockButton extends Block {
return (iblockaccess.getData(i, j, k) & 8) > 0;
}
- public boolean c(World world, int i, int j, int k, int l) {
+ public boolean d(World world, int i, int j, int k, int l) {
int i1 = world.getData(i, j, k);
if ((i1 & 8) == 0) {
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
index 905962996f..d1800e634e 100644
--- a/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
@@ -35,7 +35,7 @@ public class BlockCactus extends Block {
}
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
float f = 0.0625F;
return AxisAlignedBB.b((double) ((float) i + f), (double) j, (double) ((float) k + f), (double) ((float) (i + 1) - f), (double) ((float) (j + 1) - f), (double) ((float) (k + 1) - f));
@@ -59,7 +59,7 @@ public class BlockCactus extends Block {
public void doPhysics(World world, int i, int j, int k, int l) {
if (!this.f(world, i, j, k)) {
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java
index f5d1fa0e85..89975dd8d2 100644
--- a/src/main/java/net/minecraft/server/BlockDispenser.java
+++ b/src/main/java/net/minecraft/server/BlockDispenser.java
@@ -25,8 +25,8 @@ public class BlockDispenser extends BlockContainer {
return Block.DISPENSER.id;
}
- public void e(World world, int i, int j, int k) {
- super.e(world, i, j, k);
+ public void c(World world, int i, int j, int k) {
+ super.c(world, i, j, k);
this.g(world, i, j, k);
}
diff --git a/src/main/java/net/minecraft/server/BlockDoor.java b/src/main/java/net/minecraft/server/BlockDoor.java
index 4b2162a57a..9cb066bb91 100644
--- a/src/main/java/net/minecraft/server/BlockDoor.java
+++ b/src/main/java/net/minecraft/server/BlockDoor.java
@@ -50,9 +50,9 @@ public class BlockDoor extends Block {
return false;
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
this.a(world, i, j, k);
- return super.d(world, i, j, k);
+ return super.e(world, i, j, k);
}
public void a(IBlockAccess iblockaccess, int i, int j, int k) {
@@ -150,7 +150,7 @@ public class BlockDoor extends Block {
flag = true;
}
- if (!world.d(i, j - 1, k)) {
+ if (!world.e(i, j - 1, k)) {
world.setTypeId(i, j, k, 0);
flag = true;
if (world.getTypeId(i, j + 1, k) == this.id) {
@@ -160,7 +160,7 @@ public class BlockDoor extends Block {
if (flag) {
if (!world.isStatic) {
- this.b_(world, i, j, k, i1);
+ this.g(world, i, j, k, i1);
}
} else if (l > 0 && Block.byId[l].isPowerSource()) {
boolean flag1 = world.isBlockIndirectlyPowered(i, j, k) || world.isBlockIndirectlyPowered(i, j + 1, k);
@@ -199,7 +199,7 @@ public class BlockDoor extends Block {
}
public boolean canPlace(World world, int i, int j, int k) {
- return j >= 127 ? false : world.d(i, j - 1, k) && super.canPlace(world, i, j, k) && super.canPlace(world, i, j + 1, k);
+ return j >= 127 ? false : world.e(i, j - 1, k) && super.canPlace(world, i, j, k) && super.canPlace(world, i, j + 1, k);
}
public static boolean e(int i) {
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 600f25289c..9b14a9013c 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -18,7 +18,7 @@ public class BlockFire extends Block {
this.a(true);
}
- public void f() {
+ public void h() {
this.a(Block.WOOD.id, 5, 20);
this.a(Block.FENCE.id, 5, 20);
this.a(Block.WOOD_STAIRS.id, 5, 20);
@@ -35,7 +35,7 @@ public class BlockFire extends Block {
this.b[i] = k;
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}
@@ -73,7 +73,7 @@ public class BlockFire extends Block {
world.c(i, j, k, this.id, this.c());
if (!flag && !this.g(world, i, j, k)) {
- if (!world.d(i, j - 1, k) || l > 3) {
+ if (!world.e(i, j - 1, k) || l > 3) {
world.setTypeId(i, j, k, 0);
}
} else if (!flag && !this.b(world, i, j - 1, k) && l == 15 && random.nextInt(4) == 0) {
@@ -167,7 +167,7 @@ public class BlockFire extends Block {
}
if (flag) {
- Block.TNT.postBreak(world, i, j, k, 0);
+ Block.TNT.postBreak(world, i, j, k, 1);
}
}
}
@@ -182,18 +182,18 @@ public class BlockFire extends Block {
if (!world.isEmpty(i, j, k)) {
return 0;
} else {
- int l = this.g(world, i + 1, j, k, b0);
+ int l = this.f(world, i + 1, j, k, b0);
- l = this.g(world, i - 1, j, k, l);
- l = this.g(world, i, j - 1, k, l);
- l = this.g(world, i, j + 1, k, l);
- l = this.g(world, i, j, k - 1, l);
- l = this.g(world, i, j, k + 1, l);
+ l = this.f(world, i - 1, j, k, l);
+ l = this.f(world, i, j - 1, k, l);
+ l = this.f(world, i, j + 1, k, l);
+ l = this.f(world, i, j, k - 1, l);
+ l = this.f(world, i, j, k + 1, l);
return l;
}
}
- public boolean m_() {
+ public boolean k_() {
return false;
}
@@ -201,25 +201,25 @@ public class BlockFire extends Block {
return this.a[iblockaccess.getTypeId(i, j, k)] > 0;
}
- public int g(World world, int i, int j, int k, int l) {
+ public int f(World world, int i, int j, int k, int l) {
int i1 = this.a[world.getTypeId(i, j, k)];
return i1 > l ? i1 : l;
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.d(i, j - 1, k) || this.g(world, i, j, k);
+ return world.e(i, j - 1, k) || this.g(world, i, j, k);
}
public void doPhysics(World world, int i, int j, int k, int l) {
- if (!world.d(i, j - 1, k) && !this.g(world, i, j, k)) {
+ if (!world.e(i, j - 1, k) && !this.g(world, i, j, k)) {
world.setTypeId(i, j, k, 0);
}
}
- public void e(World world, int i, int j, int k) {
+ public void c(World world, int i, int j, int k) {
if (world.getTypeId(i, j - 1, k) != Block.OBSIDIAN.id || !Block.PORTAL.a_(world, i, j, k)) {
- if (!world.d(i, j - 1, k) && !this.g(world, i, j, k)) {
+ if (!world.e(i, j - 1, k) && !this.g(world, i, j, k)) {
world.setTypeId(i, j, k, 0);
} else {
world.c(i, j, k, this.id, this.c());
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 3a30fc46cb..52ba8de16c 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -152,7 +152,7 @@ public class BlockFlowing extends BlockFluids {
if (this.material == Material.LAVA) {
this.h(world, i, j, k);
} else {
- Block.byId[i1].b_(world, i, j, k, world.getData(i, j, k));
+ Block.byId[i1].g(world, i, j, k, world.getData(i, j, k));
}
}
@@ -292,8 +292,8 @@ public class BlockFlowing extends BlockFluids {
return material == this.material ? false : (material == Material.LAVA ? false : !this.k(world, i, j, k));
}
- public void e(World world, int i, int j, int k) {
- super.e(world, i, j, k);
+ public void c(World world, int i, int j, int k) {
+ super.c(world, i, j, k);
if (world.getTypeId(i, j, k) == this.id) {
world.c(i, j, k, this.id, this.c());
}
diff --git a/src/main/java/net/minecraft/server/BlockIce.java b/src/main/java/net/minecraft/server/BlockIce.java
index 7fef5bb020..2ba8c88794 100644
--- a/src/main/java/net/minecraft/server/BlockIce.java
+++ b/src/main/java/net/minecraft/server/BlockIce.java
@@ -38,7 +38,7 @@ public class BlockIce extends BlockBreakable {
}
// CraftBukkit end
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, Block.STATIONARY_WATER.id);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockLeaves.java b/src/main/java/net/minecraft/server/BlockLeaves.java
index 7e1f258c77..a06725625e 100644
--- a/src/main/java/net/minecraft/server/BlockLeaves.java
+++ b/src/main/java/net/minecraft/server/BlockLeaves.java
@@ -126,7 +126,7 @@ public class BlockLeaves extends BlockLeavesBase {
if (event.isCancelled()) return;
// CraftBukkit end
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
}
@@ -138,7 +138,16 @@ public class BlockLeaves extends BlockLeavesBase {
return Block.SAPLING.id;
}
- protected int b(int i) {
+ public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
+ if (!world.isStatic && entityhuman.G() != null && entityhuman.G().id == Item.SHEARS.id) {
+ entityhuman.a(StatisticList.C[this.id], 1);
+ this.a(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3));
+ } else {
+ super.a(world, entityhuman, i, j, k, l);
+ }
+ }
+
+ protected int a_(int i) {
return i & 3;
}
diff --git a/src/main/java/net/minecraft/server/BlockLever.java b/src/main/java/net/minecraft/server/BlockLever.java
index 031ef09fde..c7e205aeda 100644
--- a/src/main/java/net/minecraft/server/BlockLever.java
+++ b/src/main/java/net/minecraft/server/BlockLever.java
@@ -8,7 +8,7 @@ public class BlockLever extends Block {
super(i, j, Material.ORIENTABLE);
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}
@@ -21,11 +21,11 @@ public class BlockLever extends Block {
}
public boolean canPlace(World world, int i, int j, int k, int l) {
- return l == 1 && world.d(i, j - 1, k) ? true : (l == 2 && world.d(i, j, k + 1) ? true : (l == 3 && world.d(i, j, k - 1) ? true : (l == 4 && world.d(i + 1, j, k) ? true : l == 5 && world.d(i - 1, j, k))));
+ return l == 1 && world.e(i, j - 1, k) ? true : (l == 2 && world.e(i, j, k + 1) ? true : (l == 3 && world.e(i, j, k - 1) ? true : (l == 4 && world.e(i + 1, j, k) ? true : l == 5 && world.e(i - 1, j, k))));
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.d(i - 1, j, k) ? true : (world.d(i + 1, j, k) ? true : (world.d(i, j, k - 1) ? true : (world.d(i, j, k + 1) ? true : world.d(i, j - 1, k))));
+ return world.e(i - 1, j, k) ? true : (world.e(i + 1, j, k) ? true : (world.e(i, j, k - 1) ? true : (world.e(i, j, k + 1) ? true : world.e(i, j - 1, k))));
}
public void postPlace(World world, int i, int j, int k, int l) {
@@ -34,28 +34,28 @@ public class BlockLever extends Block {
i1 &= 7;
i1 = -1;
- if (l == 1 && world.d(i, j - 1, k)) {
+ if (l == 1 && world.e(i, j - 1, k)) {
i1 = 5 + world.random.nextInt(2);
}
- if (l == 2 && world.d(i, j, k + 1)) {
+ if (l == 2 && world.e(i, j, k + 1)) {
i1 = 4;
}
- if (l == 3 && world.d(i, j, k - 1)) {
+ if (l == 3 && world.e(i, j, k - 1)) {
i1 = 3;
}
- if (l == 4 && world.d(i + 1, j, k)) {
+ if (l == 4 && world.e(i + 1, j, k)) {
i1 = 2;
}
- if (l == 5 && world.d(i - 1, j, k)) {
+ if (l == 5 && world.e(i - 1, j, k)) {
i1 = 1;
}
if (i1 == -1) {
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
} else {
world.setData(i, j, k, i1 + j1);
@@ -67,32 +67,32 @@ public class BlockLever extends Block {
int i1 = world.getData(i, j, k) & 7;
boolean flag = false;
- if (!world.d(i - 1, j, k) && i1 == 1) {
+ if (!world.e(i - 1, j, k) && i1 == 1) {
flag = true;
}
- if (!world.d(i + 1, j, k) && i1 == 2) {
+ if (!world.e(i + 1, j, k) && i1 == 2) {
flag = true;
}
- if (!world.d(i, j, k - 1) && i1 == 3) {
+ if (!world.e(i, j, k - 1) && i1 == 3) {
flag = true;
}
- if (!world.d(i, j, k + 1) && i1 == 4) {
+ if (!world.e(i, j, k + 1) && i1 == 4) {
flag = true;
}
- if (!world.d(i, j - 1, k) && i1 == 5) {
+ if (!world.e(i, j - 1, k) && i1 == 5) {
flag = true;
}
- if (!world.d(i, j - 1, k) && i1 == 6) {
+ if (!world.e(i, j - 1, k) && i1 == 6) {
flag = true;
}
if (flag) {
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
}
}
@@ -100,7 +100,7 @@ public class BlockLever extends Block {
private boolean g(World world, int i, int j, int k) {
if (!this.canPlace(world, i, j, k)) {
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
return false;
} else {
@@ -198,7 +198,7 @@ public class BlockLever extends Block {
return (iblockaccess.getData(i, j, k) & 8) > 0;
}
- public boolean c(World world, int i, int j, int k, int l) {
+ public boolean d(World world, int i, int j, int k, int l) {
int i1 = world.getData(i, j, k);
if ((i1 & 8) == 0) {
diff --git a/src/main/java/net/minecraft/server/BlockMinecartDetector.java b/src/main/java/net/minecraft/server/BlockMinecartDetector.java
index c2d629f9a2..f05415f748 100644
--- a/src/main/java/net/minecraft/server/BlockMinecartDetector.java
+++ b/src/main/java/net/minecraft/server/BlockMinecartDetector.java
@@ -25,7 +25,7 @@ public class BlockMinecartDetector extends BlockMinecartTrack {
int l = world.getData(i, j, k);
if ((l & 8) == 0) {
- this.g(world, i, j, k, l);
+ this.f(world, i, j, k, l);
}
}
}
@@ -35,7 +35,7 @@ public class BlockMinecartDetector extends BlockMinecartTrack {
int l = world.getData(i, j, k);
if ((l & 8) != 0) {
- this.g(world, i, j, k, l);
+ this.f(world, i, j, k, l);
}
}
}
@@ -44,11 +44,11 @@ public class BlockMinecartDetector extends BlockMinecartTrack {
return (iblockaccess.getData(i, j, k) & 8) != 0;
}
- public boolean c(World world, int i, int j, int k, int l) {
+ public boolean d(World world, int i, int j, int k, int l) {
return (world.getData(i, j, k) & 8) == 0 ? false : l == 1;
}
- private void g(World world, int i, int j, int k, int l) {
+ private void f(World world, int i, int j, int k, int l) {
boolean flag = (l & 8) != 0;
boolean flag1 = false;
float f = 0.125F;
diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java
index 658b37074b..c179ae22d0 100644
--- a/src/main/java/net/minecraft/server/BlockMushroom.java
+++ b/src/main/java/net/minecraft/server/BlockMushroom.java
@@ -47,6 +47,6 @@ public class BlockMushroom extends BlockFlower {
}
public boolean f(World world, int i, int j, int k) {
- return j >= 0 && j < 128 ? world.j(i, j, k) < 13 && this.c(world.getTypeId(i, j - 1, k)) : false;
+ return j >= 0 && j < 128 ? world.k(i, j, k) < 13 && this.c(world.getTypeId(i, j - 1, k)) : false;
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java
index fe52619841..f9ab850c1e 100644
--- a/src/main/java/net/minecraft/server/BlockPortal.java
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
@@ -13,7 +13,7 @@ public class BlockPortal extends BlockBreakable {
super(i, j, Material.PORTAL, false);
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}
@@ -166,7 +166,7 @@ public class BlockPortal extends BlockBreakable {
world.getServer().getPluginManager().callEvent(event);
// CraftBukkit end
- entity.O();
+ entity.P();
}
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPressurePlate.java b/src/main/java/net/minecraft/server/BlockPressurePlate.java
index 4b0f49c4d4..97b52afacc 100644
--- a/src/main/java/net/minecraft/server/BlockPressurePlate.java
+++ b/src/main/java/net/minecraft/server/BlockPressurePlate.java
@@ -26,7 +26,7 @@ public class BlockPressurePlate extends Block {
return 20;
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}
@@ -39,20 +39,20 @@ public class BlockPressurePlate extends Block {
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.d(i, j - 1, k);
+ return world.e(i, j - 1, k);
}
- public void e(World world, int i, int j, int k) {}
+ public void c(World world, int i, int j, int k) {}
public void doPhysics(World world, int i, int j, int k, int l) {
boolean flag = false;
- if (!world.d(i, j - 1, k)) {
+ if (!world.e(i, j - 1, k)) {
flag = true;
}
if (flag) {
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
}
}
@@ -174,7 +174,7 @@ public class BlockPressurePlate extends Block {
return iblockaccess.getData(i, j, k) > 0;
}
- public boolean c(World world, int i, int j, int k, int l) {
+ public boolean d(World world, int i, int j, int k, int l) {
return world.getData(i, j, k) == 0 ? false : l == 1;
}
diff --git a/src/main/java/net/minecraft/server/BlockPumpkin.java b/src/main/java/net/minecraft/server/BlockPumpkin.java
index 1a20c4b98b..acb280c545 100644
--- a/src/main/java/net/minecraft/server/BlockPumpkin.java
+++ b/src/main/java/net/minecraft/server/BlockPumpkin.java
@@ -33,14 +33,14 @@ public class BlockPumpkin extends Block {
return i == 1 ? this.textureId : (i == 0 ? this.textureId : (i == 3 ? this.textureId + 1 + 16 : this.textureId + 16));
}
- public void e(World world, int i, int j, int k) {
- super.e(world, i, j, k);
+ public void c(World world, int i, int j, int k) {
+ super.c(world, i, j, k);
}
public boolean canPlace(World world, int i, int j, int k) {
int l = world.getTypeId(i, j, k);
- return (l == 0 || Block.byId[l].material.isReplacable()) && world.d(i, j - 1, k);
+ return (l == 0 || Block.byId[l].material.isReplacable()) && world.e(i, j - 1, k);
}
public void postPlace(World world, int i, int j, int k, EntityLiving entityliving) {
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
index a5d8d2cc00..b744679d26 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
@@ -46,9 +46,9 @@ public class BlockRedstoneTorch extends BlockTorch {
return 2;
}
- public void e(World world, int i, int j, int k) {
+ public void c(World world, int i, int j, int k) {
if (world.getData(i, j, k) == 0) {
- super.e(world, i, j, k);
+ super.c(world, i, j, k);
}
if (this.isOn) {
@@ -148,7 +148,7 @@ public class BlockRedstoneTorch extends BlockTorch {
world.c(i, j, k, this.id, this.c());
}
- public boolean c(World world, int i, int j, int k, int l) {
+ public boolean d(World world, int i, int j, int k, int l) {
return l == 0 ? this.a(world, i, j, k, l) : false;
}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 907d847f5a..af50818a88 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -21,7 +21,7 @@ public class BlockRedstoneWire extends Block {
return this.textureId;
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}
@@ -34,7 +34,7 @@ public class BlockRedstoneWire extends Block {
}
public boolean canPlace(World world, int i, int j, int k) {
- return world.d(i, j - 1, k);
+ return world.e(i, j - 1, k);
}
private void g(World world, int i, int j, int k) {
@@ -88,11 +88,11 @@ public class BlockRedstoneWire extends Block {
l1 = this.getPower(world, j2, j, k2, l1);
}
- if (world.d(j2, j, k2) && !world.d(i, j + 1, k)) {
+ if (world.e(j2, j, k2) && !world.e(i, j + 1, k)) {
if (j2 != l || j + 1 != i1 || k2 != j1) {
l1 = this.getPower(world, j2, j + 1, k2, l1);
}
- } else if (!world.d(j2, j, k2) && (j2 != l || j - 1 != i1 || k2 != j1)) {
+ } else if (!world.e(j2, j, k2) && (j2 != l || j - 1 != i1 || k2 != j1)) {
l1 = this.getPower(world, j2, j - 1, k2, l1);
}
}
@@ -140,7 +140,7 @@ public class BlockRedstoneWire extends Block {
++k2;
}
- if (world.d(j2, j, k2)) {
+ if (world.e(j2, j, k2)) {
l2 += 2;
}
@@ -191,8 +191,8 @@ public class BlockRedstoneWire extends Block {
}
}
- public void e(World world, int i, int j, int k) {
- super.e(world, i, j, k);
+ public void c(World world, int i, int j, int k) {
+ super.c(world, i, j, k);
if (!world.isStatic) {
this.g(world, i, j, k);
world.applyPhysics(i, j + 1, k, this.id);
@@ -201,25 +201,25 @@ public class BlockRedstoneWire extends Block {
this.h(world, i + 1, j, k);
this.h(world, i, j, k - 1);
this.h(world, i, j, k + 1);
- if (world.d(i - 1, j, k)) {
+ if (world.e(i - 1, j, k)) {
this.h(world, i - 1, j + 1, k);
} else {
this.h(world, i - 1, j - 1, k);
}
- if (world.d(i + 1, j, k)) {
+ if (world.e(i + 1, j, k)) {
this.h(world, i + 1, j + 1, k);
} else {
this.h(world, i + 1, j - 1, k);
}
- if (world.d(i, j, k - 1)) {
+ if (world.e(i, j, k - 1)) {
this.h(world, i, j + 1, k - 1);
} else {
this.h(world, i, j - 1, k - 1);
}
- if (world.d(i, j, k + 1)) {
+ if (world.e(i, j, k + 1)) {
this.h(world, i, j + 1, k + 1);
} else {
this.h(world, i, j - 1, k + 1);
@@ -237,25 +237,25 @@ public class BlockRedstoneWire extends Block {
this.h(world, i + 1, j, k);
this.h(world, i, j, k - 1);
this.h(world, i, j, k + 1);
- if (world.d(i - 1, j, k)) {
+ if (world.e(i - 1, j, k)) {
this.h(world, i - 1, j + 1, k);
} else {
this.h(world, i - 1, j - 1, k);
}
- if (world.d(i + 1, j, k)) {
+ if (world.e(i + 1, j, k)) {
this.h(world, i + 1, j + 1, k);
} else {
this.h(world, i + 1, j - 1, k);
}
- if (world.d(i, j, k - 1)) {
+ if (world.e(i, j, k - 1)) {
this.h(world, i, j + 1, k - 1);
} else {
this.h(world, i, j - 1, k - 1);
}
- if (world.d(i, j, k + 1)) {
+ if (world.e(i, j, k + 1)) {
this.h(world, i, j + 1, k + 1);
} else {
this.h(world, i, j - 1, k + 1);
@@ -280,7 +280,7 @@ public class BlockRedstoneWire extends Block {
boolean flag = this.canPlace(world, i, j, k);
if (!flag) {
- this.b_(world, i, j, k, i1);
+ this.g(world, i, j, k, i1);
world.setTypeId(i, j, k, 0);
} else {
this.g(world, i, j, k);
@@ -294,7 +294,7 @@ public class BlockRedstoneWire extends Block {
return Item.REDSTONE.id;
}
- public boolean c(World world, int i, int j, int k, int l) {
+ public boolean d(World world, int i, int j, int k, int l) {
return !this.a ? false : this.a(world, i, j, k, l);
}
@@ -306,25 +306,25 @@ public class BlockRedstoneWire extends Block {
} else if (l == 1) {
return true;
} else {
- boolean flag = b(iblockaccess, i - 1, j, k) || !iblockaccess.d(i - 1, j, k) && b(iblockaccess, i - 1, j - 1, k);
- boolean flag1 = b(iblockaccess, i + 1, j, k) || !iblockaccess.d(i + 1, j, k) && b(iblockaccess, i + 1, j - 1, k);
- boolean flag2 = b(iblockaccess, i, j, k - 1) || !iblockaccess.d(i, j, k - 1) && b(iblockaccess, i, j - 1, k - 1);
- boolean flag3 = b(iblockaccess, i, j, k + 1) || !iblockaccess.d(i, j, k + 1) && b(iblockaccess, i, j - 1, k + 1);
+ boolean flag = c(iblockaccess, i - 1, j, k, 1) || !iblockaccess.e(i - 1, j, k) && c(iblockaccess, i - 1, j - 1, k, -1);
+ boolean flag1 = c(iblockaccess, i + 1, j, k, 3) || !iblockaccess.e(i + 1, j, k) && c(iblockaccess, i + 1, j - 1, k, -1);
+ boolean flag2 = c(iblockaccess, i, j, k - 1, 2) || !iblockaccess.e(i, j, k - 1) && c(iblockaccess, i, j - 1, k - 1, -1);
+ boolean flag3 = c(iblockaccess, i, j, k + 1, 0) || !iblockaccess.e(i, j, k + 1) && c(iblockaccess, i, j - 1, k + 1, -1);
- if (!iblockaccess.d(i, j + 1, k)) {
- if (iblockaccess.d(i - 1, j, k) && b(iblockaccess, i - 1, j + 1, k)) {
+ if (!iblockaccess.e(i, j + 1, k)) {
+ if (iblockaccess.e(i - 1, j, k) && c(iblockaccess, i - 1, j + 1, k, -1)) {
flag = true;
}
- if (iblockaccess.d(i + 1, j, k) && b(iblockaccess, i + 1, j + 1, k)) {
+ if (iblockaccess.e(i + 1, j, k) && c(iblockaccess, i + 1, j + 1, k, -1)) {
flag1 = true;
}
- if (iblockaccess.d(i, j, k - 1) && b(iblockaccess, i, j + 1, k - 1)) {
+ if (iblockaccess.e(i, j, k - 1) && c(iblockaccess, i, j + 1, k - 1, -1)) {
flag2 = true;
}
- if (iblockaccess.d(i, j, k + 1) && b(iblockaccess, i, j + 1, k + 1)) {
+ if (iblockaccess.e(i, j, k + 1) && c(iblockaccess, i, j + 1, k + 1, -1)) {
flag3 = true;
}
}
@@ -337,9 +337,21 @@ public class BlockRedstoneWire extends Block {
return this.a;
}
- public static boolean b(IBlockAccess iblockaccess, int i, int j, int k) {
- int l = iblockaccess.getTypeId(i, j, k);
+ public static boolean c(IBlockAccess iblockaccess, int i, int j, int k, int l) {
+ int i1 = iblockaccess.getTypeId(i, j, k);
- return l == Block.REDSTONE_WIRE.id ? true : (l == 0 ? false : Block.byId[l].isPowerSource());
+ if (i1 == Block.REDSTONE_WIRE.id) {
+ return true;
+ } else if (i1 == 0) {
+ return false;
+ } else if (Block.byId[i1].isPowerSource()) {
+ return true;
+ } else if (i1 != Block.DIODE_OFF.id && i1 != Block.DIODE_ON.id) {
+ return false;
+ } else {
+ int j1 = iblockaccess.getData(i, j, k);
+
+ return l == BedBlockTextures.b[j1 & 3];
+ }
}
}
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
index 0106d612a2..012205d07d 100644
--- a/src/main/java/net/minecraft/server/BlockSapling.java
+++ b/src/main/java/net/minecraft/server/BlockSapling.java
@@ -60,7 +60,7 @@ public class BlockSapling extends BlockFlower {
// CraftBukkit end
}
- protected int b(int i) {
+ protected int a_(int i) {
return i & 3;
}
diff --git a/src/main/java/net/minecraft/server/BlockSign.java b/src/main/java/net/minecraft/server/BlockSign.java
index cfb9cdeed6..f47462c184 100644
--- a/src/main/java/net/minecraft/server/BlockSign.java
+++ b/src/main/java/net/minecraft/server/BlockSign.java
@@ -20,7 +20,7 @@ public class BlockSign extends BlockContainer {
this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}
@@ -101,7 +101,7 @@ public class BlockSign extends BlockContainer {
}
if (flag) {
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
}
diff --git a/src/main/java/net/minecraft/server/BlockSnow.java b/src/main/java/net/minecraft/server/BlockSnow.java
index 8f9dc0d944..31a91064be 100644
--- a/src/main/java/net/minecraft/server/BlockSnow.java
+++ b/src/main/java/net/minecraft/server/BlockSnow.java
@@ -12,7 +12,7 @@ public class BlockSnow extends Block {
this.a(true);
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
int l = world.getData(i, j, k) & 7;
return l >= 3 ? AxisAlignedBB.b((double) i + this.minX, (double) j + this.minY, (double) k + this.minZ, (double) i + this.maxX, (double) ((float) j + 0.5F), (double) k + this.maxZ) : null;
@@ -45,7 +45,7 @@ public class BlockSnow extends Block {
private boolean g(World world, int i, int j, int k) {
if (!this.canPlace(world, i, j, k)) {
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
return false;
} else {
@@ -89,7 +89,7 @@ public class BlockSnow extends Block {
}
// CraftBukkit end
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
}
}
diff --git a/src/main/java/net/minecraft/server/BlockSoil.java b/src/main/java/net/minecraft/server/BlockSoil.java
index 0ff91b0a29..6e700ad515 100644
--- a/src/main/java/net/minecraft/server/BlockSoil.java
+++ b/src/main/java/net/minecraft/server/BlockSoil.java
@@ -17,7 +17,7 @@ public class BlockSoil extends Block {
this.f(255);
}
- public AxisAlignedBB d(World world, int i, int j, int k) {
+ public AxisAlignedBB e(World world, int i, int j, int k) {
return AxisAlignedBB.b((double) (i + 0), (double) (j + 0), (double) (k + 0), (double) (i + 1), (double) (j + 1), (double) (k + 1));
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 23735b6ad2..fdb28f4b9c 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
@@ -261,7 +262,7 @@ public class Chunk {
this.c(i, k);
this.e.a(i, j, k, i1);
if (l != 0) {
- Block.byId[l].e(this.world, l1, j, i2);
+ Block.byId[l].c(this.world, l1, j, i2);
}
this.o = true;
@@ -298,7 +299,7 @@ public class Chunk {
this.world.a(EnumSkyBlock.BLOCK, k1, j, l1, k1, j, l1);
this.c(i, k);
if (l != 0 && !this.world.isStatic) {
- Block.byId[l].e(this.world, k1, j, l1);
+ Block.byId[l].c(this.world, k1, j, l1);
}
this.o = true;
@@ -371,15 +372,15 @@ public class Chunk {
k = this.entitySlices.length - 1;
}
- entity.bF = true;
- entity.bG = this.x;
- entity.bH = k;
- entity.bI = this.z;
+ entity.bG = true;
+ entity.bH = this.x;
+ entity.bI = k;
+ entity.bJ = this.z;
this.entitySlices[k].add(entity);
}
public void b(Entity entity) {
- this.a(entity, entity.bH);
+ this.a(entity, entity.bI);
}
public void a(Entity entity, int i) {
@@ -411,11 +412,16 @@ public class Chunk {
BlockContainer blockcontainer = (BlockContainer) Block.byId[l];
- blockcontainer.e(this.world, this.x * 16 + i, j, this.z * 16 + k);
+ blockcontainer.c(this.world, this.x * 16 + i, j, this.z * 16 + k);
tileentity = (TileEntity) this.tileEntities.get(chunkposition);
}
- return tileentity;
+ if (tileentity != null && tileentity.g()) {
+ this.tileEntities.remove(chunkposition);
+ return null;
+ } else {
+ return tileentity;
+ }
}
public void a(TileEntity tileentity) {
@@ -424,6 +430,9 @@ public class Chunk {
int k = tileentity.z - this.z * 16;
this.a(i, j, k, tileentity);
+ if (this.c) {
+ this.world.c.add(tileentity);
+ }
}
public void a(int i, int j, int k, TileEntity tileentity) {
@@ -434,14 +443,7 @@ public class Chunk {
tileentity.y = j;
tileentity.z = this.z * 16 + k;
if (this.getTypeId(i, j, k) != 0 && Block.byId[this.getTypeId(i, j, k)] instanceof BlockContainer) {
- if (this.c) {
- if (this.tileEntities.get(chunkposition) != null) {
- this.world.c.remove(this.tileEntities.get(chunkposition));
- }
-
- this.world.c.add(tileentity);
- }
-
+ tileentity.j();
this.tileEntities.put(chunkposition, tileentity);
} else {
System.out.println("Attempted to place a tile entity where there was no entity tile!");
@@ -452,13 +454,17 @@ public class Chunk {
ChunkPosition chunkposition = new ChunkPosition(i, j, k);
if (this.c) {
- this.world.c.remove(this.tileEntities.remove(chunkposition));
+ TileEntity tileentity = (TileEntity) this.tileEntities.remove(chunkposition);
+
+ if (tileentity != null) {
+ tileentity.h();
+ }
}
}
public void addEntities() {
this.c = true;
- this.world.c.addAll(this.tileEntities.values());
+ this.world.a(this.tileEntities.values());
for (int i = 0; i < this.entitySlices.length; ++i) {
this.world.a(this.entitySlices[i]);
@@ -467,7 +473,13 @@ public class Chunk {
public void removeEntities() {
this.c = false;
- this.world.c.removeAll(this.tileEntities.values());
+ Iterator iterator = this.tileEntities.values().iterator();
+
+ while (iterator.hasNext()) {
+ TileEntity tileentity = (TileEntity) iterator.next();
+
+ tileentity.h();
+ }
for (int i = 0; i < this.entitySlices.length; ++i) {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/ContainerWorkbench.java b/src/main/java/net/minecraft/server/ContainerWorkbench.java
index 0bcdc7216c..8d180e9048 100644
--- a/src/main/java/net/minecraft/server/ContainerWorkbench.java
+++ b/src/main/java/net/minecraft/server/ContainerWorkbench.java
@@ -53,12 +53,13 @@ public class ContainerWorkbench extends Container {
public void a(EntityHuman entityhuman) {
super.a(entityhuman);
+ if (!this.c.isStatic) {
+ for (int i = 0; i < 9; ++i) {
+ ItemStack itemstack = this.craftInventory.getItem(i);
- for (int i = 0; i < 9; ++i) {
- ItemStack itemstack = this.craftInventory.getItem(i);
-
- if (itemstack != null) {
- entityhuman.b(itemstack);
+ if (itemstack != null) {
+ entityhuman.b(itemstack);
+ }
}
}
}
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
index 3d6b9335c1..78ca3c4feb 100644
--- a/src/main/java/net/minecraft/server/CraftingManager.java
+++ b/src/main/java/net/minecraft/server/CraftingManager.java
@@ -76,6 +76,8 @@ public class CraftingManager {
this.registerShapedRecipe(new ItemStack(Block.STONE_PLATE, 1), new Object[] { "##", Character.valueOf('#'), Block.STONE});
this.registerShapedRecipe(new ItemStack(Block.WOOD_PLATE, 1), new Object[] { "##", Character.valueOf('#'), Block.WOOD});
this.registerShapedRecipe(new ItemStack(Block.DISPENSER, 1), new Object[] { "###", "#X#", "#R#", Character.valueOf('#'), Block.COBBLESTONE, Character.valueOf('X'), Item.BOW, Character.valueOf('R'), Item.REDSTONE});
+ this.registerShapedRecipe(new ItemStack(Block.PISTON, 1), new Object[] { "TTT", "#X#", "#R#", Character.valueOf('#'), Block.COBBLESTONE, Character.valueOf('X'), Item.IRON_INGOT, Character.valueOf('R'), Item.REDSTONE, Character.valueOf('T'), Block.WOOD});
+ this.registerShapedRecipe(new ItemStack(Block.PISTON_STICKY, 1), new Object[] { "S", "P", Character.valueOf('S'), Item.SLIME_BALL, Character.valueOf('P'), Block.PISTON});
this.registerShapedRecipe(new ItemStack(Item.BED, 1), new Object[] { "###", "XXX", Character.valueOf('#'), Block.WOOL, Character.valueOf('X'), Block.WOOD});
Collections.sort(this.b, new RecipeSorter(this));
System.out.println(this.b.size() + " recipes");
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 42c598aead..4edecff60d 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -76,13 +76,14 @@ public abstract class Entity {
private boolean justCreated;
protected boolean fireProof;
protected DataWatcher datawatcher;
+ public float bF;
private double d;
private double e;
- public boolean bF;
- public int bG;
+ public boolean bG;
public int bH;
public int bI;
- public boolean bJ;
+ public int bJ;
+ public boolean bK;
public UUID uniqueId = UUID.randomUUID(); // CraftBukkit
public Entity(World world) {
@@ -117,7 +118,8 @@ public abstract class Entity {
this.justCreated = true;
this.fireProof = false;
this.datawatcher = new DataWatcher();
- this.bF = false;
+ this.bF = 0.0F;
+ this.bG = false;
this.world = world;
this.setPosition(0.0D, 0.0D, 0.0D);
this.datawatcher.a(0, Byte.valueOf((byte) 0));
@@ -126,7 +128,7 @@ public abstract class Entity {
protected abstract void b();
- public DataWatcher Z() {
+ public DataWatcher aa() {
return this.datawatcher;
}
@@ -195,11 +197,11 @@ public abstract class Entity {
this.boundingBox.c(d0 - (double) f, d1 - (double) this.height + (double) this.br, d2 - (double) f, d0 + (double) f, d1 - (double) this.height + (double) this.br + (double) f1, d2 + (double) f);
}
- public void o_() {
- this.Q();
+ public void m_() {
+ this.R();
}
- public void Q() {
+ public void R() {
if (this.vehicle != null && this.vehicle.dead) {
this.vehicle = null;
}
@@ -274,12 +276,12 @@ public abstract class Entity {
}
}
- if (this.ad()) {
- this.aa();
+ if (this.ae()) {
+ this.ab();
}
if (this.locY < -64.0D) {
- this.X();
+ this.Y();
}
if (!this.world.isStatic) {
@@ -290,7 +292,7 @@ public abstract class Entity {
this.justCreated = false;
}
- protected void aa() {
+ protected void ab() {
if (!this.fireProof) {
// CraftBukkit start - TODO: this event spams!
if (this instanceof EntityLiving) {
@@ -328,7 +330,7 @@ public abstract class Entity {
}
}
- protected void X() {
+ protected void Y() {
this.die();
}
@@ -599,7 +601,7 @@ public abstract class Entity {
}
}
- boolean flag2 = this.ab();
+ boolean flag2 = this.ac();
if (this.world.d(this.boundingBox.shrink(0.0010D, 0.0010D, 0.0010D))) {
this.burn(1);
@@ -672,11 +674,11 @@ public abstract class Entity {
}
}
- public boolean ab() {
+ public boolean ac() {
return this.bA || this.world.s(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ));
}
- public boolean ac() {
+ public boolean ad() {
return this.bA;
}
@@ -685,7 +687,7 @@ public abstract class Entity {
}
public boolean a(Material material) {
- double d0 = this.locY + (double) this.s();
+ double d0 = this.locY + (double) this.t();
int i = MathHelper.floor(this.locX);
int j = MathHelper.d((float) MathHelper.floor(d0));
int k = MathHelper.floor(this.locZ);
@@ -701,11 +703,11 @@ public abstract class Entity {
}
}
- public float s() {
+ public float t() {
return 0.0F;
}
- public boolean ad() {
+ public boolean ae() {
return this.world.a(this.boundingBox.b(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA);
}
@@ -734,7 +736,17 @@ public abstract class Entity {
int j = MathHelper.floor(this.locY - (double) this.height + d0);
int k = MathHelper.floor(this.locZ);
- return this.world.a(MathHelper.floor(this.boundingBox.a), MathHelper.floor(this.boundingBox.b), MathHelper.floor(this.boundingBox.c), MathHelper.floor(this.boundingBox.d), MathHelper.floor(this.boundingBox.e), MathHelper.floor(this.boundingBox.f)) ? this.world.m(i, j, k) : 0.0F;
+ if (this.world.a(MathHelper.floor(this.boundingBox.a), MathHelper.floor(this.boundingBox.b), MathHelper.floor(this.boundingBox.c), MathHelper.floor(this.boundingBox.d), MathHelper.floor(this.boundingBox.e), MathHelper.floor(this.boundingBox.f))) {
+ float f1 = this.world.n(i, j, k);
+
+ if (f1 < this.bF) {
+ f1 = this.bF;
+ }
+
+ return f1;
+ } else {
+ return this.bF;
+ }
}
public void spawnIn(World world) {
@@ -846,16 +858,16 @@ public abstract class Entity {
this.motZ += d2;
}
- protected void ae() {
+ protected void af() {
this.velocityChanged = true;
}
public boolean damageEntity(Entity entity, int i) {
- this.ae();
+ this.af();
return false;
}
- public boolean n_() {
+ public boolean l_() {
return false;
}
@@ -866,7 +878,7 @@ public abstract class Entity {
public void c(Entity entity, int i) {}
public boolean c(NBTTagCompound nbttagcompound) {
- String s = this.af();
+ String s = this.ag();
if (!this.dead && s != null) {
nbttagcompound.setString("id", s);
@@ -987,7 +999,7 @@ public abstract class Entity {
// CraftBukkit end
}
- protected final String af() {
+ protected final String ag() {
return EntityTypes.b(this);
}
@@ -1039,20 +1051,20 @@ public abstract class Entity {
return entityitem;
}
- public boolean S() {
+ public boolean T() {
return !this.dead;
}
- public boolean J() {
+ public boolean K() {
for (int i = 0; i < 8; ++i) {
float f = ((float) ((i >> 0) % 2) - 0.5F) * this.length * 0.9F;
float f1 = ((float) ((i >> 1) % 2) - 0.5F) * 0.1F;
float f2 = ((float) ((i >> 2) % 2) - 0.5F) * this.length * 0.9F;
int j = MathHelper.floor(this.locX + (double) f);
- int k = MathHelper.floor(this.locY + (double) this.s() + (double) f1);
+ int k = MathHelper.floor(this.locY + (double) this.t() + (double) f1);
int l = MathHelper.floor(this.locZ + (double) f2);
- if (this.world.d(j, k, l)) {
+ if (this.world.e(j, k, l)) {
return true;
}
}
@@ -1068,14 +1080,14 @@ public abstract class Entity {
return null;
}
- public void D() {
+ public void E() {
if (this.vehicle.dead) {
this.vehicle = null;
} else {
this.motX = 0.0D;
this.motY = 0.0D;
this.motZ = 0.0D;
- this.o_();
+ this.m_();
if (this.vehicle != null) {
this.vehicle.f();
this.e += (double) (this.vehicle.yaw - this.vehicle.lastYaw);
@@ -1125,10 +1137,10 @@ public abstract class Entity {
}
public void f() {
- this.passenger.setPosition(this.locX, this.locY + this.m() + this.passenger.H(), this.locZ);
+ this.passenger.setPosition(this.locX, this.locY + this.m() + this.passenger.I(), this.locZ);
}
- public double H() {
+ public double I() {
return (double) this.height;
}
@@ -1196,11 +1208,11 @@ public abstract class Entity {
}
}
- public Vec3D Y() {
+ public Vec3D Z() {
return null;
}
- public void O() {}
+ public void P() {}
public ItemStack[] getEquipment() {
return null;
@@ -1256,13 +1268,13 @@ public abstract class Entity {
double d4 = d1 - (double) j;
double d5 = d2 - (double) k;
- if (this.world.d(i, j, k)) {
- boolean flag = !this.world.d(i - 1, j, k);
- boolean flag1 = !this.world.d(i + 1, j, k);
- boolean flag2 = !this.world.d(i, j - 1, k);
- boolean flag3 = !this.world.d(i, j + 1, k);
- boolean flag4 = !this.world.d(i, j, k - 1);
- boolean flag5 = !this.world.d(i, j, k + 1);
+ if (this.world.e(i, j, k)) {
+ boolean flag = !this.world.e(i - 1, j, k);
+ boolean flag1 = !this.world.e(i + 1, j, k);
+ boolean flag2 = !this.world.e(i, j - 1, k);
+ boolean flag3 = !this.world.e(i, j + 1, k);
+ boolean flag4 = !this.world.e(i, j, k - 1);
+ boolean flag5 = !this.world.e(i, j, k + 1);
byte b0 = -1;
double d6 = 9999.0D;
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index f8ce219480..5bd6cafb2d 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -41,7 +41,7 @@ public class EntityArrow extends Entity {
this.shooter = entityliving;
this.fromPlayer = entityliving instanceof EntityHuman;
this.b(0.5F, 0.5F);
- this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.s(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
+ this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.t(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F);
this.locY -= 0.10000000149011612D;
this.locZ -= (double) (MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F);
@@ -77,8 +77,8 @@ public class EntityArrow extends Entity {
this.j = 0;
}
- public void o_() {
- super.o_();
+ public void m_() {
+ super.m_();
if (this.lastPitch == 0.0F && this.lastYaw == 0.0F) {
float f = MathHelper.a(this.motX * this.motX + this.motZ * this.motZ);
@@ -90,7 +90,7 @@ public class EntityArrow extends Entity {
if (i > 0) {
Block.byId[i].a(this.world, this.d, this.e, this.f);
- AxisAlignedBB axisalignedbb = Block.byId[i].d(this.world, this.d, this.e, this.f);
+ AxisAlignedBB axisalignedbb = Block.byId[i].e(this.world, this.d, this.e, this.f);
if (axisalignedbb != null && axisalignedbb.a(Vec3D.create(this.locX, this.locY, this.locZ))) {
this.inGround = true;
@@ -139,7 +139,7 @@ public class EntityArrow extends Entity {
for (int k = 0; k < list.size(); ++k) {
Entity entity1 = (Entity) list.get(k);
- if (entity1.n_() && (entity1 != this.shooter || this.k >= 5)) {
+ if (entity1.l_() && (entity1 != this.shooter || this.k >= 5)) {
f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.b((double) f1, (double) f1, (double) f1);
MovingObjectPosition movingobjectposition1 = axisalignedbb1.a(vec3d, vec3d1);
@@ -245,7 +245,7 @@ public class EntityArrow extends Entity {
float f3 = 0.99F;
f1 = 0.03F;
- if (this.ac()) {
+ if (this.ad()) {
for (int l = 0; l < 4; ++l) {
float f4 = 0.25F;
diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java
index 84ec30839f..c090d6e67d 100644
--- a/src/main/java/net/minecraft/server/EntityBoat.java
+++ b/src/main/java/net/minecraft/server/EntityBoat.java
@@ -107,7 +107,7 @@ public class EntityBoat extends Entity {
this.c = -this.c;
this.b = 10;
this.damage += i * 10;
- this.ae();
+ this.af();
if (this.damage > 40) {
// CraftBukkit start
@@ -143,11 +143,11 @@ public class EntityBoat extends Entity {
}
}
- public boolean n_() {
+ public boolean l_() {
return !this.dead;
}
- public void o_() {
+ public void m_() {
// CraftBukkit start
double prevX = this.locX;
double prevY = this.locY;
@@ -156,7 +156,7 @@ public class EntityBoat extends Entity {
float prevPitch = this.pitch;
// CraftBukkit end
- super.o_();
+ super.m_();
if (this.b > 0) {
--this.b;
}
@@ -386,7 +386,7 @@ public class EntityBoat extends Entity {
double d0 = Math.cos((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D;
double d1 = Math.sin((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D;
- this.passenger.setPosition(this.locX + d0, this.locY + this.m() + this.passenger.H(), this.locZ + d1);
+ this.passenger.setPosition(this.locX + d0, this.locY + this.m() + this.passenger.I(), this.locZ + d1);
}
}
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
index ebd227790b..58f98396fe 100644
--- a/src/main/java/net/minecraft/server/EntityCreature.java
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
@@ -44,7 +44,7 @@ public class EntityCreature extends EntityLiving {
if (this.target != null) {
this.pathEntity = this.world.findPath(this, this.target, f);
}
- } else if (!this.target.S()) {
+ } else if (!this.target.T()) {
// CraftBukkit start
EntityTargetEvent event = new EntityTargetEvent(this.getBukkitEntity(), null, EntityTargetEvent.TargetReason.TARGET_DIED);
this.world.getServer().getPluginManager().callEvent(event);
@@ -70,35 +70,12 @@ public class EntityCreature extends EntityLiving {
if (!this.e && this.target != null && (this.pathEntity == null || this.random.nextInt(20) == 0)) {
this.pathEntity = this.world.findPath(this, this.target, f);
} else if (!this.e && (this.pathEntity == null && this.random.nextInt(80) == 0 || this.random.nextInt(80) == 0)) {
- boolean flag = false;
- int i = -1;
- int j = -1;
- int k = -1;
- float f2 = -99999.0F;
-
- for (int l = 0; l < 10; ++l) {
- int i1 = MathHelper.floor(this.locX + (double) this.random.nextInt(13) - 6.0D);
- int j1 = MathHelper.floor(this.locY + (double) this.random.nextInt(7) - 3.0D);
- int k1 = MathHelper.floor(this.locZ + (double) this.random.nextInt(13) - 6.0D);
- float f3 = this.a(i1, j1, k1);
-
- if (f3 > f2) {
- f2 = f3;
- i = i1;
- j = j1;
- k = k1;
- flag = true;
- }
- }
-
- if (flag) {
- this.pathEntity = this.world.a(this, i, j, k, 10.0F);
- }
+ this.B();
}
- int l1 = MathHelper.floor(this.boundingBox.b + 0.5D);
- boolean flag1 = this.ac();
- boolean flag2 = this.ad();
+ int i = MathHelper.floor(this.boundingBox.b + 0.5D);
+ boolean flag = this.ad();
+ boolean flag1 = this.ae();
this.pitch = 0.0F;
if (this.pathEntity != null && this.random.nextInt(100) != 0) {
@@ -119,37 +96,37 @@ public class EntityCreature extends EntityLiving {
if (vec3d != null) {
double d1 = vec3d.a - this.locX;
double d2 = vec3d.c - this.locZ;
- double d3 = vec3d.b - (double) l1;
+ double d3 = vec3d.b - (double) i;
// CraftBukkit - Math -> TrigMath
- float f4 = (float) (TrigMath.atan2(d2, d1) * 180.0D / 3.1415927410125732D) - 90.0F;
- float f5 = f4 - this.yaw;
+ float f2 = (float) (TrigMath.atan2(d2, d1) * 180.0D / 3.1415927410125732D) - 90.0F;
+ float f3 = f2 - this.yaw;
- for (this.aA = this.aE; f5 < -180.0F; f5 += 360.0F) {
+ for (this.aA = this.aE; f3 < -180.0F; f3 += 360.0F) {
;
}
- while (f5 >= 180.0F) {
- f5 -= 360.0F;
+ while (f3 >= 180.0F) {
+ f3 -= 360.0F;
}
- if (f5 > 30.0F) {
- f5 = 30.0F;
+ if (f3 > 30.0F) {
+ f3 = 30.0F;
}
- if (f5 < -30.0F) {
- f5 = -30.0F;
+ if (f3 < -30.0F) {
+ f3 = -30.0F;
}
- this.yaw += f5;
+ this.yaw += f3;
if (this.e && this.target != null) {
double d4 = this.target.locX - this.locX;
double d5 = this.target.locZ - this.locZ;
- float f6 = this.yaw;
+ float f4 = this.yaw;
this.yaw = (float) (Math.atan2(d5, d4) * 180.0D / 3.1415927410125732D) - 90.0F;
- f5 = (f6 - this.yaw + 90.0F) * 3.1415927F / 180.0F;
- this.az = -MathHelper.sin(f5) * this.aA * 1.0F;
- this.aA = MathHelper.cos(f5) * this.aA * 1.0F;
+ f3 = (f4 - this.yaw + 90.0F) * 3.1415927F / 180.0F;
+ this.az = -MathHelper.sin(f3) * this.aA * 1.0F;
+ this.aA = MathHelper.cos(f3) * this.aA * 1.0F;
}
if (d3 > 0.0D) {
@@ -161,11 +138,11 @@ public class EntityCreature extends EntityLiving {
this.a(this.target, 30.0F, 30.0F);
}
- if (this.positionChanged && !this.B()) {
+ if (this.positionChanged && !this.C()) {
this.aC = true;
}
- if (this.random.nextFloat() < 0.8F && (flag1 || flag2)) {
+ if (this.random.nextFloat() < 0.8F && (flag || flag1)) {
this.aC = true;
}
} else {
@@ -174,6 +151,33 @@ public class EntityCreature extends EntityLiving {
}
}
+ protected void B() {
+ boolean flag = false;
+ int i = -1;
+ int j = -1;
+ int k = -1;
+ float f = -99999.0F;
+
+ for (int l = 0; l < 10; ++l) {
+ int i1 = MathHelper.floor(this.locX + (double) this.random.nextInt(13) - 6.0D);
+ int j1 = MathHelper.floor(this.locY + (double) this.random.nextInt(7) - 3.0D);
+ int k1 = MathHelper.floor(this.locZ + (double) this.random.nextInt(13) - 6.0D);
+ float f1 = this.a(i1, j1, k1);
+
+ if (f1 > f) {
+ f = f1;
+ i = i1;
+ j = j1;
+ k = k1;
+ flag = true;
+ }
+ }
+
+ if (flag) {
+ this.pathEntity = this.world.a(this, i, j, k, 10.0F);
+ }
+ }
+
protected void a(Entity entity, float f) {}
protected void b(Entity entity, float f) {}
@@ -194,7 +198,7 @@ public class EntityCreature extends EntityLiving {
return super.d() && this.a(i, j, k) >= 0.0F;
}
- public boolean B() {
+ public boolean C() {
return this.pathEntity != null;
}
@@ -202,7 +206,7 @@ public class EntityCreature extends EntityLiving {
this.pathEntity = pathentity;
}
- public Entity E() {
+ public Entity F() {
return this.target;
}
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index 690b746120..31743fe16e 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -46,7 +46,7 @@ public class EntityCreeper extends EntityMonster {
}
}
- public void o_() {
+ public void m_() {
this.b = this.fuseTicks;
if (this.world.isStatic) {
int i = this.x();
@@ -65,7 +65,7 @@ public class EntityCreeper extends EntityMonster {
}
}
- super.o_();
+ super.m_();
if (this.target == null && this.fuseTicks > 0) {
this.e(-1);
--this.fuseTicks;
diff --git a/src/main/java/net/minecraft/server/EntityEgg.java b/src/main/java/net/minecraft/server/EntityEgg.java
index f2caba92a4..1346ec2793 100644
--- a/src/main/java/net/minecraft/server/EntityEgg.java
+++ b/src/main/java/net/minecraft/server/EntityEgg.java
@@ -34,7 +34,7 @@ public class EntityEgg extends Entity {
super(world);
this.thrower = entityliving;
this.b(0.25F, 0.25F);
- this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.s(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
+ this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.t(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F);
this.locY -= 0.10000000149011612D;
this.locZ -= (double) (MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F);
@@ -78,11 +78,11 @@ public class EntityEgg extends Entity {
this.h = 0;
}
- public void o_() {
+ public void m_() {
this.bo = this.locX;
this.bp = this.locY;
this.bq = this.locZ;
- super.o_();
+ super.m_();
if (this.a > 0) {
--this.a;
}
@@ -127,7 +127,7 @@ public class EntityEgg extends Entity {
for (int j = 0; j < list.size(); ++j) {
Entity entity1 = (Entity) list.get(j);
- if (entity1.n_() && (entity1 != this.thrower || this.i >= 5)) {
+ if (entity1.l_() && (entity1 != this.thrower || this.i >= 5)) {
float f = 0.3F;
AxisAlignedBB axisalignedbb = entity1.boundingBox.b((double) f, (double) f, (double) f);
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
@@ -293,7 +293,7 @@ public class EntityEgg extends Entity {
float f2 = 0.99F;
float f3 = 0.03F;
- if (this.ac()) {
+ if (this.ad()) {
for (int i1 = 0; i1 < 4; ++i1) {
float f4 = 0.25F;
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
index 48c27785dd..94acf4a54a 100644
--- a/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
@@ -60,8 +60,8 @@ public class EntityFireball extends Entity {
this.e = d2 / d3 * 0.1D;
}
- public void o_() {
- super.o_();
+ public void m_() {
+ super.m_();
this.fireTicks = 10;
if (this.a > 0) {
--this.a;
@@ -106,7 +106,7 @@ public class EntityFireball extends Entity {
for (int j = 0; j < list.size(); ++j) {
Entity entity1 = (Entity) list.get(j);
- if (entity1.n_() && (entity1 != this.shooter || this.l >= 25)) {
+ if (entity1.l_() && (entity1 != this.shooter || this.l >= 25)) {
float f = 0.3F;
AxisAlignedBB axisalignedbb = entity1.boundingBox.b((double) f, (double) f, (double) f);
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
@@ -195,7 +195,7 @@ public class EntityFireball extends Entity {
this.yaw = this.lastYaw + (this.yaw - this.lastYaw) * 0.2F;
float f2 = 0.95F;
- if (this.ac()) {
+ if (this.ad()) {
for (int k = 0; k < 4; ++k) {
float f3 = 0.25F;
@@ -233,14 +233,14 @@ public class EntityFireball extends Entity {
this.j = nbttagcompound.c("inGround") == 1;
}
- public boolean n_() {
+ public boolean l_() {
return true;
}
public boolean damageEntity(Entity entity, int i) {
- this.ae();
+ this.af();
if (entity != null) {
- Vec3D vec3d = entity.Y();
+ Vec3D vec3d = entity.Z();
if (vec3d != null) {
this.motX = vec3d.a;
diff --git a/src/main/java/net/minecraft/server/EntityFish.java b/src/main/java/net/minecraft/server/EntityFish.java
index 7b05e559d6..74bcf35e97 100644
--- a/src/main/java/net/minecraft/server/EntityFish.java
+++ b/src/main/java/net/minecraft/server/EntityFish.java
@@ -31,12 +31,12 @@ public class EntityFish extends Entity {
public EntityFish(World world) {
super(world);
this.b(0.25F, 0.25F);
- this.bJ = true;
+ this.bK = true;
}
public EntityFish(World world, EntityHuman entityhuman) {
super(world);
- this.bJ = true;
+ this.bK = true;
this.owner = entityhuman;
this.owner.hookedFish = this;
this.b(0.25F, 0.25F);
@@ -78,8 +78,8 @@ public class EntityFish extends Entity {
this.i = 0;
}
- public void o_() {
- super.o_();
+ public void m_() {
+ super.m_();
if (this.l > 0) {
double d0 = this.locX + (this.m - this.locX) / (double) this.l;
double d1 = this.locY + (this.n - this.locY) / (double) this.l;
@@ -102,9 +102,9 @@ public class EntityFish extends Entity {
this.c(this.yaw, this.pitch);
} else {
if (!this.world.isStatic) {
- ItemStack itemstack = this.owner.F();
+ ItemStack itemstack = this.owner.G();
- if (this.owner.dead || !this.owner.S() || itemstack == null || itemstack.getItem() != Item.FISHING_ROD || this.g(this.owner) > 1024.0D) {
+ if (this.owner.dead || !this.owner.T() || itemstack == null || itemstack.getItem() != Item.FISHING_ROD || this.g(this.owner) > 1024.0D) {
this.die();
this.owner.hookedFish = null;
return;
@@ -167,7 +167,7 @@ public class EntityFish extends Entity {
for (int j = 0; j < list.size(); ++j) {
Entity entity1 = (Entity) list.get(j);
- if (entity1.n_() && (entity1 != this.owner || this.j >= 5)) {
+ if (entity1.l_() && (entity1 != this.owner || this.j >= 5)) {
float f = 0.3F;
AxisAlignedBB axisalignedbb = entity1.boundingBox.b((double) f, (double) f, (double) f);
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java
index de563710a5..cd428f4556 100644
--- a/src/main/java/net/minecraft/server/EntityGhast.java
+++ b/src/main/java/net/minecraft/server/EntityGhast.java
@@ -28,8 +28,8 @@ public class EntityGhast extends EntityFlying implements IMonster {
this.datawatcher.a(16, Byte.valueOf((byte) 0));
}
- public void o_() {
- super.o_();
+ public void m_() {
+ super.m_();
byte b0 = this.datawatcher.a(16);
this.texture = b0 == 1 ? "/mob/ghast_fire.png" : "/mob/ghast.png";
@@ -40,7 +40,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
this.die();
}
- this.T();
+ this.U();
this.e = this.f;
double d0 = this.b - this.locX;
double d1 = this.c - this.locY;
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 712ded506f..259eee24b3 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -71,7 +71,7 @@ public abstract class EntityHuman extends EntityLiving {
this.datawatcher.a(16, Byte.valueOf((byte) 0));
}
- public void o_() {
+ public void m_() {
if (this.isSleeping()) {
++this.sleepTicks;
if (this.sleepTicks > 100) {
@@ -92,9 +92,9 @@ public abstract class EntityHuman extends EntityLiving {
}
}
- super.o_();
+ super.m_();
if (!this.world.isStatic && this.activeContainer != null && !this.activeContainer.b(this)) {
- this.x();
+ this.y();
this.activeContainer = this.defaultContainer;
}
@@ -139,20 +139,20 @@ public abstract class EntityHuman extends EntityLiving {
}
}
- protected boolean C() {
+ protected boolean D() {
return this.health <= 0 || this.isSleeping();
}
- protected void x() {
+ protected void y() {
this.activeContainer = this.defaultContainer;
}
- public void D() {
+ public void E() {
double d0 = this.locX;
double d1 = this.locY;
double d2 = this.locZ;
- super.D();
+ super.E();
this.n = this.o;
this.o = 0.0F;
this.i(this.locX - d0, this.locY - d1, this.locZ - d2);
@@ -172,7 +172,7 @@ public abstract class EntityHuman extends EntityLiving {
this.aa = (float) this.q / 8.0F;
}
- public void u() {
+ public void v() {
// CraftBukkit - spawnMonsters -> allowMonsters
if (!this.world.allowMonsters && this.health < 20 && this.ticksLived % 20 * 12 == 0) {
this.b(1);
@@ -180,7 +180,7 @@ public abstract class EntityHuman extends EntityLiving {
this.inventory.f();
this.n = this.o;
- super.u();
+ super.v();
float f = MathHelper.a(this.motX * this.motX + this.motZ * this.motZ);
// CraftBukkit - Math -> TrigMath
float f1 = (float) TrigMath.atan(-this.motY * 0.20000000298023224D) * 15.0F;
@@ -248,7 +248,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
- public void E() {
+ public void F() {
this.a(this.inventory.splitStack(this.inventory.itemInHandIndex, 1), false);
}
@@ -258,7 +258,7 @@ public abstract class EntityHuman extends EntityLiving {
public void a(ItemStack itemstack, boolean flag) {
if (itemstack != null) {
- EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY - 0.30000001192092896D + (double) this.s(), this.locZ, itemstack);
+ EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY - 0.30000001192092896D + (double) this.t(), this.locZ, itemstack);
entityitem.pickupDelay = 40;
float f = 0.1F;
@@ -372,11 +372,11 @@ public abstract class EntityHuman extends EntityLiving {
public void receive(Entity entity, int i) {}
- public float s() {
+ public float t() {
return 0.12F;
}
- protected void j_() {
+ protected void s() {
this.height = 1.62F;
}
@@ -437,7 +437,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
- protected boolean t() {
+ protected boolean j_() {
return false;
}
@@ -451,7 +451,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
- if (!(entityliving instanceof EntityHuman) || this.t()) {
+ if (!(entityliving instanceof EntityHuman) || this.j_()) {
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));
Iterator iterator = list.iterator();
@@ -459,7 +459,7 @@ public abstract class EntityHuman extends EntityLiving {
Entity entity = (Entity) iterator.next();
EntityWolf entitywolf1 = (EntityWolf) entity;
- if (entitywolf1.isTamed() && entitywolf1.E() == null && this.name.equals(entitywolf1.getOwnerName()) && (!flag || !entitywolf1.isSitting())) {
+ if (entitywolf1.isTamed() && entitywolf1.F() == null && this.name.equals(entitywolf1.getOwnerName()) && (!flag || !entitywolf1.isSitting())) {
// CraftBukkit start
org.bukkit.entity.Entity bukkitTarget = entity == null ? null : entityliving.getBukkitEntity();
@@ -502,32 +502,32 @@ public abstract class EntityHuman extends EntityLiving {
public void c(Entity entity) {
if (!entity.a(this)) {
- ItemStack itemstack = this.F();
+ ItemStack itemstack = this.G();
if (itemstack != null && entity instanceof EntityLiving) {
itemstack.a((EntityLiving) entity);
// CraftBukkit - bypass infinite items; <= 0 -> == 0
if (itemstack.count == 0) {
itemstack.a(this);
- this.G();
+ this.H();
}
}
}
}
- public ItemStack F() {
+ public ItemStack G() {
return this.inventory.getItemInHand();
}
- public void G() {
+ public void H() {
this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null);
}
- public double H() {
+ public double I() {
return (double) (this.height - 0.5F);
}
- public void k_() {
+ public void w() {
this.q = -1;
this.p = true;
}
@@ -562,19 +562,19 @@ public abstract class EntityHuman extends EntityLiving {
}
// CraftBukkit end
- ItemStack itemstack = this.F();
+ ItemStack itemstack = this.G();
if (itemstack != null && entity instanceof EntityLiving) {
itemstack.a((EntityLiving) entity, this);
// CraftBukkit - bypass infinite items; <= 0 -> == 0
if (itemstack.count == 0) {
itemstack.a(this);
- this.G();
+ this.H();
}
}
if (entity instanceof EntityLiving) {
- if (entity.S()) {
+ if (entity.T()) {
this.a((EntityLiving) entity, true);
}
@@ -593,13 +593,13 @@ public abstract class EntityHuman extends EntityLiving {
}
}
- public boolean J() {
- return !this.sleeping && super.J();
+ public boolean K() {
+ return !this.sleeping && super.K();
}
public EnumBedError a(int i, int j, int k) {
if (!this.world.isStatic) {
- if (this.isSleeping() || !this.S()) {
+ if (this.isSleeping() || !this.T()) {
return EnumBedError.OTHER_PROBLEM;
}
@@ -695,13 +695,13 @@ public abstract class EntityHuman extends EntityLiving {
public void a(boolean flag, boolean flag1, boolean flag2) {
this.b(0.6F, 1.8F);
- this.j_();
+ this.s();
ChunkCoordinates chunkcoordinates = this.A;
ChunkCoordinates chunkcoordinates1 = this.A;
if (chunkcoordinates != null && this.world.getTypeId(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z) == Block.BED.id) {
BlockBed.a(this.world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, false);
- chunkcoordinates1 = BlockBed.g(this.world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, 0);
+ chunkcoordinates1 = BlockBed.f(this.world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, 0);
if (chunkcoordinates1 == null) {
chunkcoordinates1 = new ChunkCoordinates(chunkcoordinates.x, chunkcoordinates.y + 1, chunkcoordinates.z);
}
@@ -755,7 +755,7 @@ public abstract class EntityHuman extends EntityLiving {
if (world.getTypeId(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z) != Block.BED.id) {
return null;
} else {
- ChunkCoordinates chunkcoordinates1 = BlockBed.g(world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, 0);
+ ChunkCoordinates chunkcoordinates1 = BlockBed.f(world, chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z, 0);
return chunkcoordinates1;
}
@@ -790,8 +790,8 @@ public abstract class EntityHuman extends EntityLiving {
public void a(Statistic statistic, int i) {}
- protected void N() {
- super.N();
+ protected void O() {
+ super.O();
this.a(StatisticList.u, 1);
}
@@ -813,7 +813,7 @@ public abstract class EntityHuman extends EntityLiving {
if (i > 0) {
this.a(StatisticList.q, i);
}
- } else if (this.ac()) {
+ } else if (this.ad()) {
i = Math.round(MathHelper.a(d0 * d0 + d2 * d2) * 100.0F);
if (i > 0) {
this.a(StatisticList.m, i);
@@ -871,7 +871,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
- public void O() {
+ public void P() {
if (this.D > 0) {
this.D = 10;
} else {
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index ffaaade611..8aa0b161f6 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -41,8 +41,8 @@ public class EntityItem extends Entity {
protected void b() {}
- public void o_() {
- super.o_();
+ public void m_() {
+ super.m_();
// CraftBukkit start
int currentTick = (int) (System.currentTimeMillis() / 50);
this.pickupDelay -= (currentTick - this.lastTick);
@@ -96,7 +96,7 @@ public class EntityItem extends Entity {
}
public boolean damageEntity(Entity entity, int i) {
- this.ae();
+ this.af();
this.f -= i;
if (this.f <= 0) {
this.die();
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0c607b5648..48013af820 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -80,10 +80,10 @@ public abstract class EntityLiving extends Entity {
protected void b() {}
public boolean e(Entity entity) {
- return this.world.a(Vec3D.create(this.locX, this.locY + (double) this.s(), this.locZ), Vec3D.create(entity.locX, entity.locY + (double) entity.s(), entity.locZ)) == null;
+ return this.world.a(Vec3D.create(this.locX, this.locY + (double) this.t(), this.locZ), Vec3D.create(entity.locX, entity.locY + (double) entity.t(), entity.locZ)) == null;
}
- public boolean n_() {
+ public boolean l_() {
return !this.dead;
}
@@ -91,7 +91,7 @@ public abstract class EntityLiving extends Entity {
return !this.dead;
}
- public float s() {
+ public float t() {
return this.width * 0.85F;
}
@@ -99,7 +99,7 @@ public abstract class EntityLiving extends Entity {
return 80;
}
- public void P() {
+ public void Q() {
String s = this.g();
if (s != null) {
@@ -107,15 +107,15 @@ public abstract class EntityLiving extends Entity {
}
}
- public void Q() {
+ public void R() {
this.Z = this.aa;
- super.Q();
+ super.R();
if (this.random.nextInt(1000) < this.a++) {
this.a = -this.e();
- this.P();
+ this.Q();
}
- if (this.S() && this.J()) {
+ if (this.T() && this.K()) {
// CraftBukkit start
EntityDamageEvent event = new EntityDamageEvent(this.getBukkitEntity(), EntityDamageEvent.DamageCause.SUFFOCATION, 1);
this.world.getServer().getPluginManager().callEvent(event);
@@ -132,7 +132,7 @@ public abstract class EntityLiving extends Entity {
int i;
- if (this.S() && this.a(Material.WATER) && !this.b_()) {
+ if (this.T() && this.a(Material.WATER) && !this.b_()) {
--this.airTicks;
if (this.airTicks == -20) {
this.airTicks = 0;
@@ -176,7 +176,7 @@ public abstract class EntityLiving extends Entity {
if (this.health <= 0) {
++this.deathTicks;
if (this.deathTicks > 20) {
- this.W();
+ this.X();
this.die();
for (i = 0; i < 20; ++i) {
@@ -195,7 +195,7 @@ public abstract class EntityLiving extends Entity {
this.lastPitch = this.pitch;
}
- public void R() {
+ public void S() {
for (int i = 0; i < 20; ++i) {
double d0 = this.random.nextGaussian() * 0.02D;
double d1 = this.random.nextGaussian() * 0.02D;
@@ -206,15 +206,15 @@ public abstract class EntityLiving extends Entity {
}
}
- public void D() {
- super.D();
+ public void E() {
+ super.E();
this.M = this.N;
this.N = 0.0F;
}
- public void o_() {
- super.o_();
- this.u();
+ public void m_() {
+ super.m_();
+ this.v();
double d0 = this.locX - this.lastX;
double d1 = this.locZ - this.lastZ;
float f = MathHelper.a(d0 * d0 + d1 * d1);
@@ -361,7 +361,7 @@ public abstract class EntityLiving extends Entity {
this.af = 0.0F;
if (flag) {
this.world.a(this, (byte) 2);
- this.ae();
+ this.af();
if (entity != null) {
double d0 = entity.locX - this.locX;
@@ -439,13 +439,13 @@ public abstract class EntityLiving extends Entity {
this.ak = true;
if (!this.world.isStatic) {
- this.r();
+ this.q();
}
this.world.a(this, (byte) 3);
}
- protected void r() {
+ protected void q() {
int i = this.j();
// CraftBukkit start - whole method
@@ -498,7 +498,7 @@ public abstract class EntityLiving extends Entity {
public void a(float f, float f1) {
double d0;
- if (this.ac()) {
+ if (this.ad()) {
d0 = this.locY;
this.a(f, f1, 0.02F);
this.move(this.motX, this.motY, this.motZ);
@@ -509,7 +509,7 @@ public abstract class EntityLiving extends Entity {
if (this.positionChanged && this.b(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
this.motY = 0.30000001192092896D;
}
- } else if (this.ad()) {
+ } else if (this.ae()) {
d0 = this.locY;
this.a(f, f1, 0.02F);
this.move(this.motX, this.motY, this.motZ);
@@ -624,7 +624,7 @@ public abstract class EntityLiving extends Entity {
this.attackTicks = nbttagcompound.d("AttackTime");
}
- public boolean S() {
+ public boolean T() {
return !this.dead && this.health > 0;
}
@@ -632,7 +632,7 @@ public abstract class EntityLiving extends Entity {
return false;
}
- public void u() {
+ public void v() {
if (this.aq > 0) {
double d0 = this.locX + (this.ar - this.locX) / (double) this.aq;
double d1 = this.locY + (this.as - this.locY) / (double) this.aq;
@@ -671,7 +671,7 @@ public abstract class EntityLiving extends Entity {
}
}
- if (this.C()) {
+ if (this.D()) {
this.aC = false;
this.az = 0.0F;
this.aA = 0.0F;
@@ -680,8 +680,8 @@ public abstract class EntityLiving extends Entity {
this.c_();
}
- boolean flag = this.ac();
- boolean flag1 = this.ad();
+ boolean flag = this.ad();
+ boolean flag1 = this.ae();
if (this.aC) {
if (flag) {
@@ -689,7 +689,7 @@ public abstract class EntityLiving extends Entity {
} else if (flag1) {
this.motY += 0.03999999910593033D;
} else if (this.onGround) {
- this.N();
+ this.O();
}
}
@@ -710,22 +710,22 @@ public abstract class EntityLiving extends Entity {
}
}
- protected boolean C() {
+ protected boolean D() {
return this.health <= 0;
}
- protected void N() {
+ protected void O() {
this.motY = 0.41999998688697815D;
}
- protected boolean l_() {
+ protected boolean h_() {
return true;
}
- protected void T() {
+ protected void U() {
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
- if (this.l_() && entityhuman != null) {
+ if (this.h_() && entityhuman != null) {
double d0 = entityhuman.locX - this.locX;
double d1 = entityhuman.locY - this.locY;
double d2 = entityhuman.locZ - this.locZ;
@@ -749,7 +749,7 @@ public abstract class EntityLiving extends Entity {
++this.ay;
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
- this.T();
+ this.U();
this.az = 0.0F;
this.aA = 0.0F;
float f = 8.0F;
@@ -765,7 +765,7 @@ public abstract class EntityLiving extends Entity {
}
if (this.b != null) {
- this.a(this.b, 10.0F, (float) this.v());
+ this.a(this.b, 10.0F, (float) this.u());
if (this.aF-- <= 0 || this.b.dead || this.b.g(this) > (double) (f * f)) {
this.b = null;
}
@@ -778,15 +778,15 @@ public abstract class EntityLiving extends Entity {
this.pitch = this.aD;
}
- boolean flag = this.ac();
- boolean flag1 = this.ad();
+ boolean flag = this.ad();
+ boolean flag1 = this.ae();
if (flag || flag1) {
this.aC = this.random.nextFloat() < 0.8F;
}
}
- protected int v() {
+ protected int u() {
return 40;
}
@@ -798,9 +798,9 @@ public abstract class EntityLiving extends Entity {
if (entity instanceof EntityLiving) {
EntityLiving entityliving = (EntityLiving) entity;
- d2 = this.locY + (double) this.s() - (entityliving.locY + (double) entityliving.s());
+ d2 = this.locY + (double) this.t() - (entityliving.locY + (double) entityliving.t());
} else {
- d2 = (entity.boundingBox.b + entity.boundingBox.e) / 2.0D - (this.locY + (double) this.s());
+ d2 = (entity.boundingBox.b + entity.boundingBox.e) / 2.0D - (this.locY + (double) this.t());
}
double d3 = (double) MathHelper.a(d0 * d0 + d1 * d1);
@@ -811,11 +811,11 @@ public abstract class EntityLiving extends Entity {
this.yaw = this.b(this.yaw, f2, f);
}
- public boolean U() {
+ public boolean V() {
return this.b != null;
}
- public Entity V() {
+ public Entity W() {
return this.b;
}
@@ -841,13 +841,13 @@ public abstract class EntityLiving extends Entity {
return f + f3;
}
- public void W() {}
+ public void X() {}
public boolean d() {
return this.world.containsEntity(this.boundingBox) && this.world.getEntities(this, this.boundingBox).size() == 0 && !this.world.c(this.boundingBox);
}
- protected void X() {
+ protected void Y() {
// CraftBukkit start
EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(null, this.getBukkitEntity(), EntityDamageEvent.DamageCause.VOID, 4);
this.world.getServer().getPluginManager().callEvent(event);
@@ -860,7 +860,7 @@ public abstract class EntityLiving extends Entity {
// CraftBukkit end
}
- public Vec3D Y() {
+ public Vec3D Z() {
return this.b(1.0F);
}
diff --git a/src/main/java/net/minecraft/server/EntityMinecart.java b/src/main/java/net/minecraft/server/EntityMinecart.java
index 647de327f9..6633b7afb5 100644
--- a/src/main/java/net/minecraft/server/EntityMinecart.java
+++ b/src/main/java/net/minecraft/server/EntityMinecart.java
@@ -114,7 +114,7 @@ public class EntityMinecart extends Entity implements IInventory {
this.c = -this.c;
this.b = 10;
- this.ae();
+ this.af();
this.damage += i * 10;
if (this.damage > 40) {
if (this.passenger != null) {
@@ -175,7 +175,7 @@ public class EntityMinecart extends Entity implements IInventory {
}
}
- public boolean n_() {
+ public boolean l_() {
return !this.dead;
}
@@ -210,7 +210,7 @@ public class EntityMinecart extends Entity implements IInventory {
super.die();
}
- public void o_() {
+ public void m_() {
// CraftBukkit start
double prevX = this.locX;
double prevY = this.locY;
@@ -476,15 +476,15 @@ public class EntityMinecart extends Entity implements IInventory {
this.motX += this.motX / d20 * d21;
this.motZ += this.motZ / d20 * d21;
} else if (i1 == 1) {
- if (this.world.d(i - 1, j, k)) {
+ if (this.world.e(i - 1, j, k)) {
this.motX = 0.02D;
- } else if (this.world.d(i + 1, j, k)) {
+ } else if (this.world.e(i + 1, j, k)) {
this.motX = -0.02D;
}
} else if (i1 == 0) {
- if (this.world.d(i, j, k - 1)) {
+ if (this.world.e(i, j, k - 1)) {
this.motZ = 0.02D;
- } else if (this.world.d(i, j, k + 1)) {
+ } else if (this.world.e(i, j, k + 1)) {
this.motZ = -0.02D;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index a7f7be92e3..abe59e9497 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -16,18 +16,18 @@ public class EntityMonster extends EntityCreature implements IMonster {
this.health = 20;
}
- public void u() {
+ public void v() {
float f = this.c(1.0F);
if (f > 0.5F) {
this.ay += 2;
}
- super.u();
+ super.v();
}
- public void o_() {
- super.o_();
+ public void m_() {
+ super.m_();
if (!this.world.isStatic && this.world.spawnMonsters == 0) {
this.die();
}
@@ -92,7 +92,7 @@ public class EntityMonster extends EntityCreature implements IMonster {
}
protected float a(int i, int j, int k) {
- return 0.5F - this.world.m(i, j, k);
+ return 0.5F - this.world.n(i, j, k);
}
public void b(NBTTagCompound nbttagcompound) {
diff --git a/src/main/java/net/minecraft/server/EntityPainting.java b/src/main/java/net/minecraft/server/EntityPainting.java
index faf85e79d6..7543154699 100644
--- a/src/main/java/net/minecraft/server/EntityPainting.java
+++ b/src/main/java/net/minecraft/server/EntityPainting.java
@@ -117,7 +117,7 @@ public class EntityPainting extends Entity {
return i == 32 ? 0.5F : (i == 64 ? 0.5F : 0.0F);
}
- public void o_() {
+ public void m_() {
if (this.f++ == 100 && !this.world.isStatic) {
this.f = 0;
if (!this.h()) {
@@ -194,7 +194,7 @@ public class EntityPainting extends Entity {
}
}
- public boolean n_() {
+ public boolean l_() {
return true;
}
@@ -210,7 +210,7 @@ public class EntityPainting extends Entity {
// CraftBukkit end
this.die();
- this.ae();
+ this.af();
this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
}
diff --git a/src/main/java/net/minecraft/server/EntityPigZombie.java b/src/main/java/net/minecraft/server/EntityPigZombie.java
index 77f9204a27..37223bb434 100644
--- a/src/main/java/net/minecraft/server/EntityPigZombie.java
+++ b/src/main/java/net/minecraft/server/EntityPigZombie.java
@@ -21,13 +21,13 @@ public class EntityPigZombie extends EntityZombie {
this.fireProof = true;
}
- public void o_() {
+ public void m_() {
this.aE = this.target != null ? 0.95F : 0.5F;
if (this.soundDelay > 0 && --this.soundDelay == 0) {
this.world.makeSound(this, "mob.zombiepig.zpigangry", this.k() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
- super.o_();
+ super.m_();
}
public boolean d() {
@@ -48,8 +48,8 @@ public class EntityPigZombie extends EntityZombie {
return this.angerLevel == 0 ? null : super.findTarget();
}
- public void u() {
- super.u();
+ public void v() {
+ super.v();
}
public boolean damageEntity(Entity entity, int i) {
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 442666c027..2b6cd71e5e 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -21,10 +21,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public double e;
public List chunkCoordIntPairQueue = new LinkedList();
public Set playerChunkCoordIntPairs = new HashSet();
- private int bK = -99999999;
- private int bL = 60;
- private ItemStack[] bM = new ItemStack[] { null, null, null, null, null};
- private int bN = 0;
+ private int bL = -99999999;
+ private int bM = 60;
+ private ItemStack[] bN = new ItemStack[] { null, null, null, null, null};
+ private int bO = 0;
public boolean h;
public EntityPlayer(MinecraftServer minecraftserver, World world, String s, ItemInWorldManager iteminworldmanager) {
@@ -87,33 +87,33 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public ItemStack[] getEquipment() {
- return this.bM;
+ return this.bN;
}
- protected void j_() {
+ protected void s() {
this.height = 0.0F;
}
- public float s() {
+ public float t() {
return 1.62F;
}
- public void o_() {
+ public void m_() {
this.itemInWorldManager.a();
- --this.bL;
+ --this.bM;
this.activeContainer.a();
for (int i = 0; i < 5; ++i) {
- ItemStack itemstack = this.b_(i);
+ ItemStack itemstack = this.c_(i);
- if (itemstack != this.bM[i]) {
+ if (itemstack != this.bN[i]) {
this.b.getTracker(this.dimension).a(this, new Packet5EntityEquipment(this.id, i, itemstack));
- this.bM[i] = itemstack;
+ this.bN[i] = itemstack;
}
}
}
- public ItemStack b_(int i) {
+ public ItemStack c_(int i) {
return i == 0 ? this.inventory.getItemInHand() : this.inventory.armor[i - 1];
}
@@ -152,12 +152,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
bworld.dropItemNaturally(bukkitEntity.getLocation(), stack);
}
- this.x();
+ this.y();
// CraftBukkit end
}
public boolean damageEntity(Entity entity, int i) {
- if (this.bL > 0) {
+ if (this.bM > 0) {
return false;
} else {
// CraftBukkit - this.b.pvpMode -> this.world.pvpMode
@@ -179,7 +179,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
- protected boolean t() {
+ protected boolean j_() {
return this.b.pvpMode;
}
@@ -188,7 +188,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
public void a(boolean flag) {
- super.o_();
+ super.m_();
for (int i = 0; i < this.inventory.getSize(); ++i) {
ItemStack itemstack = this.inventory.getItem(i);
@@ -228,6 +228,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (this.E) {
if (this.b.propertyManager.getBoolean("allow-nether", true)) {
+ if (this.activeContainer != this.defaultContainer) {
+ this.y();
+ }
+
if (this.vehicle != null) {
this.mount(this.vehicle);
} else {
@@ -255,15 +259,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
--this.D;
}
- if (this.health != this.bK) {
+ if (this.health != this.bL) {
this.netServerHandler.sendPacket(new Packet8UpdateHealth(this.health));
- this.bK = this.health;
+ this.bL = this.health;
}
}
private void a(TileEntity tileentity) {
if (tileentity != null) {
- Packet packet = tileentity.e();
+ Packet packet = tileentity.f();
if (packet != null) {
this.netServerHandler.sendPacket(packet);
@@ -271,8 +275,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
- public void u() {
- super.u();
+ public void v() {
+ super.v();
}
public void receive(Entity entity, int i) {
@@ -292,7 +296,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.activeContainer.a();
}
- public void k_() {
+ public void w() {
if (!this.p) {
this.q = -1;
this.p = true;
@@ -302,7 +306,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
- public void w() {}
+ public void x() {}
public EnumBedError a(int i, int j, int k) {
EnumBedError enumbederror = super.a(i, j, k);
@@ -354,39 +358,39 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
super.a(d0, flag);
}
- private void ah() {
- this.bN = this.bN % 100 + 1;
+ private void ai() {
+ this.bO = this.bO % 100 + 1;
}
public void b(int i, int j, int k) {
- this.ah();
- this.netServerHandler.sendPacket(new Packet100OpenWindow(this.bN, 1, "Crafting", 9));
+ this.ai();
+ this.netServerHandler.sendPacket(new Packet100OpenWindow(this.bO, 1, "Crafting", 9));
this.activeContainer = new ContainerWorkbench(this.inventory, this.world, i, j, k);
- this.activeContainer.windowId = this.bN;
+ this.activeContainer.windowId = this.bO;
this.activeContainer.a((ICrafting) this);
}
public void a(IInventory iinventory) {
- this.ah();
- this.netServerHandler.sendPacket(new Packet100OpenWindow(this.bN, 0, iinventory.getName(), iinventory.getSize()));
+ this.ai();
+ this.netServerHandler.sendPacket(new Packet100OpenWindow(this.bO, 0, iinventory.getName(), iinventory.getSize()));
this.activeContainer = new ContainerChest(this.inventory, iinventory);
- this.activeContainer.windowId = this.bN;
+ this.activeContainer.windowId = this.bO;
this.activeContainer.a((ICrafting) this);
}
public void a(TileEntityFurnace tileentityfurnace) {
- this.ah();
- this.netServerHandler.sendPacket(new Packet100OpenWindow(this.bN, 2, tileentityfurnace.getName(), tileentityfurnace.getSize()));
+ this.ai();
+ this.netServerHandler.sendPacket(new Packet100OpenWindow(this.bO, 2, tileentityfurnace.getName(), tileentityfurnace.getSize()));
this.activeContainer = new ContainerFurnace(this.inventory, tileentityfurnace);
- this.activeContainer.windowId = this.bN;
+ this.activeContainer.windowId = this.bO;
this.activeContainer.a((ICrafting) this);
}
public void a(TileEntityDispenser tileentitydispenser) {
- this.ah();
- this.netServerHandler.sendPacket(new Packet100OpenWindow(this.bN, 3, tileentitydispenser.getName(), tileentitydispenser.getSize()));
+ this.ai();
+ this.netServerHandler.sendPacket(new Packet100OpenWindow(this.bO, 3, tileentitydispenser.getName(), tileentitydispenser.getSize()));
this.activeContainer = new ContainerDispenser(this.inventory, tileentitydispenser);
- this.activeContainer.windowId = this.bN;
+ this.activeContainer.windowId = this.bO;
this.activeContainer.a((ICrafting) this);
}
@@ -413,18 +417,18 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void a(ItemStack itemstack) {}
- public void x() {
+ public void y() {
this.netServerHandler.sendPacket(new Packet101CloseWindow(this.activeContainer.windowId));
- this.z();
+ this.A();
}
- public void y() {
+ public void z() {
if (!this.h) {
this.netServerHandler.sendPacket(new Packet103SetSlot(-1, -1, this.inventory.j()));
}
}
- public void z() {
+ public void A() {
this.activeContainer.a((EntityHuman) this);
this.activeContainer = this.defaultContainer;
}
@@ -451,7 +455,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
- public void A() {
+ public void B() {
if (this.vehicle != null) {
this.mount(this.vehicle);
}
@@ -465,8 +469,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
}
}
- public void B() {
- this.bK = -99999999;
+ public void C() {
+ this.bL = -99999999;
}
public void a(String s) {
diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java
index 8356f3471c..51246f92d7 100644
--- a/src/main/java/net/minecraft/server/EntitySkeleton.java
+++ b/src/main/java/net/minecraft/server/EntitySkeleton.java
@@ -26,7 +26,7 @@ public class EntitySkeleton extends EntityMonster {
return "mob.skeletonhurt";
}
- public void u() {
+ public void v() {
if (this.world.d()) {
float f = this.c(1.0F);
@@ -42,7 +42,7 @@ public class EntitySkeleton extends EntityMonster {
}
}
- super.u();
+ super.v();
}
protected void a(Entity entity, float f) {
@@ -54,7 +54,7 @@ public class EntitySkeleton extends EntityMonster {
EntityArrow entityarrow = new EntityArrow(this.world, this);
++entityarrow.locY;
- double d2 = entity.locY + (double) entity.s() - 0.20000000298023224D - entityarrow.locY;
+ double d2 = entity.locY + (double) entity.t() - 0.20000000298023224D - entityarrow.locY;
float f1 = MathHelper.a(d0 * d0 + d1 * d1) * 0.2F;
this.world.makeSound(this, "random.bow", 1.0F, 1.0F / (this.random.nextFloat() * 0.4F + 0.8F));
@@ -80,7 +80,7 @@ public class EntitySkeleton extends EntityMonster {
return Item.ARROW.id;
}
- protected void r() {
+ protected void q() {
// CraftBukkit start - whole method
java.util.List loot = new java.util.ArrayList();
diff --git a/src/main/java/net/minecraft/server/EntitySnowball.java b/src/main/java/net/minecraft/server/EntitySnowball.java
index 1595a072aa..485b48db1f 100644
--- a/src/main/java/net/minecraft/server/EntitySnowball.java
+++ b/src/main/java/net/minecraft/server/EntitySnowball.java
@@ -32,7 +32,7 @@ public class EntitySnowball extends Entity {
super(world);
this.shooter = entityliving;
this.b(0.25F, 0.25F);
- this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.s(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
+ this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.t(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F);
this.locY -= 0.10000000149011612D;
this.locZ -= (double) (MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F);
@@ -76,11 +76,11 @@ public class EntitySnowball extends Entity {
this.h = 0;
}
- public void o_() {
+ public void m_() {
this.bo = this.locX;
this.bp = this.locY;
this.bq = this.locZ;
- super.o_();
+ super.m_();
if (this.a > 0) {
--this.a;
}
@@ -125,7 +125,7 @@ public class EntitySnowball extends Entity {
for (int j = 0; j < list.size(); ++j) {
Entity entity1 = (Entity) list.get(j);
- if (entity1.n_() && (entity1 != this.shooter || this.i >= 5)) {
+ if (entity1.l_() && (entity1 != this.shooter || this.i >= 5)) {
float f = 0.3F;
AxisAlignedBB axisalignedbb = entity1.boundingBox.b((double) f, (double) f, (double) f);
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
@@ -209,7 +209,7 @@ public class EntitySnowball extends Entity {
float f2 = 0.99F;
float f3 = 0.03F;
- if (this.ac()) {
+ if (this.ad()) {
for (int l = 0; l < 4; ++l) {
float f4 = 0.25F;
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index e0edde4f46..f19f960346 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -54,7 +54,7 @@ public class EntitySquid extends EntityWaterAnimal {
return 0;
}
- protected void r() {
+ protected void q() {
// CraftBukkit start - whole method
java.util.List loot = new java.util.ArrayList();
@@ -79,12 +79,12 @@ public class EntitySquid extends EntityWaterAnimal {
return false;
}
- public boolean ac() {
+ public boolean ad() {
return this.world.a(this.boundingBox.b(0.0D, -0.6000000238418579D, 0.0D), Material.WATER, this);
}
- public void u() {
- super.u();
+ public void v() {
+ super.v();
this.b = this.a;
this.f = this.c;
this.h = this.g;
@@ -97,7 +97,7 @@ public class EntitySquid extends EntityWaterAnimal {
}
}
- if (this.ac()) {
+ if (this.ad()) {
float f;
if (this.g < 3.1415927F) {
@@ -151,5 +151,7 @@ public class EntitySquid extends EntityWaterAnimal {
this.o = -0.1F + this.random.nextFloat() * 0.2F;
this.p = MathHelper.sin(f) * 0.2F;
}
+
+ this.U();
}
}
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 89d64634e3..1140cd4109 100644
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -41,11 +41,11 @@ public class EntityTNTPrimed extends Entity {
return false;
}
- public boolean n_() {
+ public boolean l_() {
return !this.dead;
}
- public void o_() {
+ public void m_() {
this.lastX = this.locX;
this.lastY = this.locY;
this.lastZ = this.locZ;
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index a9a8ecc474..4f2f5a83c0 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -108,7 +108,7 @@ public class EntityTrackerEntry {
this.a((Packet) object);
}
- DataWatcher datawatcher = this.tracker.Z();
+ DataWatcher datawatcher = this.tracker.aa();
if (datawatcher.a()) {
this.b((Packet) (new Packet40EntityMetadata(this.tracker.id, datawatcher)));
diff --git a/src/main/java/net/minecraft/server/EntityWeatherStorm.java b/src/main/java/net/minecraft/server/EntityWeatherStorm.java
index 87d454d63f..18e52d9146 100644
--- a/src/main/java/net/minecraft/server/EntityWeatherStorm.java
+++ b/src/main/java/net/minecraft/server/EntityWeatherStorm.java
@@ -72,8 +72,8 @@ public class EntityWeatherStorm extends EntityWeather {
}
}
- public void o_() {
- super.o_();
+ public void m_() {
+ super.m_();
if (this.lifeTicks == 2) {
this.world.makeSound(this.locX, this.locY, this.locZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
this.world.makeSound(this.locX, this.locY, this.locZ, "random.explode", 2.0F, 0.5F + this.random.nextFloat() * 0.2F);
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
index 710d451be4..a9b8f5522d 100644
--- a/src/main/java/net/minecraft/server/EntityWolf.java
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
@@ -63,7 +63,7 @@ public class EntityWolf extends EntityAnimal {
}
}
- protected boolean l_() {
+ protected boolean h_() {
return !this.isTamed();
}
@@ -89,7 +89,7 @@ public class EntityWolf extends EntityAnimal {
protected void c_() {
super.c_();
- if (!this.e && !this.B() && this.isTamed() && this.vehicle == null) {
+ if (!this.e && !this.C() && this.isTamed() && this.vehicle == null) {
EntityHuman entityhuman = this.world.a(this.getOwnerName());
if (entityhuman != null) {
@@ -98,10 +98,10 @@ public class EntityWolf extends EntityAnimal {
if (f > 5.0F) {
this.c(entityhuman, f);
}
- } else if (!this.ac()) {
+ } else if (!this.ad()) {
this.setSitting(true);
}
- } else if (this.target == null && !this.B() && !this.isTamed() && this.world.random.nextInt(100) == 0) {
+ } else if (this.target == null && !this.C() && !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));
if (!list.isEmpty()) {
@@ -119,7 +119,7 @@ public class EntityWolf extends EntityAnimal {
}
}
- if (this.ac()) {
+ if (this.ad()) {
this.setSitting(false);
}
@@ -128,11 +128,11 @@ public class EntityWolf extends EntityAnimal {
}
}
- public void u() {
- super.u();
+ public void v() {
+ super.v();
this.a = false;
- if (this.U() && !this.B() && !this.isAngry()) {
- Entity entity = this.V();
+ if (this.V() && !this.C() && !this.isAngry()) {
+ Entity entity = this.W();
if (entity instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) entity;
@@ -148,7 +148,7 @@ public class EntityWolf extends EntityAnimal {
}
}
- if (!this.Y && this.f && !this.g && !this.B() && this.onGround) {
+ if (!this.Y && this.f && !this.g && !this.C() && this.onGround) {
this.g = true;
this.h = 0.0F;
this.i = 0.0F;
@@ -156,8 +156,8 @@ public class EntityWolf extends EntityAnimal {
}
}
- public void o_() {
- super.o_();
+ public void m_() {
+ super.m_();
this.c = this.b;
if (this.a) {
this.b += (1.0F - this.b) * 0.4F;
@@ -169,7 +169,7 @@ public class EntityWolf extends EntityAnimal {
this.aF = 10;
}
- if (this.ab()) {
+ if (this.ac()) {
this.f = true;
this.g = false;
this.h = 0.0F;
@@ -202,12 +202,12 @@ public class EntityWolf extends EntityAnimal {
}
}
- public float s() {
+ public float t() {
return this.width * 0.8F;
}
- protected int v() {
- return this.isSitting() ? 20 : super.v();
+ protected int u() {
+ return this.isSitting() ? 20 : super.u();
}
private void c(Entity entity, float f) {
@@ -220,7 +220,7 @@ public class EntityWolf extends EntityAnimal {
for (int l = 0; l <= 4; ++l) {
for (int i1 = 0; i1 <= 4; ++i1) {
- if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.world.d(i + l, k - 1, j + i1) && !this.world.d(i + l, k, j + i1) && !this.world.d(i + l, k + 1, j + i1)) {
+ if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.world.e(i + l, k - 1, j + i1) && !this.world.e(i + l, k, j + i1) && !this.world.e(i + l, k + 1, j + i1)) {
this.setPositionRotation((double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.yaw, this.pitch);
return;
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 7bd6e1bebe..f5c276d5aa 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -11,7 +11,7 @@ public class EntityZombie extends EntityMonster {
this.damage = 5;
}
- public void u() {
+ public void v() {
if (this.world.d()) {
float f = this.c(1.0F);
@@ -27,7 +27,7 @@ public class EntityZombie extends EntityMonster {
}
}
- super.u();
+ super.v();
}
protected String g() {
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index f79fe45021..8f2309fb6d 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -234,7 +234,7 @@ public class Explosion {
// CraftBukkit
Block.byId[i1].dropNaturally(this.world, j, k, l, this.world.getData(j, k, l), event.getYield());
this.world.setTypeId(j, k, l, 0);
- Block.byId[i1].c(this.world, j, k, l);
+ Block.byId[i1].d(this.world, j, k, l);
}
}
}
diff --git a/src/main/java/net/minecraft/server/InventoryPlayer.java b/src/main/java/net/minecraft/server/InventoryPlayer.java
index 95a1ceb1bb..f25e699b27 100644
--- a/src/main/java/net/minecraft/server/InventoryPlayer.java
+++ b/src/main/java/net/minecraft/server/InventoryPlayer.java
@@ -77,7 +77,6 @@ public class InventoryPlayer implements IInventory {
return -1;
}
-
private int e(ItemStack itemstack) {
int i = itemstack.id;
int j = itemstack.count;
@@ -285,7 +284,7 @@ public class InventoryPlayer implements IInventory {
}
public boolean b(Block block) {
- if (block.material != Material.STONE && block.material != Material.ORE && block.material != Material.SNOW_BLOCK && block.material != Material.SNOW_LAYER) {
+ if (block.material.i()) {
return true;
} else {
ItemStack itemstack = this.getItem(this.itemInHandIndex);
@@ -307,7 +306,7 @@ public class InventoryPlayer implements IInventory {
j += k1;
k += i1;
- int l1 = ((ItemArmor) this.armor[l].getItem()).bk;
+ int l1 = ((ItemArmor) this.armor[l].getItem()).bl;
i += l1;
}
diff --git a/src/main/java/net/minecraft/server/ItemBed.java b/src/main/java/net/minecraft/server/ItemBed.java
index 5610be2d4e..5d19b7d53a 100644
--- a/src/main/java/net/minecraft/server/ItemBed.java
+++ b/src/main/java/net/minecraft/server/ItemBed.java
@@ -40,7 +40,7 @@ public class ItemBed extends Item {
b0 = 1;
}
- if (world.isEmpty(i, j, k) && world.isEmpty(i + b0, j, k + b1) && world.d(i, j - 1, k) && world.d(i + b0, j - 1, k + b1)) {
+ if (world.isEmpty(i, j, k) && world.isEmpty(i + b0, j, k + b1) && world.e(i, j - 1, k) && world.e(i + b0, j - 1, k + b1)) {
CraftBlockState blockState = CraftBlockState.getBlockState(world, i, j, k); // CraftBukkit
world.setTypeIdAndData(i, j, k, blockbed.id, i1);
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index 64e301beb0..3c1ee76e8f 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -114,6 +114,6 @@ public class ItemBlock extends Item {
}
public String a() {
- return Block.byId[this.id].h();
+ return Block.byId[this.id].l();
}
}
diff --git a/src/main/java/net/minecraft/server/ItemDoor.java b/src/main/java/net/minecraft/server/ItemDoor.java
index 6bbdc6ff94..5340b77073 100644
--- a/src/main/java/net/minecraft/server/ItemDoor.java
+++ b/src/main/java/net/minecraft/server/ItemDoor.java
@@ -54,8 +54,8 @@ public class ItemDoor extends Item {
b0 = 1;
}
- int j1 = (world.d(i - b0, j, k - b1) ? 1 : 0) + (world.d(i - b0, j + 1, k - b1) ? 1 : 0);
- int k1 = (world.d(i + b0, j, k + b1) ? 1 : 0) + (world.d(i + b0, j + 1, k + b1) ? 1 : 0);
+ int j1 = (world.e(i - b0, j, k - b1) ? 1 : 0) + (world.e(i - b0, j + 1, k - b1) ? 1 : 0);
+ int k1 = (world.e(i + b0, j, k + b1) ? 1 : 0) + (world.e(i + b0, j + 1, k + b1) ? 1 : 0);
boolean flag = world.getTypeId(i - b0, j, k - b1) == block.id || world.getTypeId(i - b0, j + 1, k - b1) == block.id;
boolean flag1 = world.getTypeId(i + b0, j, k + b1) == block.id || world.getTypeId(i + b0, j + 1, k + b1) == block.id;
boolean flag2 = false;
diff --git a/src/main/java/net/minecraft/server/ItemInWorldManager.java b/src/main/java/net/minecraft/server/ItemInWorldManager.java
index 440c6bf353..7e5df2145f 100644
--- a/src/main/java/net/minecraft/server/ItemInWorldManager.java
+++ b/src/main/java/net/minecraft/server/ItemInWorldManager.java
@@ -167,13 +167,13 @@ public class ItemInWorldManager {
this.world.a(this.player, 2001, i, j, k, l + this.world.getData(i, j, k) * 256);
boolean flag = this.b(i, j, k);
- ItemStack itemstack = this.player.F();
+ ItemStack itemstack = this.player.G();
if (itemstack != null) {
itemstack.a(l, i, j, k, this.player);
if (itemstack.count == 0) {
itemstack.a(this.player);
- this.player.G();
+ this.player.H();
}
}
diff --git a/src/main/java/net/minecraft/server/ItemWorldMap.java b/src/main/java/net/minecraft/server/ItemWorldMap.java
index 627fa1d232..c098aeb67b 100644
--- a/src/main/java/net/minecraft/server/ItemWorldMap.java
+++ b/src/main/java/net/minecraft/server/ItemWorldMap.java
@@ -95,7 +95,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
j5 = chunk.getTypeId(l4 + k3, k4 - 1, j4 + l3);
if (j5 == 0) {
flag1 = false;
- } else if (k4 > 0 && j5 > 0 && Block.byId[j5].material.A == MaterialMapColor.b) {
+ } else if (k4 > 0 && j5 > 0 && Block.byId[j5].material.C == MaterialMapColor.b) {
flag1 = false;
}
@@ -152,7 +152,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
i5 = 0;
if (j4 > 0) {
- MaterialMapColor materialmapcolor = Block.byId[j4].material.A;
+ MaterialMapColor materialmapcolor = Block.byId[j4].material.C;
if (materialmapcolor == MaterialMapColor.n) {
d2 = (double) i4 * 0.1D + (double) (k1 + j2 & 1) * 0.2D;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6a41434af4..1692800055 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -89,7 +89,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
System.setErr(new PrintStream(new LoggerOutputStream(log, Level.SEVERE), true));
// CraftBukkit end
- log.info("Starting minecraft server version Beta 1.6.6");
+ log.info("Starting minecraft server version Beta 1.7");
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
log.warning("**** NOT ENOUGH RAM!");
log.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
diff --git a/src/main/java/net/minecraft/server/NetLoginHandler.java b/src/main/java/net/minecraft/server/NetLoginHandler.java
index e0defd74f6..99e775b8bd 100644
--- a/src/main/java/net/minecraft/server/NetLoginHandler.java
+++ b/src/main/java/net/minecraft/server/NetLoginHandler.java
@@ -63,8 +63,8 @@ public class NetLoginHandler extends NetHandler {
public void a(Packet1Login packet1login) {
this.g = packet1login.name;
- if (packet1login.a != 13) {
- if (packet1login.a > 13) {
+ if (packet1login.a != 14) {
+ if (packet1login.a > 14) {
this.disconnect("Outdated server!");
} else {
this.disconnect("Outdated client!");
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index 9564e89e07..b9877f17be 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -102,7 +102,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
s = event.getReason();
// CraftBukkit end
- this.player.A();
+ this.player.B();
this.sendPacket(new Packet255KickDisconnect(s));
this.networkManager.d();
@@ -427,7 +427,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
if (packet14blockdig.e == 4) {
- this.player.E();
+ this.player.F();
} else {
boolean flag = worldserver.weirdIsOpCache = worldserver.dimension != 0 || this.minecraftServer.serverConfigurationManager.isOp(this.player.name); // CraftBukkit
boolean flag1 = false;
@@ -800,7 +800,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
this.server.getPluginManager().callEvent(event);
// CraftBukkit end
- this.player.k_();
+ this.player.w();
}
}
@@ -889,7 +889,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
public void a(Packet101CloseWindow packet101closewindow) {
if (this.player.dead) return; // CraftBukkit
- this.player.z();
+ this.player.A();
}
public void a(Packet102WindowClick packet102windowclick) {
@@ -902,7 +902,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
this.player.netServerHandler.sendPacket(new Packet106Transaction(packet102windowclick.a, packet102windowclick.d, true));
this.player.h = true;
this.player.activeContainer.a();
- this.player.y();
+ this.player.z();
this.player.h = false;
} else {
this.n.put(Integer.valueOf(this.player.activeContainer.windowId), Short.valueOf(packet102windowclick.d));
diff --git a/src/main/java/net/minecraft/server/PlayerInstance.java b/src/main/java/net/minecraft/server/PlayerInstance.java
index 5900658606..3c7706d572 100644
--- a/src/main/java/net/minecraft/server/PlayerInstance.java
+++ b/src/main/java/net/minecraft/server/PlayerInstance.java
@@ -182,7 +182,7 @@ class PlayerInstance {
private void sendTileEntity(TileEntity tileentity) {
if (tileentity != null) {
- Packet packet = tileentity.e();
+ Packet packet = tileentity.f();
if (packet != null) {
this.sendAll(packet);
diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
index 74117e63be..5b41812a0e 100644
--- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java
+++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java
@@ -268,7 +268,7 @@ public class ServerConfigurationManager {
worldserver.addEntity(entityplayer1);
this.players.add(entityplayer1);
this.updateClient(entityplayer1); // CraftBukkit
- entityplayer1.w();
+ entityplayer1.x();
return entityplayer1;
}
@@ -613,6 +613,6 @@ public class ServerConfigurationManager {
public void updateClient(EntityPlayer entityplayer) {
entityplayer.updateInventory(entityplayer.defaultContainer);
- entityplayer.B();
+ entityplayer.C();
}
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 2eb48298b9..fda0a0909f 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -93,7 +93,7 @@ public final class SpawnerCreature {
int j2 = chunkposition.y;
int k2 = chunkposition.z;
- if (!world.d(i2, j2, k2) && world.getMaterial(i2, j2, k2) == enumcreaturetype.c()) {
+ if (!world.e(i2, j2, k2) && world.getMaterial(i2, j2, k2) == enumcreaturetype.c()) {
int l2 = 0;
for (int i3 = 0; i3 < 3; ++i3) {
@@ -155,7 +155,7 @@ public final class SpawnerCreature {
}
private static boolean a(EnumCreatureType enumcreaturetype, World world, int i, int j, int k) {
- return enumcreaturetype.c() == Material.WATER ? world.getMaterial(i, j, k).isLiquid() && !world.d(i, j + 1, k) : world.d(i, j - 1, k) && !world.d(i, j, k) && !world.getMaterial(i, j, k).isLiquid() && !world.d(i, j + 1, k);
+ return enumcreaturetype.c() == Material.WATER ? world.getMaterial(i, j, k).isLiquid() && !world.e(i, j + 1, k) : world.e(i, j - 1, k) && !world.e(i, j, k) && !world.getMaterial(i, j, k).isLiquid() && !world.e(i, j + 1, k);
}
private static void a(EntityLiving entityliving, World world, float f, float f1, float f2) {
@@ -198,7 +198,7 @@ public final class SpawnerCreature {
int j1;
- for (j1 = l; j1 > 2 && !world.d(j, j1 - 1, k); --j1) {
+ for (j1 = l; j1 > 2 && !world.e(j, j1 - 1, k); --j1) {
;
}
@@ -228,7 +228,7 @@ public final class SpawnerCreature {
PathPoint pathpoint = pathentity.c();
if (Math.abs((double) pathpoint.a - entityhuman.locX) < 1.5D && Math.abs((double) pathpoint.c - entityhuman.locZ) < 1.5D && Math.abs((double) pathpoint.b - entityhuman.locY) < 1.5D) {
- ChunkCoordinates chunkcoordinates = BlockBed.g(world, MathHelper.floor(entityhuman.locX), MathHelper.floor(entityhuman.locY), MathHelper.floor(entityhuman.locZ), 1);
+ ChunkCoordinates chunkcoordinates = BlockBed.f(world, MathHelper.floor(entityhuman.locX), MathHelper.floor(entityhuman.locY), MathHelper.floor(entityhuman.locZ), 1);
if (chunkcoordinates == null) {
chunkcoordinates = new ChunkCoordinates(j, j1 + 1, k);
@@ -239,7 +239,7 @@ public final class SpawnerCreature {
world.addEntity(entityliving, SpawnReason.BED);
a(entityliving, world, (float) chunkcoordinates.x + 0.5F, (float) chunkcoordinates.y, (float) chunkcoordinates.z + 0.5F);
entityhuman.a(true, false, false);
- entityliving.P();
+ entityliving.Q();
flag = true;
flag1 = true;
}
diff --git a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java
index e2613e4e6a..9de8f5b5d1 100644
--- a/src/main/java/net/minecraft/server/TileEntityMobSpawner.java
+++ b/src/main/java/net/minecraft/server/TileEntityMobSpawner.java
@@ -35,13 +35,16 @@ public class TileEntityMobSpawner extends TileEntity {
this.b -= 360.0D;
}
- if (this.spawnDelay == -1) {
- this.c();
- }
+ if (!this.world.isStatic) {
+ if (this.spawnDelay == -1) {
+ this.c();
+ }
+
+ if (this.spawnDelay > 0) {
+ --this.spawnDelay;
+ return;
+ }
- if (this.spawnDelay > 0) {
- --this.spawnDelay;
- } else {
byte b0 = 4;
for (int i = 0; i < b0; ++i) {
@@ -83,14 +86,14 @@ public class TileEntityMobSpawner extends TileEntity {
this.world.a("flame", d0, d1, d2, 0.0D, 0.0D, 0.0D);
}
- entityliving.R();
+ entityliving.S();
this.c();
}
}
}
-
- super.g_();
}
+
+ super.g_();
}
}
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
index ee478f3e8a..a44e086fbd 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -28,7 +28,7 @@ public class TileEntitySign extends TileEntity {
}
}
- public Packet e() {
+ public Packet f() {
String[] astring = new String[4];
for (int i = 0; i < 4; ++i) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 5c9936d308..494c2262ee 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,6 +1,7 @@
package net.minecraft.server;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -36,12 +37,13 @@ public class World implements IBlockAccess {
private TreeSet E = new TreeSet();
private Set F = new HashSet();
public List c = new ArrayList();
+ private List G = new ArrayList();
public List players = new ArrayList();
public List e = new ArrayList();
- private long G = 16777215L;
+ private long H = 16777215L;
public int f = 0;
protected int g = (new Random()).nextInt();
- protected int h = 1013904223;
+ protected final int h = 1013904223;
protected float i;
protected float j;
protected float k;
@@ -49,7 +51,7 @@ public class World implements IBlockAccess {
protected int m = 0;
public int n = 0;
public boolean suppressPhysics = false;
- private long H = System.currentTimeMillis();
+ private long I = System.currentTimeMillis();
protected int p = 40;
public int spawnMonsters;
public Random random = new Random();
@@ -60,16 +62,17 @@ public class World implements IBlockAccess {
protected final IDataManager w;
public WorldData worldData; // CraftBukkit - protected -> public
public boolean isLoading;
- private boolean I;
+ private boolean J;
public WorldMapCollection worldMaps;
- private ArrayList J = new ArrayList();
- private int K = 0;
+ private ArrayList K = new ArrayList();
+ private boolean L;
+ private int M = 0;
public boolean allowMonsters = true; // CraftBukkit - private -> public
public boolean allowAnimals = true; // CraftBukkit - private -> public
static int A = 0;
- private Set N = new HashSet();
- private int O;
- private List P;
+ private Set P = new HashSet();
+ private int Q;
+ private List R;
public boolean isStatic;
public WorldChunkManager getWorldChunkManager() {
@@ -107,8 +110,8 @@ public class World implements IBlockAccess {
this.world = new CraftWorld((WorldServer) this, gen, env);
// CraftBukkit end
- this.O = this.random.nextInt(12000);
- this.P = new ArrayList();
+ this.Q = this.random.nextInt(12000);
+ this.R = new ArrayList();
this.isStatic = false;
this.w = idatamanager;
this.worldMaps = new WorldMapCollection(idatamanager);
@@ -407,7 +410,7 @@ public class World implements IBlockAccess {
this.b(i, k, j, i, l, j);
}
- public void h(int i, int j, int k) {
+ public void i(int i, int j, int k) {
for (int l = 0; l < this.u.size(); ++l) {
((IWorldAccess) this.u.get(l)).a(i, j, k, i, j, k);
}
@@ -454,7 +457,7 @@ public class World implements IBlockAccess {
return this.getChunkAt(i >> 4, k >> 4).c(i & 15, j, k & 15);
}
- public int j(int i, int j, int k) {
+ public int k(int i, int j, int k) {
if (j < 0) {
return 0;
} else {
@@ -520,7 +523,7 @@ public class World implements IBlockAccess {
}
}
- public boolean l(int i, int j, int k) {
+ public boolean m(int i, int j, int k) {
if (i >= -32000000 && k >= -32000000 && i < 32000000 && k <= 32000000) {
if (j < 0) {
return false;
@@ -558,7 +561,7 @@ public class World implements IBlockAccess {
if (!this.worldProvider.e || enumskyblock != EnumSkyBlock.SKY) {
if (this.isLoaded(i, j, k)) {
if (enumskyblock == EnumSkyBlock.SKY) {
- if (this.l(i, j, k)) {
+ if (this.m(i, j, k)) {
l = 15;
}
} else if (enumskyblock == EnumSkyBlock.BLOCK) {
@@ -619,7 +622,7 @@ public class World implements IBlockAccess {
}
}
- public float m(int i, int j, int k) {
+ public float n(int i, int j, int k) {
return this.worldProvider.f[this.getLightLevel(i, j, k)];
}
@@ -648,7 +651,7 @@ public class World implements IBlockAccess {
int l1 = this.getData(l, i1, j1);
Block block = Block.byId[k1];
- if ((!flag1 || block == null || block.d(this, l, i1, j1) != null) && k1 > 0 && block.a(l1, flag)) {
+ if ((!flag1 || block == null || block.e(this, l, i1, j1) != null) && k1 > 0 && block.a(l1, flag)) {
MovingObjectPosition movingobjectposition = block.a(this, l, i1, j1, vec3d, vec3d1);
if (movingobjectposition != null) {
@@ -776,7 +779,7 @@ public class World implements IBlockAccess {
int j2 = this.getData(l, i1, j1);
Block block1 = Block.byId[i2];
- if ((!flag1 || block1 == null || block1.d(this, l, i1, j1) != null) && i2 > 0 && block1.a(j2, flag)) {
+ if ((!flag1 || block1 == null || block1.e(this, l, i1, j1) != null) && i2 > 0 && block1.a(j2, flag)) {
MovingObjectPosition movingobjectposition1 = block1.a(this, l, i1, j1, vec3d, vec3d1);
if (movingobjectposition1 != null) {
@@ -906,10 +909,10 @@ public class World implements IBlockAccess {
this.everyoneSleeping();
}
- int i = entity.bG;
- int j = entity.bI;
+ int i = entity.bH;
+ int j = entity.bJ;
- if (entity.bF && this.isChunkLoaded(i, j)) {
+ if (entity.bG && this.isChunkLoaded(i, j)) {
this.getChunkAt(i, j).b(entity);
}
@@ -922,7 +925,7 @@ public class World implements IBlockAccess {
}
public List getEntities(Entity entity, AxisAlignedBB axisalignedbb) {
- this.J.clear();
+ this.K.clear();
int i = MathHelper.floor(axisalignedbb.a);
int j = MathHelper.floor(axisalignedbb.d + 1.0D);
int k = MathHelper.floor(axisalignedbb.b);
@@ -937,7 +940,7 @@ public class World implements IBlockAccess {
Block block = Block.byId[this.getTypeId(k1, i2, l1)];
if (block != null) {
- block.a(this, k1, i2, l1, axisalignedbb, this.J);
+ block.a(this, k1, i2, l1, axisalignedbb, this.K);
}
}
}
@@ -951,16 +954,16 @@ public class World implements IBlockAccess {
AxisAlignedBB axisalignedbb1 = ((Entity) list.get(j2)).e_();
if (axisalignedbb1 != null && axisalignedbb1.a(axisalignedbb)) {
- this.J.add(axisalignedbb1);
+ this.K.add(axisalignedbb1);
}
axisalignedbb1 = entity.a_((Entity) list.get(j2));
if (axisalignedbb1 != null && axisalignedbb1.a(axisalignedbb)) {
- this.J.add(axisalignedbb1);
+ this.K.add(axisalignedbb1);
}
}
- return this.J;
+ return this.K;
}
public int a(float f) {
@@ -1058,7 +1061,7 @@ public class World implements IBlockAccess {
continue;
}
// CraftBukkit end
- entity.o_();
+ entity.m_();
if (entity.dead) {
this.e.remove(i--);
}
@@ -1071,9 +1074,9 @@ public class World implements IBlockAccess {
for (i = 0; i < this.D.size(); ++i) {
entity = (Entity) this.D.get(i);
- j = entity.bG;
- k = entity.bI;
- if (entity.bF && this.isChunkLoaded(j, k)) {
+ j = entity.bH;
+ k = entity.bJ;
+ if (entity.bG && this.isChunkLoaded(j, k)) {
this.getChunkAt(j, k).b(entity);
}
}
@@ -1100,9 +1103,9 @@ public class World implements IBlockAccess {
}
if (entity.dead) {
- j = entity.bG;
- k = entity.bI;
- if (entity.bF && this.isChunkLoaded(j, k)) {
+ j = entity.bH;
+ k = entity.bJ;
+ if (entity.bG && this.isChunkLoaded(j, k)) {
this.getChunkAt(j, k).b(entity);
}
@@ -1111,10 +1114,57 @@ public class World implements IBlockAccess {
}
}
- for (i = 0; i < this.c.size(); ++i) {
- TileEntity tileentity = (TileEntity) this.c.get(i);
+ this.L = true;
+ Iterator iterator = this.c.iterator();
- tileentity.g_();
+ while (iterator.hasNext()) {
+ TileEntity tileentity = (TileEntity) iterator.next();
+
+ if (!tileentity.g()) {
+ tileentity.g_();
+ }
+
+ if (tileentity.g()) {
+ iterator.remove();
+ Chunk chunk = this.getChunkAt(tileentity.x >> 4, tileentity.z >> 4);
+
+ if (chunk != null) {
+ chunk.e(tileentity.x & 15, tileentity.y, tileentity.z & 15);
+ }
+ }
+ }
+
+ this.L = false;
+ if (!this.G.isEmpty()) {
+ Iterator iterator1 = this.G.iterator();
+
+ while (iterator1.hasNext()) {
+ TileEntity tileentity1 = (TileEntity) iterator1.next();
+
+ if (!tileentity1.g()) {
+ if (!this.c.contains(tileentity1)) {
+ this.c.add(tileentity1);
+ }
+
+ Chunk chunk1 = this.getChunkAt(tileentity1.x >> 4, tileentity1.z >> 4);
+
+ if (chunk1 != null) {
+ chunk1.a(tileentity1.x & 15, tileentity1.y, tileentity1.z & 15, tileentity1);
+ }
+
+ this.notify(tileentity1.x, tileentity1.y, tileentity1.z);
+ }
+ }
+
+ this.G.clear();
+ }
+ }
+
+ public void a(Collection collection) {
+ if (this.L) {
+ this.G.addAll(collection);
+ } else {
+ this.c.addAll(collection);
}
}
@@ -1133,11 +1183,11 @@ public class World implements IBlockAccess {
entity.bq = entity.locZ;
entity.lastYaw = entity.yaw;
entity.lastPitch = entity.pitch;
- if (flag && entity.bF) {
+ if (flag && entity.bG) {
if (entity.vehicle != null) {
- entity.D();
+ entity.E();
} else {
- entity.o_();
+ entity.m_();
}
}
@@ -1165,20 +1215,20 @@ public class World implements IBlockAccess {
int l = MathHelper.floor(entity.locY / 16.0D);
int i1 = MathHelper.floor(entity.locZ / 16.0D);
- if (!entity.bF || entity.bG != k || entity.bH != l || entity.bI != i1) {
- if (entity.bF && this.isChunkLoaded(entity.bG, entity.bI)) {
- this.getChunkAt(entity.bG, entity.bI).a(entity, entity.bH);
+ if (!entity.bG || entity.bH != k || entity.bI != l || entity.bJ != i1) {
+ if (entity.bG && this.isChunkLoaded(entity.bH, entity.bJ)) {
+ this.getChunkAt(entity.bH, entity.bJ).a(entity, entity.bI);
}
if (this.isChunkLoaded(k, i1)) {
- entity.bF = true;
+ entity.bG = true;
this.getChunkAt(k, i1).a(entity);
} else {
- entity.bF = false;
+ entity.bG = false;
}
}
- if (flag && entity.bF && entity.passenger != null) {
+ if (flag && entity.bG && entity.passenger != null) {
if (!entity.passenger.dead && entity.passenger.vehicle == entity) {
this.playerJoinedWorld(entity.passenger);
} else {
@@ -1474,18 +1524,38 @@ public class World implements IBlockAccess {
}
public void setTileEntity(int i, int j, int k, TileEntity tileentity) {
- Chunk chunk = this.getChunkAt(i >> 4, k >> 4);
+ if (!tileentity.g()) {
+ if (this.L) {
+ tileentity.x = i;
+ tileentity.y = j;
+ tileentity.z = k;
+ this.G.add(tileentity);
+ } else {
+ this.c.add(tileentity);
+ Chunk chunk = this.getChunkAt(i >> 4, k >> 4);
- if (chunk != null) {
- chunk.a(i & 15, j, k & 15, tileentity);
+ if (chunk != null) {
+ chunk.a(i & 15, j, k & 15, tileentity);
+ }
+ }
}
}
public void o(int i, int j, int k) {
- Chunk chunk = this.getChunkAt(i >> 4, k >> 4);
+ TileEntity tileentity = this.getTileEntity(i, j, k);
- if (chunk != null) {
- chunk.e(i & 15, j, k & 15);
+ if (tileentity != null && this.L) {
+ tileentity.h();
+ } else {
+ if (tileentity != null) {
+ this.c.remove(tileentity);
+ }
+
+ Chunk chunk = this.getChunkAt(i >> 4, k >> 4);
+
+ if (chunk != null) {
+ chunk.e(i & 15, j, k & 15);
+ }
}
}
@@ -1495,23 +1565,23 @@ public class World implements IBlockAccess {
return block == null ? false : block.a();
}
- public boolean d(int i, int j, int k) {
+ public boolean e(int i, int j, int k) {
Block block = Block.byId[this.getTypeId(i, j, k)];
return block == null ? false : block.material.h() && block.b();
}
public boolean doLighting() {
- if (this.K >= 50) {
+ if (this.M >= 50) {
return false;
} else {
- ++this.K;
-
- boolean flag;
+ ++this.M;
try {
int i = 500;
+ boolean flag;
+
while (this.C.size() > 0) {
--i;
if (i <= 0) {
@@ -1523,11 +1593,10 @@ public class World implements IBlockAccess {
}
flag = false;
+ return flag;
} finally {
- --this.K;
+ --this.M;
}
-
- return flag;
}
}
@@ -1547,37 +1616,37 @@ public class World implements IBlockAccess {
int k1 = (l + i) / 2;
int l1 = (j1 + k) / 2;
- if (!this.isLoaded(k1, 64, l1)) {
- return;
- }
-
- if (this.getChunkAtWorldCoords(k1, l1).isEmpty()) {
- return;
- }
-
- int i2 = this.C.size();
- int j2;
-
- if (flag) {
- j2 = 5;
- if (j2 > i2) {
- j2 = i2;
+ if (this.isLoaded(k1, 64, l1)) {
+ if (this.getChunkAtWorldCoords(k1, l1).isEmpty()) {
+ return;
}
- for (int k2 = 0; k2 < j2; ++k2) {
- MetadataChunkBlock metadatachunkblock = (MetadataChunkBlock) this.C.get(this.C.size() - k2 - 1);
+ int i2 = this.C.size();
+ int j2;
- if (metadatachunkblock.a == enumskyblock && metadatachunkblock.a(i, j, k, l, i1, j1)) {
- return;
+ if (flag) {
+ j2 = 5;
+ if (j2 > i2) {
+ j2 = i2;
+ }
+
+ for (int k2 = 0; k2 < j2; ++k2) {
+ MetadataChunkBlock metadatachunkblock = (MetadataChunkBlock) this.C.get(this.C.size() - k2 - 1);
+
+ if (metadatachunkblock.a == enumskyblock && metadatachunkblock.a(i, j, k, l, i1, j1)) {
+ return;
+ }
}
}
- }
- this.C.add(new MetadataChunkBlock(enumskyblock, i, j, k, l, i1, j1));
- j2 = 1000000;
- if (this.C.size() > 1000000) {
- System.out.println("More than " + j2 + " updates, aborting lighting updates");
- this.C.clear();
+ this.C.add(new MetadataChunkBlock(enumskyblock, i, j, k, l, i1, j1));
+ j2 = 1000000;
+ if (this.C.size() > 1000000) {
+ System.out.println("More than " + j2 + " updates, aborting lighting updates");
+ this.C.clear();
+ }
+
+ return;
}
} finally {
--A;
@@ -1754,7 +1823,7 @@ public class World implements IBlockAccess {
}
protected void j() {
- this.N.clear();
+ this.P.clear();
int i;
int j;
@@ -1770,16 +1839,16 @@ public class World implements IBlockAccess {
for (k = -b0; k <= b0; ++k) {
for (l = -b0; l <= b0; ++l) {
- this.N.add(new ChunkCoordIntPair(k + i, l + j));
+ this.P.add(new ChunkCoordIntPair(k + i, l + j));
}
}
}
- if (this.O > 0) {
- --this.O;
+ if (this.Q > 0) {
+ --this.Q;
}
- Iterator iterator = this.N.iterator();
+ Iterator iterator = this.P.iterator();
while (iterator.hasNext()) {
ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) iterator.next();
@@ -1791,8 +1860,8 @@ public class World implements IBlockAccess {
int k1;
int l1;
- if (this.O == 0) {
- this.g = this.g * 3 + this.h;
+ if (this.Q == 0) {
+ this.g = this.g * 3 + 1013904223;
k = this.g >> 2;
l = k & 15;
j1 = k >> 8 & 15;
@@ -1800,18 +1869,18 @@ public class World implements IBlockAccess {
l1 = chunk.getTypeId(l, k1, j1);
l += i;
j1 += j;
- if (l1 == 0 && this.j(l, k1, j1) <= this.random.nextInt(8) && this.a(EnumSkyBlock.SKY, l, k1, j1) <= 0) {
+ if (l1 == 0 && this.k(l, k1, j1) <= this.random.nextInt(8) && this.a(EnumSkyBlock.SKY, l, k1, j1) <= 0) {
EntityHuman entityhuman1 = this.a((double) l + 0.5D, (double) k1 + 0.5D, (double) j1 + 0.5D, 8.0D);
if (entityhuman1 != null && entityhuman1.d((double) l + 0.5D, (double) k1 + 0.5D, (double) j1 + 0.5D) > 4.0D) {
this.makeSound((double) l + 0.5D, (double) k1 + 0.5D, (double) j1 + 0.5D, "ambient.cave.cave", 0.7F, 0.8F + this.random.nextFloat() * 0.2F);
- this.O = this.random.nextInt(12000) + 6000;
+ this.Q = this.random.nextInt(12000) + 6000;
}
}
}
if (this.random.nextInt(100000) == 0 && this.v() && this.u()) {
- this.g = this.g * 3 + this.h;
+ this.g = this.g * 3 + 1013904223;
k = this.g >> 2;
l = i + (k & 15);
j1 = j + (k >> 8 & 15);
@@ -1825,7 +1894,7 @@ public class World implements IBlockAccess {
int i2;
if (this.random.nextInt(16) == 0) {
- this.g = this.g * 3 + this.h;
+ this.g = this.g * 3 + 1013904223;
k = this.g >> 2;
l = k & 15;
j1 = k >> 8 & 15;
@@ -1861,7 +1930,7 @@ public class World implements IBlockAccess {
}
for (k = 0; k < 80; ++k) {
- this.g = this.g * 3 + this.h;
+ this.g = this.g * 3 + 1013904223;
l = this.g >> 2;
j1 = l & 15;
k1 = l >> 8 & 15;
@@ -1909,7 +1978,7 @@ public class World implements IBlockAccess {
}
public List b(Entity entity, AxisAlignedBB axisalignedbb) {
- this.P.clear();
+ this.R.clear();
int i = MathHelper.floor((axisalignedbb.a - 2.0D) / 16.0D);
int j = MathHelper.floor((axisalignedbb.d + 2.0D) / 16.0D);
int k = MathHelper.floor((axisalignedbb.c - 2.0D) / 16.0D);
@@ -1918,12 +1987,12 @@ public class World implements IBlockAccess {
for (int i1 = i; i1 <= j; ++i1) {
for (int j1 = k; j1 <= l; ++j1) {
if (this.isChunkLoaded(i1, j1)) {
- this.getChunkAt(i1, j1).a(entity, axisalignedbb, this.P);
+ this.getChunkAt(i1, j1).a(entity, axisalignedbb, this.R);
}
}
}
- return this.P;
+ return this.R;
}
public List a(Class oclass, AxisAlignedBB axisalignedbb) {
@@ -1992,7 +2061,7 @@ public class World implements IBlockAccess {
int j1 = this.getTypeId(j, k, l);
Block block = Block.byId[j1];
Block block1 = Block.byId[i];
- AxisAlignedBB axisalignedbb = block1.d(this, j, k, l);
+ AxisAlignedBB axisalignedbb = block1.e(this, j, k, l);
if (flag) {
axisalignedbb = null;
@@ -2053,7 +2122,7 @@ public class World implements IBlockAccess {
public boolean isBlockFacePowered(int i, int j, int k, int l) {
int i1 = this.getTypeId(i, j, k);
- return i1 == 0 ? false : Block.byId[i1].c(this, i, j, k, l);
+ return i1 == 0 ? false : Block.byId[i1].d(this, i, j, k, l);
}
public boolean isBlockPowered(int i, int j, int k) {
@@ -2061,7 +2130,7 @@ public class World implements IBlockAccess {
}
public boolean isBlockFaceIndirectlyPowered(int i, int j, int k, int l) {
- if (this.d(i, j, k)) {
+ if (this.e(i, j, k)) {
return this.isBlockPowered(i, j, k);
} else {
int i1 = this.getTypeId(i, j, k);
@@ -2206,7 +2275,7 @@ public class World implements IBlockAccess {
}
public void everyoneSleeping() {
- this.I = !this.players.isEmpty();
+ this.J = !this.players.isEmpty();
Iterator iterator = this.players.iterator();
while (iterator.hasNext()) {
@@ -2214,7 +2283,7 @@ public class World implements IBlockAccess {
// CraftBukkit
if (!entityhuman.isSleeping() && !entityhuman.fauxSleeping) {
- this.I = false;
+ this.J = false;
break;
}
}
@@ -2231,7 +2300,7 @@ public class World implements IBlockAccess {
// CraftBukkit end
protected void s() {
- this.I = false;
+ this.J = false;
Iterator iterator = this.players.iterator();
while (iterator.hasNext()) {
@@ -2246,7 +2315,7 @@ public class World implements IBlockAccess {
}
public boolean everyoneDeeplySleeping() {
- if (this.I && !this.isStatic) {
+ if (this.J && !this.isStatic) {
Iterator iterator = this.players.iterator();
// CraftBukkit - This allows us to assume that some people are in bed but not really, allowing time to pass in spite of AFKers
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 589532c9c9..99a3b81af9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -65,7 +65,7 @@ import org.bukkit.util.config.ConfigurationNode;
public final class CraftServer implements Server {
private final String serverName = "Craftbukkit";
private final String serverVersion;
- private final String protocolVersion = "1.6.6";
+ private final String protocolVersion = "1.7";
private final ServicesManager servicesManager = new SimpleServicesManager();
private final BukkitScheduler scheduler = new CraftScheduler(this);
private final SimpleCommandMap commandMap = new SimpleCommandMap(this);