mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
commit
215c89df2e
@ -30,6 +30,7 @@ public class ItemPoolsPile {
|
||||
public static final String POOL_PILE_OF_GARBAGE = "POOL_PILE_OF_GARBAGE";
|
||||
public static final String POOL_PILE_MECHANICAL = "POOL_PILE_MECHANICAL";
|
||||
public static final String POOL_PILE_GEAR = "POOL_PILE_GEAR";
|
||||
public static final String POOL_PILE_SUPPLIES = "POOL_PILE_SUPPLIES";
|
||||
|
||||
|
||||
public static void init() {
|
||||
@ -173,5 +174,17 @@ public class ItemPoolsPile {
|
||||
weighted(ModItems.taurun_boots, 0, 1, 1, 20)
|
||||
};
|
||||
}};
|
||||
|
||||
new ItemPool(POOL_PILE_SUPPLIES) {{
|
||||
this.pool = new WeightedRandomChestContent[] {
|
||||
weighted(ItemGrenadeUniversal.make(EnumGrenadeShell.FRAG, EnumGrenadeFilling.HE, EnumGrenadeFuze.S3, EnumGrenadeExtra.FRAG_SLEEVE), 3, 5, 10),
|
||||
weighted(ItemGrenadeUniversal.make(EnumGrenadeShell.FRAG, EnumGrenadeFilling.HE, EnumGrenadeFuze.S3, EnumGrenadeExtra.FRAG_SLEEVE), 3, 5, 10),
|
||||
weighted(ItemGrenadeUniversal.make(EnumGrenadeShell.FRAG, EnumGrenadeFilling.HE, EnumGrenadeFuze.S3, EnumGrenadeExtra.FRAG_SLEEVE), 3, 5, 10),
|
||||
weighted(ModItems.syringe_metal_stimpak, 0, 3, 5, 30),
|
||||
weighted(ModItems.syringe_metal_psycho, 0, 3, 5, 30),
|
||||
weighted(ModItems.syringe_antidote, 0, 1, 2, 30),
|
||||
weighted(ModItems.ammo_container, 0, 2, 3, 40)
|
||||
};
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@ public class LootGenerator {
|
||||
public static final String LOOT_SHIT = "LOOT_SHIT";
|
||||
public static final String LOOT_MECHANICAL = "LOOT_MECHANICAL";
|
||||
public static final String LOOT_GEAR = "LOOT_GEAR";
|
||||
public static final String LOOT_SUPPLIES = "LOOT_SUPPLIES";
|
||||
|
||||
public static void applyLoot(World world, int x, int y, int z, String name) {
|
||||
switch(name) {
|
||||
@ -47,7 +48,8 @@ public class LootGenerator {
|
||||
case LOOT_FLAREGUN: lootFlareGun(world, x, y, z);
|
||||
case LOOT_SHIT: lootShit(world, x, y, z);
|
||||
case LOOT_MECHANICAL: lootMechanical(world, x, y, z);
|
||||
case LOOT_GEAR: lootMechanical(world, x, y, z);
|
||||
case LOOT_GEAR: lootGear(world, x, y, z);
|
||||
case LOOT_SUPPLIES: lootSupplies(world, x, y, z);
|
||||
default: lootBones(world, x, y, z); break;
|
||||
}
|
||||
}
|
||||
@ -65,8 +67,10 @@ public class LootGenerator {
|
||||
LOOT_METEOR,
|
||||
LOOT_FLAREGUN,
|
||||
LOOT_MECHANICAL,
|
||||
LOOT_GEAR,
|
||||
LOOT_SHIT,
|
||||
LOOT_GEAR,
|
||||
LOOT_SUPPLIES
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@ -280,4 +284,17 @@ public class LootGenerator {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void lootSupplies(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) + 4;
|
||||
for(int i = 0; i < limit; i++) {
|
||||
addItemWithDeviation(loot, world.rand, ItemPool.getStack(ItemPool.getPool(ItemPoolsPile.POOL_PILE_SUPPLIES), world.rand), world.rand.nextDouble() - 0.5, i * 0.03125, world.rand.nextDouble() - 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,14 +144,14 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
}});
|
||||
|
||||
NBTStructure.registerStructure(0, new SpawnCondition("factory") {{
|
||||
canSpawn = biome -> isFlatBiome(biome);
|
||||
canSpawn = biome -> biome.heightVariation <= 0.2F && !isWaterBiome(biome);
|
||||
structure = new JigsawPiece("factory", StructureManager.factory, -10);
|
||||
spawnWeight = StructureConfig.factorySpawnWeight;
|
||||
}});
|
||||
|
||||
NBTStructure.registerStructure(0, new SpawnCondition("crane") {{
|
||||
canSpawn = biome -> isFlatBiome(biome);
|
||||
structure = new JigsawPiece("crane", StructureManager.crane, -9);
|
||||
canSpawn = biome -> biome.heightVariation <= 0.2F && !isWaterBiome(biome);
|
||||
structure = new JigsawPiece("crane", StructureManager.crane, -13);
|
||||
spawnWeight = StructureConfig.craneSpawnWeight;
|
||||
}});
|
||||
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user