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/WorldGenHugeMushroom.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/WorldGenHugeMushroom.java')
-rw-r--r-- | src/main/java/net/minecraft/server/WorldGenHugeMushroom.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main/java/net/minecraft/server/WorldGenHugeMushroom.java b/src/main/java/net/minecraft/server/WorldGenHugeMushroom.java index ba18d554..0873320b 100644 --- a/src/main/java/net/minecraft/server/WorldGenHugeMushroom.java +++ b/src/main/java/net/minecraft/server/WorldGenHugeMushroom.java @@ -14,10 +14,13 @@ public class WorldGenHugeMushroom extends WorldGenerator { private int a = -1; public WorldGenHugeMushroom(int i) { + super(true); this.a = i; } - public WorldGenHugeMushroom() {} + public WorldGenHugeMushroom() { + super(false); + } // CraftBukkit start - delegate to grow() public boolean a(World world, Random random, int i, int j, int k) { @@ -35,7 +38,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { int i1 = random.nextInt(3) + 4; boolean flag = true; - if (j >= 1 && j + i1 + 1 <= world.height) { + if (j >= 1 && j + i1 + 1 < 256) { int j1; int k1; int l1; @@ -50,7 +53,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { for (k1 = i - b0; k1 <= i + b0 && flag; ++k1) { for (l1 = k - b0; l1 <= k + b0 && flag; ++l1) { - if (j1 >= 0 && j1 < world.height) { + if (j1 >= 0 && j1 < 256) { i2 = world.getTypeId(k1, j1, l1); if (i2 != 0 && i2 != Block.LEAVES.id) { flag = false; @@ -73,7 +76,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { } else { // CraftBukkit start if (event == null) { - world.setRawTypeId(i, j - 1, k, Block.DIRT.id); + world.setRawTypeIdAndData(i, j - 1, k, Block.DIRT.id, 0); } else { BlockState dirtState = bukkitWorld.getBlockAt(i, j - 1, k).getState(); dirtState.setTypeId(Block.DIRT.id); @@ -158,7 +161,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { l2 = 0; } - if ((l2 != 0 || j >= j + i1 - 1) && !Block.o[world.getTypeId(i2, k1, k2)]) { + if ((l2 != 0 || j >= j + i1 - 1) && !Block.n[world.getTypeId(i2, k1, k2)]) { // CraftBukkit start if (event == null) { world.setRawTypeIdAndData(i2, k1, k2, Block.BIG_MUSHROOM_1.id + l, l2); @@ -176,7 +179,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { for (k1 = 0; k1 < i1; ++k1) { l1 = world.getTypeId(i, j + k1, k); - if (!Block.o[l1]) { + if (!Block.n[l1]) { // CraftBukkit start if (event == null) { world.setRawTypeIdAndData(i, j + k1, k, Block.BIG_MUSHROOM_1.id + l, 10); @@ -199,6 +202,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { } } // CraftBukkit end + return true; } } |