From d8ad596ece8c5414a77271deff0314691886339a Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Mon, 20 Jan 2014 20:44:11 +0000 Subject: [PATCH] Don't let trees replace any block when growing --- ...trees-replace-any-block-when-growing.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 CraftBukkit-Patches/0100-Don-t-let-trees-replace-any-block-when-growing.patch diff --git a/CraftBukkit-Patches/0100-Don-t-let-trees-replace-any-block-when-growing.patch b/CraftBukkit-Patches/0100-Don-t-let-trees-replace-any-block-when-growing.patch new file mode 100644 index 000000000..bc48c3483 --- /dev/null +++ b/CraftBukkit-Patches/0100-Don-t-let-trees-replace-any-block-when-growing.patch @@ -0,0 +1,27 @@ +From 5922d8a6287ae42098999994a8596e99ca181da1 Mon Sep 17 00:00:00 2001 +From: Thinkofdeath +Date: Mon, 20 Jan 2014 20:42:28 +0000 +Subject: [PATCH] Don't let trees replace any block when growing + + +diff --git a/src/main/java/net/minecraft/server/WorldGenForestTree.java b/src/main/java/net/minecraft/server/WorldGenForestTree.java +index 71ce973..caaac9a 100644 +--- a/src/main/java/net/minecraft/server/WorldGenForestTree.java ++++ b/src/main/java/net/minecraft/server/WorldGenForestTree.java +@@ -132,7 +132,12 @@ public class WorldGenForestTree extends WorldGenTreeAbstract implements BlockSap + int k3; + + for (k3 = 0; k3 < j3; ++k3) { +- this.setTypeAndData(world, i + l2, k2 - k3 - 1, k + i3, Blocks.LOG2, 1); ++ Block block = world.getType(i + l2, k2 - k3 - 1, k + i3); ++ ++ if (block.getMaterial() == Material.AIR || block.getMaterial() == Material.LEAVES) ++ { ++ this.setTypeAndData(world, i + l2, k2 - k3 - 1, k + i3, Blocks.LOG2, 1); ++ } + } + + int l3; +-- +1.8.4.msysgit.0 +