mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #2084 from Lazzzycatwastaken/structur
Sloppelite structrute
This commit is contained in:
commit
031c78b80e
@ -10,6 +10,7 @@ import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.tool.ItemBlowtorch;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
|
||||
@ -25,6 +26,7 @@ public class ItemPoolsComponent {
|
||||
public static final String POOL_VAULT_LOCKERS = "POOL_VAULT_LOCKERS";
|
||||
public static final String POOL_METEOR_SAFE = "POOL_METEOR_SAFE";
|
||||
public static final String POOL_OIL_RIG = "POOL_OIL_RIG";
|
||||
public static final String POOL_REPAIR_MATERIALS = "POOL_REPAIR_MATERIALS";
|
||||
|
||||
public static void init() {
|
||||
|
||||
@ -210,5 +212,24 @@ public class ItemPoolsComponent {
|
||||
weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 3),
|
||||
};
|
||||
}};
|
||||
|
||||
new ItemPool(POOL_REPAIR_MATERIALS) {{
|
||||
this.pool = new WeightedRandomChestContent[] {
|
||||
weighted(ModItems.ingot_aluminium, 0, 2, 8, 3),
|
||||
weighted(ModItems.ingot_steel, 0, 0, 12, 4),
|
||||
weighted(ModItems.plate_aluminium, 0, 5, 12, 3),
|
||||
weighted(ModItems.plate_iron, 0, 6, 16, 3),
|
||||
weighted(ModItems.plate_steel, 0, 2, 12, 2),
|
||||
weighted(ModItems.ingot_tungsten, 0, 0, 2, 1),
|
||||
weighted(ModBlocks.deco_aluminium, 0, 12, 24, 4),
|
||||
weighted(ModBlocks.deco_steel, 0, 5, 12, 2),
|
||||
weighted(ModBlocks.block_aluminium, 0, 0, 2, 1),
|
||||
weighted(ModBlocks.block_steel, 0, 0, 1, 1),
|
||||
weighted(ModItems.bolt, Mats.MAT_STEEL.id, 4, 16, 3),
|
||||
weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 2, 4),
|
||||
weighted(ModItems.circuit, EnumCircuitType.ANALOG.ordinal(), 1, 3, 5),
|
||||
weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 3),
|
||||
};
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,18 +278,6 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if(biome.temperature == 0.5F || biome.temperature == 2.0F) {
|
||||
if(WorldConfig.satelliteStructure > 0 && rand.nextInt(WorldConfig.satelliteStructure) == 0) {
|
||||
for(int a = 0; a < 1; a++) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
|
||||
new Satellite().generate(world, rand, x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!biome.canSpawnLightningBolt() && biome.temperature >= 1.5F) {
|
||||
if(rand.nextInt(200) == 0) {
|
||||
for(int a = 0; a < 1; a++) {
|
||||
|
||||
@ -59,6 +59,7 @@ public class StructureManager {
|
||||
public static final NBTStructure aircraft_carrier = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/aircraft_carrier.nbt"));
|
||||
public static final NBTStructure oil_rig = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/oil_rig.nbt"));
|
||||
public static final NBTStructure beached_patrol = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/beached_patrol.nbt"));
|
||||
public static final NBTStructure dish = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/dish.nbt"));
|
||||
|
||||
// public static final NBTStructure test_rot = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-rot.nbt"));
|
||||
// public static final NBTStructure test_jigsaw = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-jigsaw.nbt"));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -87,7 +87,16 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
spawnWeight = 8;
|
||||
}});
|
||||
|
||||
NBTStructure.registerNullWeight(0, 2);
|
||||
NBTStructure.registerStructure(0, new SpawnCondition() {{
|
||||
canSpawn = biome -> biome == BiomeGenBase.plains;
|
||||
structure = new JigsawPiece("dish", StructureManager.dish, -10);
|
||||
minHeight = 53;
|
||||
maxHeight = 65;
|
||||
spawnWeight = 1;
|
||||
}});
|
||||
|
||||
NBTStructure.registerNullWeight(0, 2, biome -> biome == BiomeGenBase.plains);
|
||||
NBTStructure.registerNullWeight(0, 2, oceanBiomes::contains);
|
||||
|
||||
Map<Block, BlockSelector> bricks = new HashMap<Block, BlockSelector>() {{
|
||||
put(ModBlocks.meteor_brick, new MeteorBricks());
|
||||
|
||||
BIN
src/main/resources/assets/hbm/structures/dish.nbt
Normal file
BIN
src/main/resources/assets/hbm/structures/dish.nbt
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user