mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #2006 from Lazzzycatwastaken/AAAAAAAAAAAAAAA
Ocean structures
This commit is contained in:
commit
473bdd67c4
@ -3,6 +3,7 @@ package com.hbm.itempool;
|
||||
import static com.hbm.lib.HbmChestContents.weighted;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.items.ItemEnums.EnumCokeType;
|
||||
import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
|
||||
@ -23,6 +24,7 @@ public class ItemPoolsComponent {
|
||||
public static final String POOL_VAULT_LAB = "POOL_VAULT_LAB";
|
||||
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 void init() {
|
||||
|
||||
@ -197,5 +199,16 @@ public class ItemPoolsComponent {
|
||||
weighted(ModItems.stamp_book, 7, 1, 1, 1),
|
||||
};
|
||||
}};
|
||||
|
||||
new ItemPool(POOL_OIL_RIG) {{
|
||||
this.pool = new WeightedRandomChestContent[] {
|
||||
weighted(ModItems.oil_detector, 0, 1, 1, 1),
|
||||
weighted(ModItems.canister_full, Fluids.OIL.getID(), 1, 4, 5),
|
||||
weighted(ModBlocks.machine_fraction_tower,0, 0, 1, 1),
|
||||
weighted(ModBlocks.fraction_spacer,0, 0, 1, 1),
|
||||
weighted(ModItems.circuit,EnumCircuitType.ANALOG.ordinal(), 1, 4, 1),
|
||||
weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 3),
|
||||
};
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,10 +56,13 @@ public class StructureManager {
|
||||
|
||||
public static final NBTStructure vertibird = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/vertibird.nbt"));
|
||||
public static final NBTStructure crashed_vertibird = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/crashed-vertibird.nbt"));
|
||||
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 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"));
|
||||
// public static final NBTStructure test_jigsaw_core = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-jigsaw-core.nbt"));
|
||||
// public static final NBTStructure test_jigsaw_hall = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-jigsaw-hall.nbt"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,6 +36,9 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
|
||||
public NTMWorldGenerator() {
|
||||
final List<BiomeGenBase> invalidBiomes = Arrays.asList(new BiomeGenBase[] {BiomeGenBase.ocean, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.deepOcean});
|
||||
final List<BiomeGenBase> oceanBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.deepOcean });
|
||||
final List<BiomeGenBase> beachBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach });
|
||||
|
||||
|
||||
NBTStructure.registerStructure(0, new SpawnCondition() {{
|
||||
canSpawn = biome -> !invalidBiomes.contains(biome);
|
||||
@ -61,6 +64,31 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
spawnWeight = 3 * 4;
|
||||
}});
|
||||
|
||||
NBTStructure.registerStructure(0, new SpawnCondition() {{
|
||||
canSpawn = oceanBiomes::contains;
|
||||
structure = new JigsawPiece("aircraft_carrier", StructureManager.aircraft_carrier, -6);
|
||||
maxHeight = 42;
|
||||
spawnWeight = 1;
|
||||
}});
|
||||
|
||||
NBTStructure.registerStructure(0, new SpawnCondition() {{
|
||||
canSpawn = biome -> biome == BiomeGenBase.deepOcean;
|
||||
structure = new JigsawPiece("oil_rig", StructureManager.oil_rig, -20);
|
||||
maxHeight = 12;
|
||||
minHeight = 11;
|
||||
spawnWeight = 2;
|
||||
}});
|
||||
|
||||
NBTStructure.registerStructure(0, new SpawnCondition() {{
|
||||
canSpawn = beachBiomes::contains;
|
||||
structure = new JigsawPiece("beached_patrol", StructureManager.beached_patrol, -5);
|
||||
minHeight = 58;
|
||||
maxHeight = 67;
|
||||
spawnWeight = 8;
|
||||
}});
|
||||
|
||||
NBTStructure.registerNullWeight(0, 2);
|
||||
|
||||
Map<Block, BlockSelector> bricks = new HashMap<Block, BlockSelector>() {{
|
||||
put(ModBlocks.meteor_brick, new MeteorBricks());
|
||||
}};
|
||||
@ -201,4 +229,4 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
nbtGen.generateStructures(world, rand, chunkProvider, chunkX, chunkZ);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BIN
src/main/resources/assets/hbm/structures/aircraft_carrier.nbt
Normal file
BIN
src/main/resources/assets/hbm/structures/aircraft_carrier.nbt
Normal file
Binary file not shown.
BIN
src/main/resources/assets/hbm/structures/beached_patrol.nbt
Normal file
BIN
src/main/resources/assets/hbm/structures/beached_patrol.nbt
Normal file
Binary file not shown.
BIN
src/main/resources/assets/hbm/structures/oil_rig.nbt
Normal file
BIN
src/main/resources/assets/hbm/structures/oil_rig.nbt
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user