diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-23 02:37:56 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-23 02:37:56 +0000 |
commit | f759e0b60d3a575d31921c930e436af321b0e7e8 (patch) | |
tree | 4b1eb7ac01670854c686b1f6faa2f97ff337f7d7 /src/main/java/net/minecraft/server/BlockLever.java | |
parent | a124bfdab59cc9a9d8369425027e61eccd1d62fb (diff) | |
download | craftbukkit-f759e0b60d3a575d31921c930e436af321b0e7e8.tar craftbukkit-f759e0b60d3a575d31921c930e436af321b0e7e8.tar.gz craftbukkit-f759e0b60d3a575d31921c930e436af321b0e7e8.tar.lz craftbukkit-f759e0b60d3a575d31921c930e436af321b0e7e8.tar.xz craftbukkit-f759e0b60d3a575d31921c930e436af321b0e7e8.zip |
Update to Minecraft 1.3 beta
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockLever.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockLever.java | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/src/main/java/net/minecraft/server/BlockLever.java b/src/main/java/net/minecraft/server/BlockLever.java index 1db1637e..d7ffb608 100644 --- a/src/main/java/net/minecraft/server/BlockLever.java +++ b/src/main/java/net/minecraft/server/BlockLever.java @@ -28,13 +28,13 @@ public class BlockLever extends Block { return world.d(i - 1, j, k) ? true : (world.d(i + 1, j, k) ? true : (world.d(i, j, k - 1) ? true : (world.d(i, j, k + 1) ? true : world.d(i, j - 1, k)))); } - public void c(World world, int i, int j, int k, int l) { + public void d(World world, int i, int j, int k, int l) { int i1 = world.getData(i, j, k); int j1 = i1 & 8; i1 &= 7; if (l == 1 && world.d(i, j - 1, k)) { - i1 = 5 + world.l.nextInt(2); + i1 = 5 + world.k.nextInt(2); } if (l == 2 && world.d(i, j, k + 1)) { @@ -56,23 +56,7 @@ public class BlockLever extends Block { world.c(i, j, k, i1 + j1); } - public void e(World world, int i, int j, int k) { - if (world.d(i - 1, j, k)) { - world.c(i, j, k, 1); - } else if (world.d(i + 1, j, k)) { - world.c(i, j, k, 2); - } else if (world.d(i, j, k - 1)) { - world.c(i, j, k, 3); - } else if (world.d(i, j, k + 1)) { - world.c(i, j, k, 4); - } else if (world.d(i, j - 1, k)) { - world.c(i, j, k, 5 + world.l.nextInt(2)); - } - - this.g(world, i, j, k); - } - - public void b(World world, int i, int j, int k, int l) { + public void a(World world, int i, int j, int k, int l) { if (this.g(world, i, j, k)) { int i1 = world.getData(i, j, k) & 7; boolean flag = false; @@ -98,7 +82,7 @@ public class BlockLever extends Block { } if (flag) { - this.a_(world, i, j, k, world.getData(i, j, k)); + this.b_(world, i, j, k, world.getData(i, j, k)); world.e(i, j, k, 0); } } @@ -106,7 +90,7 @@ public class BlockLever extends Block { private boolean g(World world, int i, int j, int k) { if (!this.a(world, i, j, k)) { - this.a_(world, i, j, k, world.getData(i, j, k)); + this.b_(world, i, j, k, world.getData(i, j, k)); world.e(i, j, k, 0); return false; } else { @@ -220,7 +204,7 @@ public class BlockLever extends Block { return (iblockaccess.getData(i, j, k) & 8) > 0; } - public boolean d(World world, int i, int j, int k, int l) { + public boolean c(World world, int i, int j, int k, int l) { int i1 = world.getData(i, j, k); if ((i1 & 8) == 0) { |