SIX @SEVEN

This commit is contained in:
Lazzzycatwastaken 2025-08-27 17:36:40 +02:00
parent 92d4232472
commit 66971b3310
2 changed files with 65 additions and 0 deletions

View File

@ -29,6 +29,7 @@ public class LootGenerator {
public static final String LOOT_GLYPHID_HIVE = "LOOT_GLYPHID_HIVE";
public static final String LOOT_METEOR = "LOOT_METEOR";
public static final String LOOT_FLAREGUN = "LOOT_FLAREGUN";
public static final String LOOT_SHIT = "LOOT_SHIT";
public static void applyLoot(World world, int x, int y, int z, String name) {
switch(name) {
@ -42,6 +43,7 @@ public class LootGenerator {
case LOOT_GLYPHID_HIVE: lootGlyphidHive(world, x, y, z);
case LOOT_METEOR: lootBookMeteor(world, x, y, z);
case LOOT_FLAREGUN: lootFlareGun(world, x, y, z);
case LOOT_SHIT: lootShit(world, x, y, z);
default: lootBones(world, x, y, z); break;
}
}
@ -233,4 +235,16 @@ public class LootGenerator {
0.25, k * 0.03125, 0.125);
}
}
public static void lootShit(World world, int x, int y, int z) {
TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y, z);
if(loot != null && loot.items.isEmpty()) {
int limit = world.rand.nextInt(3) + 3;
for(int i = 0; i < limit; i++) {
addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPool.getPool(ItemPoolsPile.POOL_PILE_OF_GARBAGE), world.rand), world.rand.nextDouble() - 0.5, i * 0.03125, world.rand.nextDouble() - 0.5);
}
}
}
}

View File

@ -113,6 +113,57 @@ public class NTMWorldGenerator implements IWorldGenerator {
spawnWeight = 1;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin1") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsA", StructureManager.ntmruinsA, -1) {{conformToTerrain = true;}};
spawnWeight = 20;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin2") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsB", StructureManager.ntmruinsB, -1) {{conformToTerrain = true;}};
spawnWeight = 25;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin3") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsC", StructureManager.ntmruinsC, -1) {{conformToTerrain = true;}};
spawnWeight = 25;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin4") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsD", StructureManager.ntmruinsD, -1) {{conformToTerrain = true;}};
spawnWeight = 30;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin5") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsE", StructureManager.ntmruinsE, -1) {{conformToTerrain = true;}};
spawnWeight = 30;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin6") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsF", StructureManager.ntmruinsF, -1) {{conformToTerrain = true;}};
spawnWeight = 50;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin7") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsG", StructureManager.ntmruinsG, -1) {{conformToTerrain = true;}};
spawnWeight = 50;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin8") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsH", StructureManager.ntmruinsH, -1) {{conformToTerrain = true;}};
spawnWeight = 50;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin9") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsI", StructureManager.ntmruinsI, -1) {{conformToTerrain = true;}};
spawnWeight = 50;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin10") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsJ", StructureManager.ntmruinsJ, -1) {{conformToTerrain = true;}};
spawnWeight = 35;
}});
NBTStructure.registerNullWeight(0, 2, biome -> biome == BiomeGenBase.plains);
NBTStructure.registerNullWeight(0, 2, oceanBiomes::contains);