diff --git a/nms-patches/BlockFungi.patch b/nms-patches/BlockFungi.patch new file mode 100644 index 0000000000..db581eb317 --- /dev/null +++ b/nms-patches/BlockFungi.patch @@ -0,0 +1,16 @@ +--- a/net/minecraft/server/BlockFungi.java ++++ b/net/minecraft/server/BlockFungi.java +@@ -38,6 +38,13 @@ + + @Override + public void a(WorldServer worldserver, Random random, BlockPosition blockposition, IBlockData iblockdata) { ++ // CraftBukkit start ++ if (this == Blocks.WARPED_FUNGUS) { ++ BlockSapling.treeType = org.bukkit.TreeType.WARPED_FUNGUS; ++ } else if (this == Blocks.CRIMSON_FUNGUS) { ++ BlockSapling.treeType = org.bukkit.TreeType.CRIMSON_FUNGUS; ++ } ++ // CraftBukkit end + ((WorldGenFeatureConfigured) this.b.get()).a(worldserver, worldserver.getStructureManager(), worldserver.getChunkProvider().getChunkGenerator(), random, blockposition); + } + } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 81e132c9f1..a0db0cfcbb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -88,6 +88,7 @@ import net.minecraft.server.Ticket; import net.minecraft.server.TicketType; import net.minecraft.server.Unit; import net.minecraft.server.Vec3D; +import net.minecraft.server.WorldGenFeatureHugeFungiConfiguration; import net.minecraft.server.WorldGenerator; import net.minecraft.server.WorldServer; import org.apache.commons.lang.Validate; @@ -729,6 +730,14 @@ public class CraftWorld implements World { case CHORUS_PLANT: ((BlockChorusFlower) Blocks.CHORUS_FLOWER).a(world, pos, rand, 8); return true; + case CRIMSON_FUNGUS: + gen = WorldGenerator.HUGE_FUNGUS; + conf = WorldGenFeatureHugeFungiConfiguration.b; + break; + case WARPED_FUNGUS: + gen = WorldGenerator.HUGE_FUNGUS; + conf = WorldGenFeatureHugeFungiConfiguration.d; + break; case TREE: default: gen = WorldGenerator.TREE;