From 61c37bd3696329ef2ea42d4578f8694b95ef5792 Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 28 Jan 2011 10:24:53 -0800 Subject: [PATCH] Added Block.isBlockPowered(), block.isBlockIndirectlyPowered(). --- .../java/org/bukkit/craftbukkit/block/CraftBlock.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 4c00089685..4d19e34b6b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -337,6 +337,14 @@ public class CraftBlock implements Block { return null; } + public boolean isBlockPowered() { + return world.getHandle().o(x, y, z); + } + + public boolean isBlockIndirectlyPowered() { + return world.getHandle().p(x, y, z); + } + public void update() { type = world.getHandle().a(x, y, z); data = (byte)world.getHandle().b(x, y, z);