diff options
author | feildmaster <admin@feildmaster.com> | 2012-07-29 02:33:13 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-08-02 04:58:50 -0500 |
commit | a43d621c0138110d2ec362b2eaa8f938f241bb49 (patch) | |
tree | d2ebc0d7a4a969d3257b1b958236428a24117eb1 /src/main/java/net/minecraft/server/BlockFlowing.java | |
parent | 08e2923bd4282579ca0cf7af0e6207cba0591e5c (diff) | |
download | craftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.tar craftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.tar.gz craftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.tar.lz craftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.tar.xz craftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.zip |
Update CraftBukkit to Minecraft 1.3.1
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockFlowing.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockFlowing.java | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java index 347733f2..e5f44a90 100644 --- a/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java @@ -17,26 +17,25 @@ public class BlockFlowing extends BlockFluids { super(i, material); } - private void i(World world, int i, int j, int k) { + private void l(World world, int i, int j, int k) { int l = world.getData(i, j, k); world.setRawTypeIdAndData(i, j, k, this.id + 1, l); - world.b(i, j, k, i, j, k); - world.notify(i, j, k); + world.d(i, j, k, i, j, k); } - public boolean b(IBlockAccess iblockaccess, int i, int j, int k) { + public boolean c(IBlockAccess iblockaccess, int i, int j, int k) { return this.material != Material.LAVA; } - public void a(World world, int i, int j, int k, Random random) { + public void b(World world, int i, int j, int k, Random random) { // CraftBukkit start org.bukkit.World bworld = world.getWorld(); org.bukkit.Server server = world.getServer(); org.bukkit.block.Block source = bworld == null ? null : bworld.getBlockAt(i, j, k); // CraftBukkit end - int l = this.g(world, i, j, k); + int l = this.f_(world, i, j, k); byte b0 = 1; if (this.material == Material.LAVA && !world.worldProvider.d) { @@ -50,18 +49,18 @@ public class BlockFlowing extends BlockFluids { byte b1 = -100; this.a = 0; - int j1 = this.f(world, i - 1, j, k, b1); + int j1 = this.e(world, i - 1, j, k, b1); - j1 = this.f(world, i + 1, j, k, j1); - j1 = this.f(world, i, j, k - 1, j1); - j1 = this.f(world, i, j, k + 1, j1); + j1 = this.e(world, i + 1, j, k, j1); + j1 = this.e(world, i, j, k - 1, j1); + j1 = this.e(world, i, j, k + 1, j1); i1 = j1 + b0; if (i1 >= 8 || j1 < 0) { i1 = -1; } - if (this.g(world, i, j + 1, k) >= 0) { - int k1 = this.g(world, i, j + 1, k); + if (this.f_(world, i, j + 1, k) >= 0) { + int k1 = this.f_(world, i, j + 1, k); if (k1 >= 8) { i1 = k1; @@ -83,23 +82,25 @@ public class BlockFlowing extends BlockFluids { flag = false; } - if (i1 != l) { + if (i1 == l) { + if (flag) { + this.l(world, i, j, k); + } + } else { l = i1; if (i1 < 0) { world.setTypeId(i, j, k, 0); } else { world.setData(i, j, k, i1); - world.c(i, j, k, this.id, this.d()); + world.a(i, j, k, this.id, this.p_()); world.applyPhysics(i, j, k, this.id); } - } else if (flag) { - this.i(world, i, j, k); } } else { - this.i(world, i, j, k); + this.l(world, i, j, k); } - if (this.l(world, i, j - 1, k)) { + if (this.p(world, i, j - 1, k)) { // CraftBukkit start - send "down" to the server BlockFromToEvent event = new BlockFromToEvent(source, BlockFace.DOWN); if (server != null) { @@ -114,14 +115,14 @@ public class BlockFlowing extends BlockFluids { } if (l >= 8) { - world.setTypeIdAndData(i, j - 1, k, this.id, l); + this.flow(world, i, j - 1, k, l); } else { - world.setTypeIdAndData(i, j - 1, k, this.id, l + 8); + this.flow(world, i, j - 1, k, l + 8); } } // CraftBukkit end - } else if (l >= 0 && (l == 0 || this.k(world, i, j - 1, k))) { - boolean[] aboolean = this.j(world, i, j, k); + } else if (l >= 0 && (l == 0 || this.o(world, i, j - 1, k))) { + boolean[] aboolean = this.n(world, i, j, k); i1 = l + b0; if (l >= 8) { @@ -155,14 +156,14 @@ public class BlockFlowing extends BlockFluids { } private void flow(World world, int i, int j, int k, int l) { - if (this.l(world, i, j, k)) { + if (this.p(world, i, j, k)) { int i1 = world.getTypeId(i, j, k); if (i1 > 0) { if (this.material == Material.LAVA) { this.fizz(world, i, j, k); } else { - Block.byId[i1].b(world, i, j, k, world.getData(i, j, k), 0); + Block.byId[i1].c(world, i, j, k, world.getData(i, j, k), 0); } } @@ -170,7 +171,7 @@ public class BlockFlowing extends BlockFluids { } } - private int c(World world, int i, int j, int k, int l, int i1) { + private int d(World world, int i, int j, int k, int l, int i1) { int j1 = 1000; for (int k1 = 0; k1 < 4; ++k1) { @@ -194,13 +195,13 @@ public class BlockFlowing extends BlockFluids { ++i2; } - if (!this.k(world, l1, j, i2) && (world.getMaterial(l1, j, i2) != this.material || world.getData(l1, j, i2) != 0)) { - if (!this.k(world, l1, j - 1, i2)) { + if (!this.o(world, l1, j, i2) && (world.getMaterial(l1, j, i2) != this.material || world.getData(l1, j, i2) != 0)) { + if (!this.o(world, l1, j - 1, i2)) { return l; } if (l < 4) { - int j2 = this.c(world, l1, j, i2, l + 1, k1); + int j2 = this.d(world, l1, j, i2, l + 1, k1); if (j2 < j1) { j1 = j2; @@ -213,7 +214,7 @@ public class BlockFlowing extends BlockFluids { return j1; } - private boolean[] j(World world, int i, int j, int k) { + private boolean[] n(World world, int i, int j, int k) { int l; int i1; @@ -238,11 +239,11 @@ public class BlockFlowing extends BlockFluids { ++j1; } - if (!this.k(world, i1, j, j1) && (world.getMaterial(i1, j, j1) != this.material || world.getData(i1, j, j1) != 0)) { - if (!this.k(world, i1, j - 1, j1)) { - this.c[l] = 0; + if (!this.o(world, i1, j, j1) && (world.getMaterial(i1, j, j1) != this.material || world.getData(i1, j, j1) != 0)) { + if (this.o(world, i1, j - 1, j1)) { + this.c[l] = this.d(world, i1, j, j1, 1, l); } else { - this.c[l] = this.c(world, i1, j, j1, 1, l); + this.c[l] = 0; } } } @@ -262,7 +263,7 @@ public class BlockFlowing extends BlockFluids { return this.b; } - private boolean k(World world, int i, int j, int k) { + private boolean o(World world, int i, int j, int k) { int l = world.getTypeId(i, j, k); if (l != Block.WOODEN_DOOR.id && l != Block.IRON_DOOR_BLOCK.id && l != Block.SIGN_POST.id && l != Block.LADDER.id && l != Block.SUGAR_CANE_BLOCK.id) { @@ -278,8 +279,8 @@ public class BlockFlowing extends BlockFluids { } } - protected int f(World world, int i, int j, int k, int l) { - int i1 = this.g(world, i, j, k); + protected int e(World world, int i, int j, int k, int l) { + int i1 = this.f_(world, i, j, k); if (i1 < 0) { return l; @@ -296,16 +297,16 @@ public class BlockFlowing extends BlockFluids { } } - private boolean l(World world, int i, int j, int k) { + private boolean p(World world, int i, int j, int k) { Material material = world.getMaterial(i, j, k); - return material == this.material ? false : (material == Material.LAVA ? false : !this.k(world, i, j, k)); + return material == this.material ? false : (material == Material.LAVA ? false : !this.o(world, i, j, k)); } public void onPlace(World world, int i, int j, int k) { super.onPlace(world, i, j, k); if (world.getTypeId(i, j, k) == this.id) { - world.c(i, j, k, this.id, this.d()); + world.a(i, j, k, this.id, this.p_()); } } } |