Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/WorldGenMegaTreeProvider.patch

27 Zeilen
1.0 KiB
Diff

--- a/net/minecraft/server/WorldGenMegaTreeProvider.java
+++ b/net/minecraft/server/WorldGenMegaTreeProvider.java
@@ -2,6 +2,7 @@
import java.util.Random;
import javax.annotation.Nullable;
+import org.bukkit.TreeType; // CraftBukkit
public abstract class WorldGenMegaTreeProvider extends WorldGenTreeProvider {
@@ -28,6 +29,15 @@
if (worldgentreeabstract == null) {
return false;
} else {
+ // CraftBukkit start
+ if (worldgentreeabstract instanceof WorldGenJungleTree) {
+ BlockSapling.treeType = TreeType.JUNGLE;
+ } else if (worldgentreeabstract instanceof WorldGenMegaTree) {
+ BlockSapling.treeType = TreeType.MEGA_REDWOOD;
+ } else {
+ throw new IllegalArgumentException("Unknown tree generator " + worldgentreeabstract);
+ }
+ // CraftBukkit end
IBlockData iblockdata1 = Blocks.AIR.getBlockData();
generatoraccess.setTypeAndData(blockposition.a(i, 0, j), iblockdata1, 4);