mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-15 23:25:37 +01:00
SPIGOT-5906: Huge Fungi tree generation
This commit is contained in:
parent
fdf6017fa9
commit
5a6c529833
16
nms-patches/BlockFungi.patch
Normal file
16
nms-patches/BlockFungi.patch
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -88,6 +88,7 @@ import net.minecraft.server.Ticket;
|
|||||||
import net.minecraft.server.TicketType;
|
import net.minecraft.server.TicketType;
|
||||||
import net.minecraft.server.Unit;
|
import net.minecraft.server.Unit;
|
||||||
import net.minecraft.server.Vec3D;
|
import net.minecraft.server.Vec3D;
|
||||||
|
import net.minecraft.server.WorldGenFeatureHugeFungiConfiguration;
|
||||||
import net.minecraft.server.WorldGenerator;
|
import net.minecraft.server.WorldGenerator;
|
||||||
import net.minecraft.server.WorldServer;
|
import net.minecraft.server.WorldServer;
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
@ -729,6 +730,14 @@ public class CraftWorld implements World {
|
|||||||
case CHORUS_PLANT:
|
case CHORUS_PLANT:
|
||||||
((BlockChorusFlower) Blocks.CHORUS_FLOWER).a(world, pos, rand, 8);
|
((BlockChorusFlower) Blocks.CHORUS_FLOWER).a(world, pos, rand, 8);
|
||||||
return true;
|
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:
|
case TREE:
|
||||||
default:
|
default:
|
||||||
gen = WorldGenerator.TREE;
|
gen = WorldGenerator.TREE;
|
||||||
|
Loading…
Reference in New Issue
Block a user