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/BlockFire.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/BlockFire.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockFire.java | 66 |
1 files changed, 31 insertions, 35 deletions
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java index a0871334..6aece4c3 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -15,12 +15,12 @@ public class BlockFire extends Block { super(i, j, Material.l); a = new int[256]; b = new int[256]; - a(Block.x.bh, 5, 20); - a(Block.J.bh, 5, 5); - a(Block.K.bh, 30, 60); - a(Block.an.bh, 30, 20); - a(Block.am.bh, 15, 100); - a(Block.ab.bh, 30, 60); + a(Block.x.bi, 5, 20); + a(Block.J.bi, 5, 5); + a(Block.K.bi, 30, 60); + a(Block.an.bi, 30, 20); + a(Block.am.bi, 15, 100); + a(Block.ab.bi, 30, 60); a(true); } @@ -45,27 +45,25 @@ public class BlockFire extends Block { return 10; } - @Override public void a(World world, int i, int j, int k, Random random) { - boolean flag = world.a(i, j - 1, k) == Block.bb.bh; - int ll = world.b(i, j, k); + boolean flag = world.a(i, j - 1, k) == Block.bb.bi; + int l = world.b(i, j, k); - if (ll < 15) { - world.b(i, j, k, ll + 1); - world.h(i, j, k, bh); + if (l < 15) { + world.c(i, j, k, l + 1); + world.i(i, j, k, bi); } if (!flag && !g(world, i, j, k)) { - if (!world.d(i, j - 1, k) || ll > 3) { - world.d(i, j, k, 0); + if (!world.d(i, j - 1, k) || l > 3) { + world.e(i, j, k, 0); } return; } - // CraftBukkit: Cast to fix compile errors. - if ((i == 0) && (!b((IBlockAccess)world, i, j - 1, k)) && ll == 15 && (random.nextInt(4) == 0)) { - world.d(i, j, k, 0); + if (!flag && !b(((IBlockAccess) (world)), i, j - 1, k) && l == 15 && random.nextInt(4) == 0) { + world.e(i, j, k, 0); return; } - if (ll % 2 == 0 && ll > 2) { + if (l % 2 == 0 && l > 2) { a(world, i + 1, j, k, 300, random); a(world, i - 1, j, k, 300, random); a(world, i, j - 1, k, 250, random); @@ -95,7 +93,7 @@ public class BlockFire extends Block { return; } if (i2 > 0 && random.nextInt(l1) <= i2) { - world.d(i1, k1, j1, bh); + world.e(i1, k1, j1, bi); } } } @@ -107,7 +105,7 @@ public class BlockFire extends Block { int i1 = b[world.a(i, j, k)]; if (random.nextInt(l) < i1) { - boolean flag = world.a(i, j, k) == Block.am.bh ? true : false; + boolean flag = world.a(i, j, k) == Block.am.bi; if (random.nextInt(2) == 0) { // CraftBukkit: Call to stop very slow spread of fire. @@ -119,9 +117,9 @@ public class BlockFire extends Block { if (event.isCancelled()) { return; } - world.d(i, j, k, bh); + world.e(i, j, k, bi); } else { - world.d(i, j, k, 0); + world.e(i, j, k, 0); } if (flag) { Block.am.a(world, i, j, k, 0); @@ -130,23 +128,22 @@ public class BlockFire extends Block { } private boolean g(World world, int i, int j, int k) { - // CraftBukkit: Cast to correct compile errors 6 times. - if (b((IBlockAccess)world, i + 1, j, k)) { + if (b(((IBlockAccess) (world)), i + 1, j, k)) { return true; } - if (b((IBlockAccess)world, i - 1, j, k)) { + if (b(((IBlockAccess) (world)), i - 1, j, k)) { return true; } - if (b((IBlockAccess)world, i, j - 1, k)) { + if (b(((IBlockAccess) (world)), i, j - 1, k)) { return true; } - if (b((IBlockAccess)world, i, j + 1, k)) { + if (b(((IBlockAccess) (world)), i, j + 1, k)) { return true; } - if (b((IBlockAccess)world, i, j, k - 1)) { + if (b(((IBlockAccess) (world)), i, j, k - 1)) { return true; } - return b((IBlockAccess)world, i, j, k + 1); + return b(((IBlockAccess) (world)), i, j, k + 1); } private int h(World world, int i, int j, int k) { @@ -189,7 +186,7 @@ public class BlockFire extends Block { public void b(World world, int i, int j, int k, int l) { if (!world.d(i, j - 1, k) && !g(world, i, j, k)) { - world.d(i, j, k, 0); + world.e(i, j, k, 0); return; } else { return; @@ -197,16 +194,15 @@ public class BlockFire extends Block { } public void e(World world, int i, int j, int k) { - if (world.a(i, j - 1, k) == Block.ap.bh && Block.be.a_(world, i, j, k)) { + if (world.a(i, j - 1, k) == Block.ap.bi && Block.be.b_(world, i, j, k)) { return; } if (!world.d(i, j - 1, k) && !g(world, i, j, k)) { - world.d(i, j, k, 0); + world.e(i, j, k, 0); return; } else { - world.h(i, j, k, bh); + world.i(i, j, k, bi); return; } } -} - +}
\ No newline at end of file |