diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-16 20:10:11 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-16 20:10:11 +0100 |
commit | 900c541246e2b480b63be60e71a4a9a8acc61d77 (patch) | |
tree | 763d7de40757a8115b1c686f7c9ecefd19a8b119 /src/main/java/net/minecraft/server/BlockPiston.java | |
parent | 94d1338febfe844faa42179e47ddc5d3432b0843 (diff) | |
download | craftbukkit-900c541246e2b480b63be60e71a4a9a8acc61d77.tar craftbukkit-900c541246e2b480b63be60e71a4a9a8acc61d77.tar.gz craftbukkit-900c541246e2b480b63be60e71a4a9a8acc61d77.tar.lz craftbukkit-900c541246e2b480b63be60e71a4a9a8acc61d77.tar.xz craftbukkit-900c541246e2b480b63be60e71a4a9a8acc61d77.zip |
Bunchafixes which may or may not have any end result
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockPiston.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockPiston.java | 81 |
1 files changed, 25 insertions, 56 deletions
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java index a6423ed8..d8f68e91 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java @@ -267,43 +267,6 @@ public class BlockPiston extends Block { while (true) { if (l1 < 13) { - if (j1 <= 0 || j1 >= 127) { - return -1; // CraftBukkit - } - - int i2 = world.getTypeId(i1, j1, k1); - - if (i2 != 0) { - if (!a(i2, world, i1, j1, k1, true)) { - return -1; // CraftBukkit - } - - if (Block.byId[i2].e() != 1) { - if (l1 == 12) { - return -1; // CraftBukkit - } - - i1 += PistonBlockTextures.b[l]; - j1 += PistonBlockTextures.c[l]; - k1 += PistonBlockTextures.d[l]; - ++l1; - continue; - } - } - } - - return l1; // CraftBukkit - } - } - - private static int H(World world, int i, int j, int k, int l) { - int i1 = i + PistonBlockTextures.b[l]; - int j1 = j + PistonBlockTextures.c[l]; - int k1 = k + PistonBlockTextures.d[l]; - int l1 = 0; - - while (true) { - if (l1 < 13) { if (j1 > 0) { world.getClass(); if (j1 < 128 - 1) { @@ -348,30 +311,36 @@ public class BlockPiston extends Block { int i2; if (l1 < 13) { - if (j1 <= 0 || j1 >= 127) { - return false; - } + label63: { + if (j1 > 0) { + world.getClass(); + if (j1 < 128 - 1) { + i2 = world.getTypeId(i1, j1, k1); + if (i2 != 0) { + if (!a(i2, world, i1, j1, k1, true)) { + return false; + } - i2 = world.getTypeId(i1, j1, k1); - if (i2 != 0) { - if (!a(i2, world, i1, j1, k1, true)) { - return false; - } + if (Block.byId[i2].e() != 1) { + if (l1 == 12) { + return false; + } - if (Block.byId[i2].e() != 1) { - if (l1 == 12) { - return false; - } + i1 += PistonBlockTextures.b[l]; + j1 += PistonBlockTextures.c[l]; + k1 += PistonBlockTextures.d[l]; + ++l1; + continue; + } - i1 += PistonBlockTextures.b[l]; - j1 += PistonBlockTextures.c[l]; - k1 += PistonBlockTextures.d[l]; - ++l1; - continue; + Block.byId[i2].g(world, i1, j1, k1, world.getData(i1, j1, k1)); + world.setTypeId(i1, j1, k1, 0); + } + break label63; + } } - Block.byId[i2].g(world, i1, j1, k1, world.getData(i1, j1, k1)); - world.setTypeId(i1, j1, k1, 0); + return false; } } |