summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-03-12 12:28:07 -0500
committerTahg <tahgtahv@gmail.com>2011-03-12 12:28:07 -0500
commitca3d0512f30545df7ae1365dbb8066e6bdc161c9 (patch)
treeb16127388411a7213ddf31a174310b86585055cc /src/main/java/org
parent1db4eab7e3fd21462c958198e25d29aaa9ef267d (diff)
downloadcraftbukkit-ca3d0512f30545df7ae1365dbb8066e6bdc161c9.tar
craftbukkit-ca3d0512f30545df7ae1365dbb8066e6bdc161c9.tar.gz
craftbukkit-ca3d0512f30545df7ae1365dbb8066e6bdc161c9.tar.lz
craftbukkit-ca3d0512f30545df7ae1365dbb8066e6bdc161c9.tar.xz
craftbukkit-ca3d0512f30545df7ae1365dbb8066e6bdc161c9.zip
Blocks now return power for sources other than redstone dust
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java2
1 files changed, 1 insertions, 1 deletions
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() {