geforkt von Mirrors/Paper
SPIGOT-4160: StructureGrowEvent not triggering for giant trees
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
5bdad5e046
Commit
63ec61fc4a
26
paper-server/nms-patches/WorldGenMegaTreeProvider.patch
Normale Datei
26
paper-server/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 {
|
public abstract class WorldGenTreeProvider {
|
||||||
|
|
||||||
@@ -16,6 +17,29 @@
|
@@ -16,6 +17,25 @@
|
||||||
if (worldgentreeabstract == null) {
|
if (worldgentreeabstract == null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
@ -21,10 +21,6 @@
|
|||||||
+ BlockSapling.treeType = TreeType.BIRCH;
|
+ BlockSapling.treeType = TreeType.BIRCH;
|
||||||
+ } else if (worldgentreeabstract instanceof WorldGenForestTree) {
|
+ } else if (worldgentreeabstract instanceof WorldGenForestTree) {
|
||||||
+ BlockSapling.treeType = TreeType.DARK_OAK;
|
+ 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) {
|
+ } else if (worldgentreeabstract instanceof WorldGenTaiga1) {
|
||||||
+ BlockSapling.treeType = TreeType.REDWOOD;
|
+ BlockSapling.treeType = TreeType.REDWOOD;
|
||||||
+ } else if (worldgentreeabstract instanceof WorldGenTaiga2) {
|
+ } else if (worldgentreeabstract instanceof WorldGenTaiga2) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren