From ca3d0512f30545df7ae1365dbb8066e6bdc161c9 Mon Sep 17 00:00:00 2001 From: Tahg Date: Sat, 12 Mar 2011 12:28:07 -0500 Subject: Blocks now return power for sources other than redstone dust --- src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/bukkit') diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 14c62314..35d3ebc5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -389,7 +389,7 @@ public class CraftBlock implements Block { if ((face == BlockFace.WEST || face == BlockFace.SELF) && world.i(x, y, z + 1, 3)) power = wire.g(world, x, y, z + 1, power); if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.i(x - 1, y, z, 4)) power = wire.g(world, x - 1, y, z, power); if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.i(x + 1, y, z, 5)) power = wire.g(world, x + 1, y, z, power); - return face == BlockFace.SELF ? power - 1 : power; + return power > 0 ? power : (face == BlockFace.SELF ? isBlockIndirectlyPowered() : isBlockFaceIndirectlyPowered(face)) ? 15 : 0; } public int getBlockPower() { -- cgit v1.2.3