diff options
author | EvilSeph <evilseph@gmail.com> | 2012-01-24 23:09:01 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-01-24 23:38:15 -0500 |
commit | 3e0a26f270b46a4edd334113443dd3c2a3fcdc49 (patch) | |
tree | 652b3500ed5e33fd1ca5120974e09fc3ad7131cb /src/main/java | |
parent | 989acd0afbfc2e484bfa16be6e5d1b74118ee87f (diff) | |
download | craftbukkit-3e0a26f270b46a4edd334113443dd3c2a3fcdc49.tar craftbukkit-3e0a26f270b46a4edd334113443dd3c2a3fcdc49.tar.gz craftbukkit-3e0a26f270b46a4edd334113443dd3c2a3fcdc49.tar.lz craftbukkit-3e0a26f270b46a4edd334113443dd3c2a3fcdc49.tar.xz craftbukkit-3e0a26f270b46a4edd334113443dd3c2a3fcdc49.zip |
Fixed redstone torches not updating indirect neighbors. Fixes BUKKIT-477
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockRedstoneTorch.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java index 58e26f19..f369c0fb 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneTorch.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneTorch.java @@ -55,15 +55,14 @@ public class BlockRedstoneTorch extends BlockTorch { public void postPlace(World world, int i, int j, int k, int l) { super.postPlace(world, i, j, k, l); + + world.applyPhysics(i, j - 1, k, this.id); + world.applyPhysics(i, j + 1, k, this.id); + world.applyPhysics(i - 1, j, k, this.id); + world.applyPhysics(i + 1, j, k, this.id); + world.applyPhysics(i, j, k - 1, this.id); + world.applyPhysics(i, j, k + 1, this.id); // CraftBukkit end - if (this.isOn) { - world.applyPhysics(i, j - 1, k, this.id); - world.applyPhysics(i, j + 1, k, this.id); - world.applyPhysics(i - 1, j, k, this.id); - world.applyPhysics(i + 1, j, k, this.id); - world.applyPhysics(i, j, k - 1, this.id); - world.applyPhysics(i, j, k + 1, this.id); - } } public void remove(World world, int i, int j, int k) { @@ -121,6 +120,7 @@ public class BlockRedstoneTorch extends BlockTorch { // CraftBukkit end world.setTypeIdAndData(i, j, k, Block.REDSTONE_TORCH_OFF.id, world.getData(i, j, k)); + this.postPlace(world, i, j, k, this.id); // CraftBukkit - update indirect neighbors if (this.a(world, i, j, k, true)) { world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), "random.fizz", 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F); @@ -145,6 +145,7 @@ public class BlockRedstoneTorch extends BlockTorch { // CraftBukkit end world.setTypeIdAndData(i, j, k, Block.REDSTONE_TORCH_ON.id, world.getData(i, j, k)); + this.postPlace(world, i, j, k, this.id); // CraftBukkit - update indirect neighbors } } |