Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
27 Zeilen
1.0 KiB
Diff
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);
|