From 7db72dfd2c3d836a26375aa34d8aa37cf179c726 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Mon, 28 Nov 2011 07:00:04 +0000 Subject: [PATCH] Doors and trapdoors should function correctly once again --- src/main/java/net/minecraft/server/BlockDoor.java | 2 +- src/main/java/net/minecraft/server/BlockTrapdoor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/BlockDoor.java b/src/main/java/net/minecraft/server/BlockDoor.java index 8dc9e9ee7e..de1fe86cf5 100644 --- a/src/main/java/net/minecraft/server/BlockDoor.java +++ b/src/main/java/net/minecraft/server/BlockDoor.java @@ -166,8 +166,8 @@ public class BlockDoor extends Block { if (!world.isStatic) { this.b(world, i, j, k, i1, 0); } - } else if (l > 0) { // CraftBukkit start + } else if (l > 0 && Block.byId[l].isPowerSource()) { org.bukkit.World bworld = world.getWorld(); org.bukkit.block.Block block = bworld.getBlockAt(i, j, k); org.bukkit.block.Block blockTop = bworld.getBlockAt(i, j + 1, k); diff --git a/src/main/java/net/minecraft/server/BlockTrapdoor.java b/src/main/java/net/minecraft/server/BlockTrapdoor.java index a69c406344..18bcf1c7e2 100644 --- a/src/main/java/net/minecraft/server/BlockTrapdoor.java +++ b/src/main/java/net/minecraft/server/BlockTrapdoor.java @@ -121,7 +121,7 @@ public class BlockTrapdoor extends Block { } // CraftBukkit start - if (l > 0) { + if (l > 0 && Block.byId[l] != null && Block.byId[l].isPowerSource()) { org.bukkit.World bworld = world.getWorld(); org.bukkit.block.Block block = bworld.getBlockAt(i, j, k);