Merge pull request #2405 from Lazzzycatwastaken/forestpost

Forest post
This commit is contained in:
HbmMods 2025-08-31 13:05:22 +02:00 committed by GitHub
commit 4d5f88896a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View File

@ -73,6 +73,8 @@ public class StructureManager {
public static final NBTStructure ntmruinsI = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/ntmruinsI.nbt"));
public static final NBTStructure ntmruinsJ = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/ntmruinsJ.nbt"));
public static final NBTStructure forest_post = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/forest_post.nbt"));
public static final NBTStructure spire = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/spire.nbt"));
// public static final NBTStructure test_rot = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-rot.nbt"));

View File

@ -114,6 +114,13 @@ public class NTMWorldGenerator implements IWorldGenerator {
spawnWeight = 1;
}});
NBTStructure.registerStructure(0, new SpawnCondition() {{
canSpawn = biome -> biome == BiomeGenBase.forest;
structure = new JigsawPiece("forest_post", StructureManager.forest_post, -9);
spawnWeight = 40;
}});
NBTStructure.registerNullWeight(0, 4, oceanBiomes::contains);
NBTStructure.registerStructure(0, new SpawnCondition("ruin1") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsA", StructureManager.ntmruinsA, -1) {{conformToTerrain = true;}};