diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-14 13:31:10 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-14 13:31:10 +0000 |
commit | 2761b598452d992b05a384528b54298ab1166456 (patch) | |
tree | fae206cadbc7acd2607b42ac9dc3d962dcaa795a /src/main/java/net/minecraft/server/BlockPressurePlate.java | |
parent | e6e50ddf9b7cb9fe4fb5e8102acf117db2db6f2a (diff) | |
download | craftbukkit-2761b598452d992b05a384528b54298ab1166456.tar craftbukkit-2761b598452d992b05a384528b54298ab1166456.tar.gz craftbukkit-2761b598452d992b05a384528b54298ab1166456.tar.lz craftbukkit-2761b598452d992b05a384528b54298ab1166456.tar.xz craftbukkit-2761b598452d992b05a384528b54298ab1166456.zip |
Update to Minecraft Server 1.2
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockPressurePlate.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockPressurePlate.java | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/main/java/net/minecraft/server/BlockPressurePlate.java b/src/main/java/net/minecraft/server/BlockPressurePlate.java index 3e228536..05d24587 100644 --- a/src/main/java/net/minecraft/server/BlockPressurePlate.java +++ b/src/main/java/net/minecraft/server/BlockPressurePlate.java @@ -41,8 +41,7 @@ public class BlockPressurePlate extends Block { return world.d(i, j - 1, k); } - public void e(World world, int i, int j, int k) { - } + public void e(World world, int i, int j, int k) {} public void b(World world, int i, int j, int k, int l) { boolean flag = false; @@ -52,7 +51,7 @@ public class BlockPressurePlate extends Block { } if (flag) { a_(world, i, j, k, world.b(i, j, k)); - world.d(i, j, k, 0); + world.e(i, j, k, 0); } } @@ -118,26 +117,30 @@ public class BlockPressurePlate extends Block { if (list.size() > 0) { flag1 = true; } + + // Craftbukkit start CraftBlock block = (CraftBlock) ((WorldServer) world).getWorld().getBlockAt(i, j, k); BlockRedstoneEvent bre = new BlockRedstoneEvent(block, BlockFace.Self, flag ? 15 : 0, flag1 ? 15 : 0); ((WorldServer) world).getServer().getPluginManager().callEvent(bre); flag1 = bre.getNewCurrent() > 0; + // Craftbukkit end + if (flag1 && !flag) { - world.b(i, j, k, 1); - world.g(i, j, k, bh); - world.g(i, j - 1, k, bh); + world.c(i, j, k, 1); + world.h(i, j, k, bi); + world.h(i, j - 1, k, bi); world.b(i, j, k, i, j, k); world.a((double) i + 0.5D, (double) j + 0.10000000000000001D, (double) k + 0.5D, "random.click", 0.3F, 0.6F); } if (!flag1 && flag) { - world.b(i, j, k, 0); - world.g(i, j, k, bh); - world.g(i, j - 1, k, bh); + world.c(i, j, k, 0); + world.h(i, j, k, bi); + world.h(i, j - 1, k, bi); world.b(i, j, k, i, j, k); world.a((double) i + 0.5D, (double) j + 0.10000000000000001D, (double) k + 0.5D, "random.click", 0.3F, 0.5F); } if (flag1) { - world.h(i, j, k, bh); + world.i(i, j, k, bi); } } @@ -145,8 +148,8 @@ public class BlockPressurePlate extends Block { int l = world.b(i, j, k); if (l > 0) { - world.g(i, j, k, bh); - world.g(i, j - 1, k, bh); + world.h(i, j, k, bi); + world.h(i, j - 1, k, bi); } super.b(world, i, j, k); } |