diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockDoor.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockDoor.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/BlockDoor.java b/src/main/java/net/minecraft/server/BlockDoor.java index d87582d6..946fa36a 100644 --- a/src/main/java/net/minecraft/server/BlockDoor.java +++ b/src/main/java/net/minecraft/server/BlockDoor.java @@ -159,7 +159,7 @@ public class BlockDoor extends Block { flag = true; } - if (!world.t(i, j - 1, k)) { + if (!world.v(i, j - 1, k)) { world.setTypeId(i, j, k, 0); flag = true; if (world.getTypeId(i, j + 1, k) == this.id) { @@ -210,7 +210,7 @@ public class BlockDoor extends Block { } public boolean canPlace(World world, int i, int j, int k) { - return j >= 255 ? false : world.t(i, j - 1, k) && super.canPlace(world, i, j, k) && super.canPlace(world, i, j + 1, k); + return j >= 255 ? false : world.v(i, j - 1, k) && super.canPlace(world, i, j, k) && super.canPlace(world, i, j + 1, k); } public int q_() { @@ -235,4 +235,10 @@ public class BlockDoor extends Block { return i1 & 7 | (flag ? 8 : 0) | (flag1 ? 16 : 0); } + + public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) { + if (entityhuman.abilities.canInstantlyBuild && (l & 8) != 0 && world.getTypeId(i, j - 1, k) == this.id) { + world.setTypeId(i, j - 1, k, 0); + } + } } |