mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
25 lines
1.3 KiB
Diff
25 lines
1.3 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||
|
Date: Mon, 20 Jan 2014 20:42:28 +0000
|
||
|
Subject: [PATCH] Don't let trees replace any block.
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/net/minecraft/server/WorldGenForestTree.java b/src/main/java/net/minecraft/server/WorldGenForestTree.java
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/net/minecraft/server/WorldGenForestTree.java
|
||
|
+++ b/src/main/java/net/minecraft/server/WorldGenForestTree.java
|
||
|
@@ -0,0 +0,0 @@ public class WorldGenForestTree extends WorldGenTreeAbstract {
|
||
|
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;
|
||
|
--
|