mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 05:26:50 +01:00
26 lines
1 KiB
Diff
26 lines
1 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);
|