diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-11-06 06:05:28 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-11-13 16:09:52 -0600 |
commit | 7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7 (patch) | |
tree | 843902ff94d82e86f40d7e0af1ac838fee859e75 /src/main/java/net/minecraft/server/BlockTripwireHook.java | |
parent | a0c3b4f9d1b403fa64230f22b5dd3222181ba646 (diff) | |
download | craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.gz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.lz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.xz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.zip |
Update CraftBukkit to Minecraft 1.4.4.
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockTripwireHook.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockTripwireHook.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/BlockTripwireHook.java b/src/main/java/net/minecraft/server/BlockTripwireHook.java index 0fe164d6..e18bf43b 100644 --- a/src/main/java/net/minecraft/server/BlockTripwireHook.java +++ b/src/main/java/net/minecraft/server/BlockTripwireHook.java @@ -33,14 +33,14 @@ public class BlockTripwireHook extends Block { } public boolean canPlace(World world, int i, int j, int k, int l) { - return l == 2 && world.s(i, j, k + 1) ? true : (l == 3 && world.s(i, j, k - 1) ? true : (l == 4 && world.s(i + 1, j, k) ? true : l == 5 && world.s(i - 1, j, k))); + return l == 2 && world.t(i, j, k + 1) ? true : (l == 3 && world.t(i, j, k - 1) ? true : (l == 4 && world.t(i + 1, j, k) ? true : l == 5 && world.t(i - 1, j, k))); } public boolean canPlace(World world, int i, int j, int k) { - return world.s(i - 1, j, k) ? true : (world.s(i + 1, j, k) ? true : (world.s(i, j, k - 1) ? true : world.s(i, j, k + 1))); + return world.t(i - 1, j, k) ? true : (world.t(i + 1, j, k) ? true : (world.t(i, j, k - 1) ? true : world.t(i, j, k + 1))); } - public void postPlace(World world, int i, int j, int k, int l, float f, float f1, float f2) { + public int getPlacedData(World world, int i, int j, int k, int l, float f, float f1, float f2, int i1) { byte b0 = 0; if (l == 2 && world.b(i, j, k + 1, true)) { @@ -59,7 +59,11 @@ public class BlockTripwireHook extends Block { b0 = 3; } - this.a(world, i, j, k, this.id, b0, false, -1, 0); + return b0; + } + + public void postPlace(World world, int i, int j, int k, int l) { + this.a(world, i, j, k, this.id, l, false, -1, 0); } public void doPhysics(World world, int i, int j, int k, int l) { @@ -69,19 +73,19 @@ public class BlockTripwireHook extends Block { int j1 = i1 & 3; boolean flag = false; - if (!world.s(i - 1, j, k) && j1 == 3) { + if (!world.t(i - 1, j, k) && j1 == 3) { flag = true; } - if (!world.s(i + 1, j, k) && j1 == 1) { + if (!world.t(i + 1, j, k) && j1 == 1) { flag = true; } - if (!world.s(i, j, k - 1) && j1 == 0) { + if (!world.t(i, j, k - 1) && j1 == 0) { flag = true; } - if (!world.s(i, j, k + 1) && j1 == 2) { + if (!world.t(i, j, k + 1) && j1 == 2) { flag = true; } @@ -99,7 +103,7 @@ public class BlockTripwireHook extends Block { boolean flag2 = (i1 & 8) == 8; boolean flag3 = l == Block.TRIPWIRE_SOURCE.id; boolean flag4 = false; - boolean flag5 = !world.t(i, j - 1, k); + boolean flag5 = !world.v(i, j - 1, k); int i2 = Direction.a[l1]; int j2 = Direction.b[l1]; int k2 = 0; |