mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
More bedrooms & loot, removed militarybasefeatures, compartmentalization
This commit is contained in:
parent
f59f5c7a83
commit
42efc46a9f
@ -37,7 +37,7 @@ public class BlockDecoContainer extends BlockDecoModel implements ITileEntityPro
|
||||
try {
|
||||
return tile.newInstance();
|
||||
} catch (Exception e) {
|
||||
System.out.println("BlockDecoContainer attempted to create a TE, but couldn't. How does that even happen?");
|
||||
MainRegistry.logger.error("BlockDecoContainer attempted to create a TE, but couldn't. How does that even happen?");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,6 +52,9 @@ public class BlockDecoModel extends Block {
|
||||
super.registerBlockIcons(iconRegister);
|
||||
icons = new IIcon[subTypes];
|
||||
|
||||
if(subTypes == 1)
|
||||
return;
|
||||
|
||||
for(byte i = 0; i < subTypes; i++)
|
||||
icons[i] = iconRegister.registerIcon(this.textureName + "_" + i);
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
@ -43,10 +44,10 @@ public class ItemStructurePattern extends ItemStructureTool {
|
||||
int maxZ = Math.max(savedZ, z) - pos.getZ();
|
||||
|
||||
for(int ix = minX; ix <= maxX; ix++) {
|
||||
for(int iy = minX; iy <= maxY; iy++) {
|
||||
for(int iz = minX; iz <= maxZ; iz++) {
|
||||
for(int iy = minY; iy <= maxY; iy++) {
|
||||
for(int iz = minZ; iz <= maxZ; iz++) {
|
||||
|
||||
Block b = world.getBlock(ix + pos.getX(), iy + pos.getY(), iz + pos.getZ());
|
||||
Block b = world.getBlock(ix + pos.getX(), iy + pos.getY(), iz + pos.getZ());
|
||||
int meta = world.getBlockMetadata(ix + pos.getX(), iy + pos.getY(), iz + pos.getZ());
|
||||
|
||||
message.concat("placeBlockAtCurrentPosition(world, " + b.getUnlocalizedName() + ", " + meta + ", " + ix + ", " + iy + ", " + iz + ", box);\n");
|
||||
|
||||
@ -368,49 +368,67 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.ink, 0, 1, 1, 1), //make that mf rare; 1:555 weight
|
||||
};
|
||||
|
||||
/** Nowhere else to put this and this seems like the most fitting place **/
|
||||
public static ItemStack genetateBook(String key) {
|
||||
|
||||
String author = resolve("book.lore." + key + ".author");
|
||||
String title = resolve("book.lore." + key + ".title");
|
||||
|
||||
ItemStack book = new ItemStack(Items.written_book);
|
||||
book.stackTagCompound = new NBTTagCompound();
|
||||
book.stackTagCompound.setString("author", author);
|
||||
book.stackTagCompound.setString("title", title);
|
||||
NBTTagList nbt = new NBTTagList();
|
||||
|
||||
for(byte i = 1; i <= 50; i++) {
|
||||
String unloc = "book.lore." + key + ".page" + i;
|
||||
String page = resolve(unloc);
|
||||
|
||||
if(page.equals(unloc))
|
||||
break;
|
||||
else
|
||||
nbt.appendTag(new NBTTagString(page));
|
||||
}
|
||||
|
||||
book.stackTagCompound.setTag("pages", nbt);
|
||||
|
||||
return book;
|
||||
}
|
||||
public static WeightedRandomChestContent[] bedroom1 = new WeightedRandomChestContent[] { //soda enjoyer who really needs to charge their radio
|
||||
new WeightedRandomChestContent(ModItems.can_empty, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.can_creature, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.can_smart, 0, 1, 3, 2),
|
||||
new WeightedRandomChestContent(ModItems.can_mrsugar, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.med_ipecac, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.radx, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.dust_tiny, 0, 1, 3, 2),
|
||||
new WeightedRandomChestContent(ModItems.dust, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(Items.paper, 0, 1, 12, 7),
|
||||
new WeightedRandomChestContent(Items.book, 0, 1, 3, 5),
|
||||
new WeightedRandomChestContent(ModItems.battery_su, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.canteen_13, 0, 1, 1, 1),
|
||||
};
|
||||
|
||||
private static String resolve(String key) {
|
||||
String result = books.get(key);
|
||||
return result != null ? result : key;
|
||||
}
|
||||
public static WeightedRandomChestContent[] bedroom2 = new WeightedRandomChestContent[] { //overworking nuka-cola enthusiast
|
||||
new WeightedRandomChestContent(ModItems.twinkie, 0, 1, 3, 7),
|
||||
new WeightedRandomChestContent(ModItems.coffee, 0, 1, 1, 5),
|
||||
new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.bottle_quantum, 0, 1, 1, 4),
|
||||
new WeightedRandomChestContent(ModItems.bottle_cherry, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.bottle_opener, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.radaway, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.dust_tiny, 0, 1, 3, 2),
|
||||
new WeightedRandomChestContent(ModItems.dust, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.battery_su_l, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(Items.paper, 0, 1, 12, 10),
|
||||
new WeightedRandomChestContent(Items.book, 0, 1, 3, 5),
|
||||
new WeightedRandomChestContent(ModItems.canteen_13, 0, 1, 1, 1),
|
||||
};
|
||||
|
||||
private static HashMap<String, String> books = new HashMap();
|
||||
public static WeightedRandomChestContent[] bedroom3 = new WeightedRandomChestContent[] { //secretly alcoholic journaling fan who drinks straight from the canister
|
||||
new WeightedRandomChestContent(Items.writable_book, 0, 1, 12, 10),
|
||||
new WeightedRandomChestContent(Items.feather, 0, 1, 2, 5),
|
||||
new WeightedRandomChestContent(new ItemStack(ModItems.canister_full, 1, Fluids.ETHANOL.getID()), 1, 2, 10),
|
||||
new WeightedRandomChestContent(ModItems.scrumpy, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.dust_tiny, 0, 1, 3, 3),
|
||||
new WeightedRandomChestContent(ModItems.dust, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(Items.paper, 0, 1, 12, 10),
|
||||
new WeightedRandomChestContent(Items.book, 0, 1, 3, 10),
|
||||
new WeightedRandomChestContent(ModItems.canteen_13, 0, 1, 1, 2),
|
||||
};
|
||||
|
||||
public static WeightedRandomChestContent[] bedroom4 = new WeightedRandomChestContent[] { //gun nut with a knack for self-made weapons
|
||||
new WeightedRandomChestContent(ModItems.armor_polish, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.gun_kit_1, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.mechanism_revolver_1, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.mechanism_revolver_2, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.mechanism_rifle_1, 0, 1, 2, 1),
|
||||
new WeightedRandomChestContent(ModItems.mechanism_rifle_2, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.battery_su_l, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.bolt_tungsten, 0, 1, 4, 1),
|
||||
new WeightedRandomChestContent(ModItems.wire_aluminium, 0, 1, 5, 1),
|
||||
new WeightedRandomChestContent(ModItems.steel_plate, 0, 1, 3, 1),
|
||||
new WeightedRandomChestContent(ModItems.screwdriver, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.wrench, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.hand_drill, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.clip_revolver_nopip, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.ammo_20gauge, 0, 1, 8, 2),
|
||||
new WeightedRandomChestContent(ModItems.gun_revolver_nopip, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.canteen_13, 0, 1, 1, 1),
|
||||
};
|
||||
|
||||
static {
|
||||
books.put("book.lore.office0.title", "Letter of Resignation");
|
||||
books.put("book.lore.office0.author", "Kosma");
|
||||
books.put("book.lore.office0.page1", "Management downsized our department again yesterday. Those idiots only have themselves to blame, I don't know what they were expecting after the Panay fiasco. Who the hell leaks that sort of information? We're losing millions and");
|
||||
books.put("book.lore.office0.page2", "it's ME who's the one out of a job now. I'M the one being asked to resign. I hope you asshats finally learn from your overabundance of mistakes and take that stick out of your ass.");
|
||||
books.put("book.lore.office0.page3", "I'm not coming back on Friday. Just send the paycheck.");
|
||||
books.put("book.lore.office1.title", "Note");
|
||||
books.put("book.lore.office1.author", "Jonas");
|
||||
books.put("book.lore.office1.page1", null);
|
||||
books.put("book.lore.office2.page2", null);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,11 +2,10 @@ package com.hbm.lib;
|
||||
|
||||
import com.hbm.world.worldgen.MapGenNTMFeatures;
|
||||
import com.hbm.world.worldgen.NTMWorldGenerator;
|
||||
import com.hbm.world.worldgen.components.BunkerComponents.*;
|
||||
import com.hbm.world.worldgen.components.CivilianFeatures.*;
|
||||
import com.hbm.world.worldgen.components.MilitaryBaseFeatures.*;
|
||||
import com.hbm.world.worldgen.components.OfficeFeatures.*;
|
||||
import com.hbm.world.worldgen.components.RuinFeatures.*;
|
||||
import com.hbm.world.worldgen.components.BunkerComponents;
|
||||
import com.hbm.world.worldgen.components.CivilianFeatures;
|
||||
import com.hbm.world.worldgen.components.OfficeFeatures;
|
||||
import com.hbm.world.worldgen.components.RuinFeatures;
|
||||
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
@ -36,32 +35,9 @@ public class HbmWorld {
|
||||
|
||||
/** Register structures in MapGenStructureIO */
|
||||
public static void registerNTMFeatures() {
|
||||
MapGenStructureIO.func_143031_a(NTMHouse1.class, "NTMHouse1");
|
||||
MapGenStructureIO.func_143031_a(NTMHouse2.class, "NTMHouse2");
|
||||
MapGenStructureIO.func_143031_a(NTMLab1.class, "NTMLab1");
|
||||
MapGenStructureIO.func_143031_a(NTMLab2.class, "NTMLab2");
|
||||
MapGenStructureIO.func_143031_a(NTMWorkshop1.class, "NTMWorkshop1");
|
||||
MapGenStructureIO.func_143031_a(NTMRuin1.class, "NTMRuin1");
|
||||
MapGenStructureIO.func_143031_a(NTMRuin2.class, "NTMRuin2");
|
||||
MapGenStructureIO.func_143031_a(NTMRuin3.class, "NTMRuin3");
|
||||
MapGenStructureIO.func_143031_a(NTMRuin4.class, "NTMRuin4");
|
||||
//aggggggggggg
|
||||
MapGenStructureIO.func_143031_a(BasicHelipad.class, "NTMBasicHelipad");
|
||||
MapGenStructureIO.func_143031_a(RadioShack.class, "NTMRadioShack");
|
||||
MapGenStructureIO.func_143031_a(LargeOffice.class, "NTMLargeOffice");
|
||||
MapGenStructureIO.func_143031_a(LargeOfficeCorner.class, "NTMLargeOfficeCorner");
|
||||
|
||||
//bunker
|
||||
MapGenStructureIO.func_143031_a(Atrium.class, "NTMBAtrium");
|
||||
MapGenStructureIO.func_143031_a(Corridor.class, "NTMBCorridor");
|
||||
MapGenStructureIO.func_143031_a(WideCorridor.class, "NTMBWideCorridor");
|
||||
MapGenStructureIO.func_143031_a(Intersection.class, "NTMBIntersection");
|
||||
MapGenStructureIO.func_143031_a(WideIntersection.class, "NTMBWideIntersection");
|
||||
MapGenStructureIO.func_143031_a(UtilityCloset.class, "NTMBUtilityCloset");
|
||||
MapGenStructureIO.func_143031_a(SupplyRoom.class, "NTMBSupplyRoom");
|
||||
MapGenStructureIO.func_143031_a(WasteDisposal.class, "NTMBWasteDisposal");
|
||||
MapGenStructureIO.func_143031_a(Bedroom.class, "NTMBBedroom");
|
||||
MapGenStructureIO.func_143031_a(CenterCrossing.class, "NTMBCenterCrossing");
|
||||
MapGenStructureIO.func_143031_a(Reactor.class, "NTMBReactor");
|
||||
CivilianFeatures.registerComponents();
|
||||
OfficeFeatures.registerComponents();
|
||||
RuinFeatures.registerComponents();
|
||||
BunkerComponents.registerComponents();
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,6 +83,32 @@ public class LootGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
public static void lootMakeshiftGun(World world, int x, int y, int z) {
|
||||
|
||||
TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y, z);
|
||||
|
||||
if(loot != null && loot.items.isEmpty()) {
|
||||
|
||||
if(world.rand.nextInt(2) == 0)
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.gun_lever_action), 0, 0, 0.125);
|
||||
|
||||
int count = world.rand.nextInt(2) + 1;
|
||||
for(int i = 0; i < count; i++) {
|
||||
int type = world.rand.nextInt(2);
|
||||
Item parts = type < 1 ? ModItems.plate_steel : ModItems.mechanism_rifle_1;
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(parts), -0.3125, i * 0.03125, 0.3125);
|
||||
}
|
||||
|
||||
count = world.rand.nextInt(2) + 2;
|
||||
for(int i = 0; i < count; i++)
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.wire_aluminium), 0.3125, i * 0.03125, -0.125);
|
||||
|
||||
int type = world.rand.nextInt(4);
|
||||
Item tool = type > 2 ? ModItems.wrench : ModItems.screwdriver;
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(tool), 0.005, 0, -0.3125);
|
||||
}
|
||||
}
|
||||
|
||||
public static void lootNukeStorage(World world, int x, int y, int z) {
|
||||
|
||||
TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y, z);
|
||||
|
||||
@ -9,8 +9,6 @@ import java.util.Random;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.StructureConfig;
|
||||
import com.hbm.world.worldgen.components.CivilianFeatures.*;
|
||||
import com.hbm.world.worldgen.components.MilitaryBaseFeatures;
|
||||
import com.hbm.world.worldgen.components.MilitaryBaseFeatures.*;
|
||||
import com.hbm.world.worldgen.components.OfficeFeatures.*;
|
||||
import com.hbm.world.worldgen.components.RuinFeatures.*;
|
||||
|
||||
@ -140,10 +138,6 @@ public class MapGenNTMFeatures extends MapGenStructure {
|
||||
} else if(biome.temperature >= 0.25 && biome.temperature <= 0.3 && biome.rainfall >= 0.6 && biome.rainfall <= 0.9 && rand.nextBoolean()) { //Taiga & Mega Taiga
|
||||
NTMWorkshop1 workshop1 = new NTMWorkshop1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(workshop1);
|
||||
|
||||
} else if(biome.heightVariation <= 0.2 && biome.rainfall <= 0.5 && !(biome instanceof BiomeGenBeach) && rand.nextInt(5) == 0) { //Everything except jungles, extra-hilly areas, and beaches
|
||||
MilitaryBaseFeatures.smallHelipad(components, chunkX, posY, chunkZ, rand); //agggggggg
|
||||
|
||||
} else { //Everything else
|
||||
switch(rand.nextInt(3)) {
|
||||
case 0:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraft.world.gen.structure.StructureBoundingBox;
|
||||
|
||||
/* Described as "Civilian", as that's the overarching connection between all of these structures. Unlike the ruins, there's not enough to
|
||||
@ -21,6 +22,14 @@ import net.minecraft.world.gen.structure.StructureBoundingBox;
|
||||
*/
|
||||
public class CivilianFeatures {
|
||||
|
||||
public static void registerComponents() {
|
||||
MapGenStructureIO.func_143031_a(NTMHouse1.class, "NTMHouse1");
|
||||
MapGenStructureIO.func_143031_a(NTMHouse2.class, "NTMHouse2");
|
||||
MapGenStructureIO.func_143031_a(NTMLab1.class, "NTMLab1");
|
||||
MapGenStructureIO.func_143031_a(NTMLab2.class, "NTMLab2");
|
||||
MapGenStructureIO.func_143031_a(NTMWorkshop1.class, "NTMWorkshop1");
|
||||
}
|
||||
|
||||
/** Sandstone Ruin 1 */
|
||||
public static class NTMHouse1 extends Component {
|
||||
|
||||
|
||||
@ -256,7 +256,7 @@ abstract public class Component extends StructureComponent {
|
||||
ItemDoor.placeDoorBlock(world, posX, posY, posZ, meta, door);
|
||||
}
|
||||
|
||||
//N:0 W:1 S:2 E:3
|
||||
/**N:0 W:1 S:2 E:3 */
|
||||
protected void placeBed(World world, StructureBoundingBox box, int meta, int featureX, int featureY, int featureZ) {
|
||||
int xOffset = 0;
|
||||
int zOffset = 0;
|
||||
@ -377,9 +377,9 @@ abstract public class Component extends StructureComponent {
|
||||
IInventory inventory = (IInventory) world.getTileEntity(posX, posY, posZ);
|
||||
|
||||
if(inventory != null) {
|
||||
ItemStack book = HbmChestContents.genetateBook(key);
|
||||
|
||||
inventory.setInventorySlotContents(slot, book);
|
||||
//ItemStack book = HbmChestContents.genetateBook(key);
|
||||
//TODO: replace this with ItemBookLore version
|
||||
//inventory.setInventorySlotContents(slot, book);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,182 +0,0 @@
|
||||
package com.hbm.world.worldgen.components;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.structure.StructureBoundingBox;
|
||||
|
||||
//These structures are... kind of? low quality, but they test out new methods so whatev.
|
||||
//TODO: smite
|
||||
public class MilitaryBaseFeatures {
|
||||
|
||||
//stop-gap methods until this entire mess can be organized into proper classes/structure groups
|
||||
public static void smallHelipad(LinkedList components, int chunkX, int posY, int chunkZ, Random rand) {
|
||||
BasicHelipad helipad = new BasicHelipad(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
int[] chunkPos = getAdjacentChunk(chunkX, chunkZ, rand);
|
||||
|
||||
RadioShack radio = new RadioShack(rand, chunkPos[0] * 16 + 8, posY, chunkPos[1] * 16 + 8);
|
||||
components.add(helipad);
|
||||
components.add(radio);
|
||||
}
|
||||
|
||||
//ugh
|
||||
public static int[] getAdjacentChunk(int chunkX, int chunkZ, Random rand) {
|
||||
int[] chunkPos = new int[2];
|
||||
|
||||
switch(rand.nextInt(4)) {
|
||||
case 0:
|
||||
chunkPos[0] = chunkX;
|
||||
chunkPos[1] = chunkZ + 1;
|
||||
break;
|
||||
case 1:
|
||||
chunkPos[0] = chunkX - 1;
|
||||
chunkPos[1] = chunkZ;
|
||||
break;
|
||||
case 2:
|
||||
chunkPos[0] = chunkX;
|
||||
chunkPos[1] = chunkZ - 1;
|
||||
break;
|
||||
case 3:
|
||||
chunkPos[0] = chunkX + 1;
|
||||
chunkPos[1] = chunkZ;
|
||||
break;
|
||||
}
|
||||
|
||||
return chunkPos;
|
||||
}
|
||||
|
||||
public static class BasicHelipad extends Component {
|
||||
|
||||
public BasicHelipad() { super(); }
|
||||
|
||||
protected BasicHelipad(Random rand, int minX, int minY, int minZ) {
|
||||
super(rand, minX, minY, minZ, 12, 0, 12);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addComponentParts(World world, Random rand, StructureBoundingBox box) {
|
||||
|
||||
if(!this.setAverageHeight(world, box, this.boundingBox.minY)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0, -1, 0);
|
||||
|
||||
for(int i = 1; i < sizeX; i++) {
|
||||
for(int j = 1; j < sizeZ; j++) {
|
||||
clearCurrentPositionBlocksUpwards(world, i, 1, j, box);
|
||||
}
|
||||
}
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 1, sizeX - 1, sizeZ - 1, -1, box);
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 0, sizeX, 0, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 1, 0, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, sizeX, 1, sizeX, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, sizeZ, sizeX - 1, sizeZ, -1, box);
|
||||
|
||||
//Helipad
|
||||
fillWithBlocks(world, box, 1, 0, 1, 11, 0, 1, ModBlocks.concrete, Blocks.air, false); //this entire time, the second block was actually for anything not at min/max x's, y's, and z's. useful!
|
||||
fillWithBlocks(world, box, 11, 0, 2, 11, 0, 11, ModBlocks.concrete, Blocks.air, false);
|
||||
fillWithBlocks(world, box, 1, 0, 11, 10, 0, 11, ModBlocks.concrete, Blocks.air, false);
|
||||
fillWithBlocks(world, box, 1, 0, 2, 1, 0, 10, ModBlocks.concrete, Blocks.air, false);
|
||||
|
||||
fillWithBlocks(world, box, 2, 0, 2, 10, 0, 10, ModBlocks.concrete_smooth, Blocks.air, false); //i'm not carefully carving out the white H lmao fuck that
|
||||
fillWithBlocks(world, box, 4, 0, 4, 4, 0, 8, ModBlocks.concrete_colored, Blocks.air, false); //white is 0
|
||||
fillWithBlocks(world, box, 8, 0, 4, 8, 0, 8, ModBlocks.concrete_colored, Blocks.air, false);
|
||||
fillWithBlocks(world, box, 5, 0, 6, 7, 0, 6, ModBlocks.concrete_colored, Blocks.air, false);
|
||||
|
||||
//Surrounding Fences
|
||||
placeBlocksOnTop(world, box, ModBlocks.fence_metal, 0, 0, sizeX, 0, 1);
|
||||
placeBlocksOnTop(world, box, ModBlocks.fence_metal, sizeX, 1, sizeX, sizeZ, 1);
|
||||
placeBlocksOnTop(world, box, ModBlocks.fence_metal, 0, sizeZ, sizeX - 1, sizeZ, 1);
|
||||
placeBlocksOnTop(world, box, ModBlocks.fence_metal, 0, 1, 0, sizeZ - 1, 1);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class RadioShack extends Component {
|
||||
|
||||
private static LabTiles RandomLabTiles = new LabTiles();
|
||||
private static ConcreteBricks ConcreteBricks = new ConcreteBricks();
|
||||
|
||||
public RadioShack() { super(); }
|
||||
|
||||
protected RadioShack(Random rand, int minX, int minY, int minZ) {
|
||||
super(rand, minX, minY, minZ, 6, 4, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addComponentParts(World world, Random rand, StructureBoundingBox box) {
|
||||
|
||||
if(!this.setAverageHeight(world, box, this.boundingBox.minY)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0, -1, 0);
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 1, sizeX, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 2, 0, 2, 0, box);
|
||||
|
||||
//Floor & Foundation
|
||||
fillWithRandomizedBlocks(world, box, 2, 0, 1, 5, 0, 4, false, rand, RandomLabTiles);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, 0, 1, 0, 1, box);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, 0, sizeX, 0, 1, box);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, 0, 1, 0, sizeZ, box);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, 0, sizeX, 0, sizeZ, box);
|
||||
fillWithBlocks(world, box, 2, 0, 1, sizeX - 1, 0, 1, ModBlocks.concrete_smooth, Blocks.air, false);
|
||||
fillWithBlocks(world, box, 2, 0, 0, sizeX - 1, 0, 0, ModBlocks.concrete_smooth, Blocks.air, false);
|
||||
fillWithBlocks(world, box, sizeX, 0, 2, sizeX, 0, sizeZ - 1, ModBlocks.concrete_smooth, Blocks.air, false);
|
||||
fillWithBlocks(world, box, 2, 0, sizeZ, sizeX - 1, 0, sizeZ, ModBlocks.concrete_smooth, Blocks.air, false);
|
||||
fillWithBlocks(world, box, 1, 0, 2, 1, 0, sizeZ - 1, ModBlocks.concrete_smooth, Blocks.air, false);
|
||||
|
||||
//Back Wall
|
||||
fillWithRandomizedBlocks(world, box, 1, 1, 1, 2, sizeY - 1, 1, false, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 2, 1, 0, 5, sizeY - 1, 0, false, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 5, 1, 1, sizeX, sizeY - 1, 1, false, rand, ConcreteBricks);
|
||||
//Front Wall
|
||||
fillWithRandomizedBlocks(world, box, 1, 1, sizeZ, 2, sizeY - 1, sizeZ, false, rand, ConcreteBricks);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.brick_concrete, 0, 3, sizeY - 1, sizeZ, box);
|
||||
fillWithRandomizedBlocks(world, box, 4, 1, sizeZ, sizeX, sizeY - 1, sizeZ, false, rand, ConcreteBricks);
|
||||
placeDoor(world, box, ModBlocks.door_metal, 3, 3, 1, sizeZ);
|
||||
//Left & Right Wall
|
||||
fillWithRandomizedBlocks(world, box, 1, 1, 2, 1, sizeY - 1, sizeZ - 1, false, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, sizeX, 1, 2, sizeX, sizeY - 1, sizeZ - 1, false, rand, ConcreteBricks);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.reinforced_glass, 0, 1, 2, 3, box);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.reinforced_glass, 0, sizeX, 2, 2, box);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.reinforced_glass, 0, sizeX, 2, 4, box);
|
||||
//Ceiling
|
||||
fillWithBlocks(world, box, 3, sizeY - 1, 1, 4, sizeY - 1, 1, ModBlocks.concrete_smooth, Blocks.air, false);
|
||||
fillWithBlocks(world, box, 2, sizeY - 1, 2, sizeX - 1, sizeY - 1, sizeZ - 1, ModBlocks.concrete_smooth, Blocks.air, false);
|
||||
|
||||
fillWithAir(world, box, 2, 1, 2, sizeX - 1, 2, sizeZ - 1);
|
||||
|
||||
//Decoration
|
||||
int southMeta = getDecoMeta(2);
|
||||
int northMeta = getDecoMeta(3); //all of these deco blocks are so inconsistent about what their directions actually are
|
||||
int eastMeta = getDecoMeta(4);
|
||||
fillWithMetadataBlocks(world, box, 2, 1, 2, 5, 1, 2, ModBlocks.steel_grate, 7, null, 0, false); //null should be okay here
|
||||
fillWithBlocks(world, box, 3, 1, 1, 4, 1, 1, ModBlocks.deco_tungsten, null, false);
|
||||
fillWithMetadataBlocks(world, box, 3, 2, 1, 4, 2, 1, ModBlocks.tape_recorder, northMeta, null, 0, false);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.radiorec, southMeta, 2, 2, 2, box);
|
||||
placeRandomBobble(world, box, rand, sizeX - 1, 2, 2);
|
||||
fillWithMetadataBlocks(world, box, sizeX - 1, 1, 3, sizeX - 1, 2, 3, ModBlocks.tape_recorder, eastMeta, null, 0, false);
|
||||
//OutsideDeco
|
||||
fillWithMetadataBlocks(world, box, 0, 1, 2, 0, 2, 2, ModBlocks.steel_poles, eastMeta, null, 0, false);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.pole_satellite_receiver, eastMeta, 0, sizeY - 1, 2, box);
|
||||
fillWithBlocks(world, box, 0, sizeY, 2, sizeX - 1, sizeY, 2, ModBlocks.steel_roof, null, false);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.steel_roof, 0, sizeX - 1, sizeY, 3, box);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -10,11 +10,17 @@ import com.hbm.world.worldgen.components.Component.ConcreteBricks;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraft.world.gen.structure.StructureBoundingBox;
|
||||
|
||||
//Oh my fucking god TM
|
||||
public class OfficeFeatures {
|
||||
|
||||
public static void registerComponents() {
|
||||
MapGenStructureIO.func_143031_a(LargeOffice.class, "NTMLargeOffice");
|
||||
MapGenStructureIO.func_143031_a(LargeOfficeCorner.class, "NTMLargeOfficeCorner");
|
||||
}
|
||||
|
||||
public static class LargeOffice extends Component {
|
||||
|
||||
private static ConcreteBricks ConcreteBricks = new ConcreteBricks();
|
||||
@ -50,7 +56,7 @@ public class OfficeFeatures {
|
||||
public boolean addComponentParts(World world, Random rand, StructureBoundingBox box) {
|
||||
|
||||
if(!this.setAverageHeight(world, box, this.boundingBox.minY)) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0, -1, 0);
|
||||
@ -210,7 +216,7 @@ public class OfficeFeatures {
|
||||
|
||||
//TODO: add book with funny lore to safe, add cobwebs too
|
||||
//0b00/0 West, 0b01/1 East, 0b10/2 North, 0b11/3 South, 0b100/4 West UD, 0b101 East UD, 0b110 North UD, 0b111 South UD
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -234,7 +240,7 @@ public class OfficeFeatures {
|
||||
public boolean addComponentParts(World world, Random rand, StructureBoundingBox box) {
|
||||
|
||||
if(!this.setAverageHeight(world, box, this.boundingBox.minY)) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
this.boundingBox.offset(0, -1, 0);
|
||||
@ -539,7 +545,7 @@ public class OfficeFeatures {
|
||||
|
||||
//this hurt my soul
|
||||
|
||||
return false; //TODO: whoopsy! this should probably be true, with the failed ones being false! not necessary here since the structures always generate in one chunk
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,10 +6,18 @@ import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
import net.minecraft.world.gen.structure.StructureBoundingBox;
|
||||
|
||||
public class RuinFeatures {
|
||||
|
||||
public static void registerComponents() {
|
||||
MapGenStructureIO.func_143031_a(NTMRuin1.class, "NTMRuin1");
|
||||
MapGenStructureIO.func_143031_a(NTMRuin2.class, "NTMRuin2");
|
||||
MapGenStructureIO.func_143031_a(NTMRuin3.class, "NTMRuin3");
|
||||
MapGenStructureIO.func_143031_a(NTMRuin4.class, "NTMRuin4");
|
||||
}
|
||||
|
||||
public static class NTMRuin1 extends Component {
|
||||
|
||||
private static ConcreteBricks RandomConcreteBricks = new ConcreteBricks();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user