diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-03-01 10:49:23 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-03-01 14:38:31 +0000 |
commit | 543c4879fee3b7165764c5371d226c93fe3a657b (patch) | |
tree | 4fe9116464e1fe42a40dc3ba19b58234bd26f821 /src/main/java/net/minecraft/server/BlockStationary.java | |
parent | e9ca87000c1794715bc3fe0a7d1caaf809057635 (diff) | |
download | craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar.gz craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar.lz craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar.xz craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.zip |
Updated CraftBukkit to 1.2
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockStationary.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockStationary.java | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/BlockStationary.java b/src/main/java/net/minecraft/server/BlockStationary.java index 1b091e70..d4f276c9 100644 --- a/src/main/java/net/minecraft/server/BlockStationary.java +++ b/src/main/java/net/minecraft/server/BlockStationary.java @@ -14,6 +14,10 @@ public class BlockStationary extends BlockFluids { } } + public boolean b(IBlockAccess iblockaccess, int i, int j, int k) { + return this.material != Material.LAVA; + } + public void doPhysics(World world, int i, int j, int k, int l) { super.doPhysics(world, i, j, k, l); if (world.getTypeId(i, j, k) == this.id) { @@ -35,17 +39,19 @@ public class BlockStationary extends BlockFluids { if (this.material == Material.LAVA) { int l = random.nextInt(3); + int i1; + int j1; + // CraftBukkit start - prevent lava putting something on fire. org.bukkit.World bworld = world.getWorld(); BlockIgniteEvent.IgniteCause igniteCause = BlockIgniteEvent.IgniteCause.LAVA; // CraftBukkit end - for (int i1 = 0; i1 < l; ++i1) { + for (i1 = 0; i1 < l; ++i1) { i += random.nextInt(3) - 1; ++j; k += random.nextInt(3) - 1; - int j1 = world.getTypeId(i, j, k); - + j1 = world.getTypeId(i, j, k); if (j1 == 0) { if (this.j(world, i - 1, j, k) || this.j(world, i + 1, j, k) || this.j(world, i, j, k - 1) || this.j(world, i, j, k + 1) || this.j(world, i, j - 1, k) || this.j(world, i, j + 1, k)) { // CraftBukkit start - prevent lava putting something on fire. @@ -68,6 +74,19 @@ public class BlockStationary extends BlockFluids { return; } } + + if (l == 0) { + i1 = i; + j1 = k; + + for (int k1 = 0; k1 < 3; ++k1) { + i = i1 + random.nextInt(3) - 1; + k = j1 + random.nextInt(3) - 1; + if (world.isEmpty(i, j + 1, k) && this.j(world, i, j, k)) { + world.setTypeId(i, j + 1, k, Block.FIRE.id); + } + } + } } } |