Don't extend pistons until data is set. Fixes BUKKIT-2153

This commit is contained in:
John Driscoll 2012-08-08 00:42:18 -07:00 committed by Wesley Wolfe
parent 050a9276bc
commit 0bde47a173
2 changed files with 6 additions and 2 deletions

View File

@ -55,7 +55,7 @@ public class BlockPiston extends Block {
public void onPlace(World world, int i, int j, int k) {
if (!world.isStatic && world.getTileEntity(i, j, k) == null) {
// this.l(world, i, j, k); // CraftBukkit - don't extend arm of piston that doesn't exist
this.l(world, i, j, k);
}
}

View File

@ -417,8 +417,12 @@ public class Chunk {
if (l != 0) {
if (!this.world.isStatic) {
// CraftBukkit start - Don't extend piston until data is set
if (!(Block.byId[l] instanceof BlockPiston) || i2 != 0) {
Block.byId[l].onPlace(this.world, j2, j, k2);
}
// CraftBukkit end
}
if (Block.byId[l] instanceof BlockContainer) {
tileentity = this.e(i, j, k);