Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-17 12:00:07 +01:00
SPIGOT-4160: StructureGrowEvent not triggering for giant trees
Dieser Commit ist enthalten in:
Ursprung
095239d4c5
Commit
0891fc1c45
26
nms-patches/WorldGenMegaTreeProvider.patch
Normale Datei
26
nms-patches/WorldGenMegaTreeProvider.patch
Normale Datei
@ -0,0 +1,26 @@
|
||||
--- 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);
|
@ -8,7 +8,7 @@
|
||||
|
||||
public abstract class WorldGenTreeProvider {
|
||||
|
||||
@@ -16,6 +17,29 @@
|
||||
@@ -16,6 +17,25 @@
|
||||
if (worldgentreeabstract == null) {
|
||||
return false;
|
||||
} else {
|
||||
@ -21,10 +21,6 @@
|
||||
+ BlockSapling.treeType = TreeType.BIRCH;
|
||||
+ } else if (worldgentreeabstract instanceof WorldGenForestTree) {
|
||||
+ BlockSapling.treeType = TreeType.DARK_OAK;
|
||||
+ } else if (worldgentreeabstract instanceof WorldGenJungleTree) {
|
||||
+ BlockSapling.treeType = TreeType.JUNGLE;
|
||||
+ } else if (worldgentreeabstract instanceof WorldGenMegaTree) {
|
||||
+ BlockSapling.treeType = TreeType.MEGA_REDWOOD;
|
||||
+ } else if (worldgentreeabstract instanceof WorldGenTaiga1) {
|
||||
+ BlockSapling.treeType = TreeType.REDWOOD;
|
||||
+ } else if (worldgentreeabstract instanceof WorldGenTaiga2) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren