finished enough

This commit is contained in:
Vaern 2023-06-09 13:36:57 -07:00
parent 3ecc74f6db
commit 0239ea7968
4 changed files with 74 additions and 14 deletions

View File

@ -8,6 +8,7 @@ import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemBreedingRod.*;
import com.hbm.items.machine.ItemZirnoxRod.EnumZirnoxType;
import com.hbm.items.special.ItemBookLore.BookLoreType;
import com.hbm.items.tool.ItemBlowtorch;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
@ -355,6 +356,57 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.ink, 0, 1, 1, 1), //make that mf rare; 1:555 weight
};
public static WeightedRandomChestContent[] solidFuel = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.solid_fuel, 0, 1, 5, 1),
new WeightedRandomChestContent(ModItems.solid_fuel_presto, 0, 1, 2, 2),
new WeightedRandomChestContent(ModItems.ball_dynamite, 0, 1, 4, 2),
new WeightedRandomChestContent(Items.redstone, 0, 1, 3, 1),
new WeightedRandomChestContent(ModItems.niter, 0, 1, 3, 1)
};
public static WeightedRandomChestContent[] labVault = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ItemBlowtorch.getEmptyTool(ModItems.blowtorch), 1, 1, 4),
new WeightedRandomChestContent(ModItems.chemistry_set, 0, 1, 1, 15),
new WeightedRandomChestContent(ModItems.screwdriver, 0, 1, 1, 10),
new WeightedRandomChestContent(ModItems.nugget_mercury, 0, 1, 1, 3),
new WeightedRandomChestContent(ModItems.morning_glory, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.filter_coal, 0, 1, 1, 5),
new WeightedRandomChestContent(ModItems.dust, 0, 1, 3, 25),
new WeightedRandomChestContent(Items.paper, 0, 1, 2, 15),
new WeightedRandomChestContent(ModItems.cell_empty, 0, 1, 1, 5),
new WeightedRandomChestContent(Items.glass_bottle, 0, 1, 1, 5),
new WeightedRandomChestContent(ModItems.powder_iodine, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.powder_bromine, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.powder_cobalt, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.powder_neodymium, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.powder_boron, 0, 1, 1, 1),
};
public static WeightedRandomChestContent[] lockersVault = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.robes_helmet, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.robes_plate, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.robes_legs, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.robes_boots, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.jackt, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.jackt2, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.gas_mask_m65, 0, 1, 1, 2),
new WeightedRandomChestContent(ModItems.gas_mask_mono, 0, 1, 1, 2),
new WeightedRandomChestContent(ModItems.goggles, 0, 1, 1, 2),
new WeightedRandomChestContent(ModItems.gas_mask_filter, 0, 1, 1, 4),
new WeightedRandomChestContent(ModItems.flame_opinion, 0, 1, 3, 5),
new WeightedRandomChestContent(ModItems.flame_conspiracy, 0, 1, 3, 5),
new WeightedRandomChestContent(ModItems.flame_politics, 0, 1, 3, 5),
new WeightedRandomChestContent(ModItems.cigarette, 0, 1, 8, 5),
new WeightedRandomChestContent(ModItems.canteen_13, 0, 1, 1, 2),
new WeightedRandomChestContent(ModItems.armor_polish, 0, 1, 1, 3),
new WeightedRandomChestContent(ModItems.gun_kit_1, 0, 1, 1, 3),
new WeightedRandomChestContent(ModItems.rag, 0, 1, 3, 5),
new WeightedRandomChestContent(Items.paper, 0, 1, 6, 7),
new WeightedRandomChestContent(Items.clock, 0, 1, 1, 3),
new WeightedRandomChestContent(Items.book, 0, 1, 5, 10),
new WeightedRandomChestContent(Items.experience_bottle, 0, 1, 3, 1),
};
/** ITEMBOOKLORE ARRAYS */
//might make a wrapper class for this, if game-state knowledge using the nbt system becomes that relevant
public final static BookLoreType[] books_office_sch = new BookLoreType[] {

View File

@ -6,6 +6,7 @@ import com.hbm.world.gen.component.BunkerComponents;
import com.hbm.world.gen.component.CivilianFeatures;
import com.hbm.world.gen.component.OfficeFeatures;
import com.hbm.world.gen.component.RuinFeatures;
import com.hbm.world.gen.component.BunkerComponents.BunkerStart;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.registry.GameRegistry;
@ -23,6 +24,7 @@ public class HbmWorld {
//MapGenStructureIO.registerStructure(StructureStartTest.class, "HFR_STRUCTURE");
//MapGenStructureIO.func_143031_a(StructureComponentTest.class, "HFR_COMPONENT");
MapGenStructureIO.registerStructure(MapGenNTMFeatures.Start.class, "NTMFeatures");
MapGenStructureIO.registerStructure(BunkerStart.class, "NTMBunker");
registerNTMFeatures();
registerWorldGen(new HbmWorldGen(), 1);

View File

@ -7,6 +7,7 @@ import java.util.Random;
import com.hbm.config.GeneralConfig;
import com.hbm.config.StructureConfig;
import com.hbm.world.gen.component.BunkerComponents.BunkerStart;
import com.hbm.world.gen.component.CivilianFeatures.*;
import com.hbm.world.gen.component.OfficeFeatures.*;
import com.hbm.world.gen.component.RuinFeatures.*;
@ -89,6 +90,9 @@ public class MapGenNTMFeatures extends MapGenStructure {
/** Returns new StructureStart if structure can be spawned at coords */
@Override
protected StructureStart getStructureStart(int chunkX, int chunkZ) {
if(this.rand.nextInt(15) == 0) { //eh might as well, they'll already be prettty rare anyway
return new BunkerStart(this.worldObj, this.rand, chunkX, chunkZ);
}
return new MapGenNTMFeatures.Start(this.worldObj, this.rand, chunkX, chunkZ);
}

View File

@ -20,6 +20,8 @@ public class BunkerComponents {
public static class BunkerStart extends ProceduralStructureStart {
public BunkerStart() {}
public BunkerStart(World world, Random rand, int chunkX, int chunkZ) {
super(chunkX, chunkZ);
@ -373,13 +375,13 @@ public class BunkerComponents {
placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaE | 4, 4, 1, 9, box);
placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaS, 5, 1, 8, box);
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(0), 5, 2, 9, box);
generateInvContents(world, box, rand, ModBlocks.filing_cabinet, getDecoModelMeta(0), 3, 1, 9, HbmChestContents.antenna/*TODO change */, 5);
generateInvContents(world, box, rand, ModBlocks.filing_cabinet, getDecoModelMeta(0), 3, 1, 9, HbmChestContents.filingCabinet, 5);
//lockers
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 8, 1, 7, HbmChestContents.antenna/*TODO change */, 3);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 8, 2, 7, HbmChestContents.antenna/*TODO change */, 3);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 8, 1, 7, HbmChestContents.lockersVault, 3);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 8, 2, 7, HbmChestContents.lockersVault, 5);
fillWithBlocks(world, box, 8, 1, 8, 8, 2, 8, ModBlocks.deco_tungsten);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 8, 1, 9, HbmChestContents.antenna/*TODO change */, 3);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 8, 2, 9, HbmChestContents.antenna/*TODO change */, 3);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 8, 1, 9, HbmChestContents.lockersVault, 4);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 8, 2, 9, HbmChestContents.lockersVault, 5);
fillWithMetadataBlocks(world, box, 8, 3, 7, 8, 3, 9, Blocks.trapdoor, getDecoModelMeta(2) >> 2);
//doors
placeDoor(world, box, ModBlocks.door_bunker, 1, true, rand.nextBoolean(), 7, 1, 0);
@ -472,7 +474,7 @@ public class BunkerComponents {
//table & chest
placeBlockAtCurrentPosition(world, Blocks.fence, 0, 6, 1, 2, box);
placeBlockAtCurrentPosition(world, Blocks.wooden_pressure_plate, 0, 6, 2, 2, box);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 6, 1, 3, HbmChestContents.antenna/*TODO change */, 7);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 6, 1, 3, HbmChestContents.lockersVault, 8);
//desk w/ computer + bobblehead
placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaS | 4, 1, 1, 8, box);
placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaE | 4, 1, 1, 9, box);
@ -677,12 +679,12 @@ public class BunkerComponents {
fillWithMetadataBlocks(world, box, 1, 3, 9, 1, 3, 10, ModBlocks.tape_recorder, decoMetaW);
fillWithBlocks(world, box, 1, 1, 11, 1, 3, 11, ModBlocks.deco_tungsten);
//desks w/ computers
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(2), 3, 1, 4, HbmChestContents.antenna, 4); //wip
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(2), 3, 1, 4, HbmChestContents.machineParts, 6);
placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaS | 4, 3, 1, 5, box);
fillWithMetadataBlocks(world, box, 4, 1, 5, 4, 1, 7, ModBlocks.concrete_smooth_stairs, stairMetaW | 4);
placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaN, 3, 1, 7, box);
placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaS | 4, 3, 1, 9, box);
fillWithMetadataBlocks(world, box, 4, 1, 9, 4, 1, 11, ModBlocks.concrete_smooth_stairs, 4);
fillWithMetadataBlocks(world, box, 4, 1, 9, 4, 1, 11, ModBlocks.concrete_smooth_stairs, stairMetaW | 4);
placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaN, 3, 1, 11, box);
placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 3, 2, 5, box);
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, decoModelMetaW, 4, 2, 6, box);
@ -702,7 +704,7 @@ public class BunkerComponents {
//table w/ chest
placeBlockAtCurrentPosition(world, Blocks.fence, 0, 7, 1, 9, box);
placeBlockAtCurrentPosition(world, Blocks.wooden_pressure_plate, 0, 7, 2, 9, box);
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 7, 1, 10, HbmChestContents.antenna, 4); //wip
generateInvContents(world, box, rand, Blocks.chest, getDecoMeta(4), 7, 1, 10, HbmChestContents.labVault, 8);
//doors
placeDoor(world, box, ModBlocks.door_bunker, 1, true, rand.nextBoolean(), 5, 1, 0);
placeDoor(world, box, ModBlocks.door_bunker, 1, false, rand.nextBoolean(), 6, 1, 0);
@ -817,8 +819,8 @@ public class BunkerComponents {
placeBlockAtCurrentPosition(world, ModBlocks.fluid_duct_gauge, decoMetaW, 10, 2, 5, box);
placeBlockAtCurrentPosition(world, ModBlocks.barrel_plastic, 0, 6, 1, 5, box);
//chests
generateInvContents(world, box, rand, Blocks.chest, decoMetaS, 7, 1, 5, HbmChestContents.antenna, 4); //WIP
generateInvContents(world, box, rand, Blocks.chest, decoMetaS, 9, 1, 5, HbmChestContents.antenna, 4);
generateInvContents(world, box, rand, Blocks.chest, decoMetaS, 7, 1, 5, HbmChestContents.solidFuel, 5);
generateInvContents(world, box, rand, Blocks.chest, decoMetaS, 9, 1, 5, HbmChestContents.solidFuel, 6);
break;
case 1:
placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 5, 6, 1, 1, box);
@ -871,7 +873,7 @@ public class BunkerComponents {
placeBlockAtCurrentPosition(world, ModBlocks.deco_pipe_quad_rusted, getPillarMeta(4), 7, 3, 1, box);
placeBlockAtCurrentPosition(world, ModBlocks.fluid_duct_gauge, decoMetaN, 6, 3, 1, box);
//chest
generateInvContents(world, box, rand, Blocks.chest, decoMetaN, 6, 1, 2, HbmChestContents.antenna, 4); //WIP
generateInvContents(world, box, rand, Blocks.chest, decoMetaN, 6, 1, 2, HbmChestContents.nuclearFuel, 8);
break;
}
//transformer
@ -903,8 +905,8 @@ public class BunkerComponents {
placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 8, 2, 10, box);
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(0), 9, 2, 10, box);
//loot
generateInvContents(world, box, rand, Blocks.chest, decoMetaE, 1, 1, 7, HbmChestContents.antenna, 4); //WIP
generateInvContents(world, box, rand, ModBlocks.filing_cabinet, getDecoModelMeta(0), 7, 1, 10, HbmChestContents.antenna, 4);
generateInvContents(world, box, rand, Blocks.chest, decoMetaE, 1, 1, 7, HbmChestContents.machineParts, 6);
generateInvContents(world, box, rand, ModBlocks.filing_cabinet, getDecoModelMeta(0), 7, 1, 10, HbmChestContents.filingCabinet, 4);
//doors
placeDoor(world, box, ModBlocks.door_bunker, 1, true, rand.nextBoolean(), 3, 1, 0);
placeDoor(world, box, ModBlocks.door_bunker, 1, false, rand.nextBoolean(), 4, 1, 0);