From 90fae3b579b175164d14bf000d18d49863eb4557 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sat, 3 Mar 2012 10:14:53 +0000 Subject: [PATCH] Fixed leaf decay issue - this fixes BUKKIT-948 and BUKKIT-871 --- .../java/net/minecraft/server/WorldGenTrees.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/minecraft/server/WorldGenTrees.java b/src/main/java/net/minecraft/server/WorldGenTrees.java index 40522cfb62..8bf16cd4a1 100644 --- a/src/main/java/net/minecraft/server/WorldGenTrees.java +++ b/src/main/java/net/minecraft/server/WorldGenTrees.java @@ -102,19 +102,19 @@ public class WorldGenTrees extends WorldGenerator { if (k1 == 0 || k1 == Block.LEAVES.id) { this.setTypeAndData(world, i, j + j1, k, Block.LOG.id, this.c); if (this.b && j1 > 0) { - if (random.nextInt(3) > 0 && (world).isEmpty(i - 1, j + j1, k)) { + if (random.nextInt(3) > 0 && world.isEmpty(i - 1, j + j1, k)) { this.setTypeAndData(world, i - 1, j + j1, k, Block.VINE.id, 8); } - if (random.nextInt(3) > 0 && (world).isEmpty(i + 1, j + j1, k)) { + if (random.nextInt(3) > 0 && world.isEmpty(i + 1, j + j1, k)) { this.setTypeAndData(world, i + 1, j + j1, k, Block.VINE.id, 2); } - if (random.nextInt(3) > 0 && (world).isEmpty(i, j + j1, k - 1)) { + if (random.nextInt(3) > 0 && world.isEmpty(i, j + j1, k - 1)) { this.setTypeAndData(world, i, j + j1, k - 1, Block.VINE.id, 1); } - if (random.nextInt(3) > 0 && (world).isEmpty(i, j + j1, k + 1)) { + if (random.nextInt(3) > 0 && world.isEmpty(i, j + j1, k + 1)) { this.setTypeAndData(world, i, j + j1, k + 1, Block.VINE.id, 4); } } @@ -162,7 +162,7 @@ public class WorldGenTrees extends WorldGenerator { // CraftBukkit - Changed world to BlockChangeDelegate private void a(BlockChangeDelegate world, int i, int j, int k, int l) { - world.setRawTypeIdAndData(i, j, k, Block.VINE.id, l); // CraftBukkit - "raw" + ((World)world).setTypeIdAndData(i, j, k, Block.VINE.id, l); // CraftBukkit - Cast int i1 = 4; while (true) { @@ -171,7 +171,7 @@ public class WorldGenTrees extends WorldGenerator { return; } - world.setRawTypeIdAndData(i, j, k, Block.VINE.id, l); // CraftBukkit - "raw" + ((World)world).setRawTypeIdAndData(i, j, k, Block.VINE.id, l); // CraftBukkit - Cast --i1; } }