mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 19:56:52 +01:00
19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
31 lines
1.6 KiB
Diff
31 lines
1.6 KiB
Diff
From 614ea6fac94e4fa3d2e901bbf41c81907347fe47 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 2653bd8..dd9e5b6 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldGenForestTree.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldGenForestTree.java
|
|
@@ -123,7 +123,15 @@ public class WorldGenForestTree extends WorldGenTreeAbstract {
|
|
int k2;
|
|
|
|
for (k2 = 0; k2 < j2; ++k2) {
|
|
- this.a(world, new BlockPosition(blockposition.getX() + l1, k1 - k2 - 1, blockposition.getZ() + i2), Blocks.LOG2, EnumLogVariant.DARK_OAK.a() - 4);
|
|
+ // Spigot start
|
|
+ BlockPosition position = new BlockPosition(blockposition.getX() + l1, k1 - k2 - 1, blockposition.getZ() + i2);
|
|
+ Block bl = world.getType(position).getBlock();
|
|
+
|
|
+ if (bl.getMaterial() == Material.AIR || bl.getMaterial() == Material.LEAVES)
|
|
+ {
|
|
+ this.a(world, position, Blocks.LOG2, EnumLogVariant.DARK_OAK.a() - 4);
|
|
+ }
|
|
+ // Spigot end
|
|
}
|
|
|
|
int l2;
|
|
--
|
|
2.1.0
|
|
|