diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockSapling.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockSapling.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java index 67e727c7..71ffc87d 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java +++ b/src/main/java/net/minecraft/server/BlockSapling.java @@ -62,7 +62,7 @@ public class BlockSapling extends BlockFlower { } else if (l == 3) { for (i1 = 0; i1 >= -1; --i1) { for (j1 = 0; j1 >= -1; --j1) { - if (world.getTypeId(i + i1, j, k + j1) == this.id && world.getTypeId(i + i1 + 1, j, k + j1) == this.id && world.getTypeId(i + i1, j, k + j1 + 1) == this.id && world.getTypeId(i + i1 + 1, j, k + j1 + 1) == this.id) { + if (this.f(world, i + i1, j, k + j1, 3) && this.f(world, i + i1 + 1, j, k + j1, 3) && this.f(world, i + i1, j, k + j1 + 1, 3) && this.f(world, i + i1 + 1, j, k + j1 + 1, 3)) { treeType = TreeType.JUNGLE; gen = new WorldGenMegaTree(false, 10 + random.nextInt(20), 3, 3); flag = true; @@ -127,6 +127,10 @@ public class BlockSapling extends BlockFlower { // CraftBukkit end } + public boolean f(World world, int i, int j, int k, int l) { + return world.getTypeId(i, j, k) == this.id && (world.getData(i, j, k) & 3) == l; + } + protected int getDropData(int i) { return i & 3; } |