mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
commit
ab4c14e3f4
@ -49,7 +49,7 @@ public class ItemStructurePattern extends ItemStructureTool {
|
||||
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");
|
||||
message += "placeBlockAtCurrentPosition(world, " + b.getUnlocalizedName() + ", " + meta + ", " + ix + ", " + iy + ", " + iz + ", box);\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,6 +137,9 @@ public abstract class ItemStructureTool extends Item implements ILookOverlay {
|
||||
}
|
||||
}
|
||||
|
||||
if(Minecraft.getMinecraft().thePlayer.isSneaking())
|
||||
text.add("B: " + world.getBlock(x, y, z).getUnlocalizedName() + ", M: " + world.getBlockMetadata(x, y, z));
|
||||
|
||||
ILookOverlay.printGeneric(event, this.getItemStackDisplayName(stack), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +34,14 @@ public class ItemWandD extends Item {
|
||||
|
||||
//PollutionHandler.incrementPollution(world, pos.blockX, pos.blockY, pos.blockZ, PollutionType.SOOT, 15);
|
||||
|
||||
/*int i = pos.blockX >> 4;
|
||||
int j = pos.blockZ >> 4;
|
||||
|
||||
i = (i << 4) + 8;
|
||||
j = (j << 4) + 8;
|
||||
Component comp = new RuralHouse1(world.rand, i, j);
|
||||
comp.addComponentParts(world, world.rand, new StructureBoundingBox(i, j, i + 32, j + 32));*/
|
||||
|
||||
/*TimeAnalyzer.startCount("setBlock");
|
||||
world.setBlock(pos.blockX, pos.blockY, pos.blockZ, Blocks.dirt);
|
||||
TimeAnalyzer.startEndCount("getBlock");
|
||||
|
||||
@ -17,6 +17,7 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
|
||||
public class HbmChestContents {
|
||||
|
||||
@ -419,21 +420,43 @@ public class HbmChestContents {
|
||||
public static ItemStack generateOfficeBook(Random rand) { //TODO rework this lore in general
|
||||
String key;
|
||||
int pages;
|
||||
switch(rand.nextInt(10)) {
|
||||
case 0: key = "resignation_note"; pages = 3; break;
|
||||
case 1: key = "memo_stocks"; pages = 1; break;
|
||||
case 2: key = "memo_schrab_gsa"; pages = 2; break;
|
||||
case 3: key = "memo_schrab_rd"; pages = 4; break;
|
||||
case 4: key = "memo_schrab_nuke"; pages = 3; break;
|
||||
case 5: key = "bf_bomb_1"; pages = 4; break;
|
||||
case 6: key = "bf_bomb_2"; pages = 6; break;
|
||||
case 7: key = "bf_bomb_3"; pages = 6; break;
|
||||
case 8: key = "bf_bomb_4"; pages = 5; break;
|
||||
case 9: key = "bf_bomb_5"; pages = 9; break;
|
||||
switch(rand.nextInt(5)) {
|
||||
case 0:
|
||||
key = "resignation_note"; pages = 3; break;
|
||||
case 1:
|
||||
key = "memo_stocks"; pages = 1; break;
|
||||
case 2:
|
||||
key = "memo_schrab_gsa"; pages = 2; break;
|
||||
case 3:
|
||||
key = "memo_schrab_rd"; pages = 4; break;
|
||||
case 4:
|
||||
key = "memo_schrab_nuke"; pages = 3; break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
return ItemBookLore.createBook(key, pages, 0x6BC8FF, 0x0A0A0A);
|
||||
}
|
||||
|
||||
public static ItemStack generateLabBook(Random rand) {
|
||||
String key;
|
||||
int pages;
|
||||
|
||||
switch(rand.nextInt(5)) {
|
||||
case 0:
|
||||
key = "bf_bomb_1"; pages = 4; break;
|
||||
case 1:
|
||||
key = "bf_bomb_2"; pages = 6; break;
|
||||
case 2:
|
||||
key = "bf_bomb_3"; pages = 6; break;
|
||||
case 3:
|
||||
key = "bf_bomb_4"; pages = 5; break;
|
||||
case 4:
|
||||
key = "bf_bomb_5"; pages = 9; break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
return ItemBookLore.createBook(key, pages, 0x1E1E1E, 0x46EA44);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,10 +3,10 @@ package com.hbm.lib;
|
||||
import com.hbm.world.gen.MapGenNTMFeatures;
|
||||
import com.hbm.world.gen.NTMWorldGenerator;
|
||||
import com.hbm.world.gen.component.BunkerComponents;
|
||||
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;
|
||||
import com.hbm.world.gen.component.BunkerComponents.BunkerStart;
|
||||
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
@ -19,6 +19,8 @@ public class HbmWorld {
|
||||
initWorldGen();
|
||||
}
|
||||
|
||||
public static NTMWorldGenerator worldGenerator;
|
||||
|
||||
public static void initWorldGen() {
|
||||
|
||||
//MapGenStructureIO.registerStructure(StructureStartTest.class, "HFR_STRUCTURE");
|
||||
@ -29,7 +31,7 @@ public class HbmWorld {
|
||||
|
||||
registerWorldGen(new HbmWorldGen(), 1);
|
||||
|
||||
NTMWorldGenerator worldGenerator = new NTMWorldGenerator();
|
||||
worldGenerator = new NTMWorldGenerator();
|
||||
registerWorldGen(worldGenerator, 1); //Ideally, move everything over from HbmWorldGen to NTMWorldGenerator
|
||||
MinecraftForge.EVENT_BUS.register(worldGenerator);
|
||||
//registerWorldGen(new WorldGenTest(), 1);
|
||||
|
||||
@ -101,23 +101,21 @@ public class LootGenerator {
|
||||
|
||||
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);
|
||||
boolean r = world.rand.nextBoolean();
|
||||
if(r)
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.gun_lever_action), 0.125, 0.025, 0.25);
|
||||
|
||||
if(!r || world.rand.nextBoolean())
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.wrench), -0.25, 0, -0.28125);
|
||||
|
||||
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);
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.plate_steel), -0.25, 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);
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(ModItems.wire_aluminium), 0.25, i * 0.03125, 0.1875);
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,4 +181,22 @@ public class LootGenerator {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void lootBookLore(World world, int x, int y, int z, ItemStack book) {
|
||||
|
||||
TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(x, y, z);
|
||||
|
||||
if(loot != null && loot.items.isEmpty()) {
|
||||
addItemWithDeviation(loot, world.rand, book, 0, 0, -0.25);
|
||||
|
||||
int count = world.rand.nextInt(3) + 2;
|
||||
for(int k = 0; k < count; k++)
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(Items.book), -0.25, k * 0.03125, 0.25);
|
||||
|
||||
count = world.rand.nextInt(2) + 1;
|
||||
for(int k = 0; k < count; k++)
|
||||
addItemWithDeviation(loot, world.rand, new ItemStack(Items.paper), 0.25, k * 0.03125, 0.125);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -8,9 +8,18 @@ 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.*;
|
||||
import com.hbm.world.gen.component.CivilianFeatures.NTMHouse1;
|
||||
import com.hbm.world.gen.component.CivilianFeatures.NTMHouse2;
|
||||
import com.hbm.world.gen.component.CivilianFeatures.NTMLab1;
|
||||
import com.hbm.world.gen.component.CivilianFeatures.NTMLab2;
|
||||
import com.hbm.world.gen.component.CivilianFeatures.NTMWorkshop1;
|
||||
import com.hbm.world.gen.component.CivilianFeatures.RuralHouse1;
|
||||
import com.hbm.world.gen.component.OfficeFeatures.LargeOffice;
|
||||
import com.hbm.world.gen.component.OfficeFeatures.LargeOfficeCorner;
|
||||
import com.hbm.world.gen.component.RuinFeatures.NTMRuin1;
|
||||
import com.hbm.world.gen.component.RuinFeatures.NTMRuin2;
|
||||
import com.hbm.world.gen.component.RuinFeatures.NTMRuin3;
|
||||
import com.hbm.world.gen.component.RuinFeatures.NTMRuin4;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
@ -103,8 +112,10 @@ public class MapGenNTMFeatures extends MapGenStructure {
|
||||
public Start(World world, Random rand, int chunkX, int chunkZ) {
|
||||
super(chunkX, chunkZ);
|
||||
|
||||
BiomeGenBase biome = world.getBiomeGenForCoords(chunkX * 16 + 8, chunkZ * 16 + 8); //Only gets the biome in the corner of the chunk.
|
||||
final int posY = 64; // Terrain *does not exist* at this stage - at least, for vanilla. Here it has to be called after, but better safe than sorry.
|
||||
int i = (chunkX << 4) + 8;
|
||||
int j = (chunkZ << 4) + 8;
|
||||
|
||||
BiomeGenBase biome = world.getBiomeGenForCoords(i, j); //Only gets the biome in the corner of the chunk.
|
||||
|
||||
/*
|
||||
* Probably want to use nextInt() to increase the structures of rarity here. As a fallback, you could have generic stone brick/useless block ruins that will always be chosen if the
|
||||
@ -112,56 +123,61 @@ public class MapGenNTMFeatures extends MapGenStructure {
|
||||
* Rainfall & Temperature Check
|
||||
*/
|
||||
//TODO: Do something about this so it's nice-looking and easily readable. Plus, test compatibility against mods like BoP
|
||||
|
||||
if(rand.nextInt(3) == 0) { //Empty Ruin Structures
|
||||
switch(rand.nextInt(4)) {
|
||||
case 0:
|
||||
NTMRuin1 ruin1 = new NTMRuin1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
NTMRuin1 ruin1 = new NTMRuin1(rand, i, j);
|
||||
this.components.add(ruin1);
|
||||
break;
|
||||
case 1:
|
||||
NTMRuin2 ruin2 = new NTMRuin2(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
NTMRuin2 ruin2 = new NTMRuin2(rand, i, j);
|
||||
this.components.add(ruin2);
|
||||
break;
|
||||
case 2:
|
||||
NTMRuin3 ruin3 = new NTMRuin3(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
NTMRuin3 ruin3 = new NTMRuin3(rand, i, j);
|
||||
this.components.add(ruin3);
|
||||
break;
|
||||
case 3:
|
||||
NTMRuin4 ruin4 = new NTMRuin4(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
NTMRuin4 ruin4 = new NTMRuin4(rand, i, j);
|
||||
this.components.add(ruin4);
|
||||
}
|
||||
|
||||
} else if(biome.temperature >= 1.0 && biome.rainfall == 0 && !(biome instanceof BiomeGenMesa)) { //Desert & Savannah
|
||||
if(rand.nextBoolean()) {
|
||||
NTMHouse1 house1 = new NTMHouse1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
NTMHouse1 house1 = new NTMHouse1(rand, i, j);
|
||||
this.components.add(house1);
|
||||
} else {
|
||||
NTMHouse2 house2 = new NTMHouse2(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
NTMHouse2 house2 = new NTMHouse2(rand, i, j);
|
||||
this.components.add(house2);
|
||||
}
|
||||
|
||||
} 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);
|
||||
NTMWorkshop1 workshop1 = new NTMWorkshop1(rand, i, j); //TODO replace this
|
||||
this.components.add(workshop1);
|
||||
} else { //Everything else
|
||||
switch(rand.nextInt(4)) {
|
||||
switch(rand.nextInt(6)) {
|
||||
case 0:
|
||||
NTMLab2 lab2 = new NTMLab2(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
NTMLab2 lab2 = new NTMLab2(rand, i, j); //and these, too
|
||||
this.components.add(lab2); break;
|
||||
case 1:
|
||||
NTMLab1 lab1 = new NTMLab1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
NTMLab1 lab1 = new NTMLab1(rand, i, j);
|
||||
this.components.add(lab1); break;
|
||||
case 2:
|
||||
LargeOffice office = new LargeOffice(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
LargeOffice office = new LargeOffice(rand, i, j);
|
||||
this.components.add(office); break;
|
||||
case 3:
|
||||
LargeOfficeCorner officeCorner = new LargeOfficeCorner(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
LargeOfficeCorner officeCorner = new LargeOfficeCorner(rand, i, j);
|
||||
this.components.add(officeCorner); break;
|
||||
case 4:
|
||||
case 5:
|
||||
RuralHouse1 ruralHouse = new RuralHouse1(rand, i, j);
|
||||
this.components.add(ruralHouse); break;
|
||||
}
|
||||
}
|
||||
|
||||
if(GeneralConfig.enableDebugMode) {
|
||||
System.out.print("[Debug] StructureStart at " + (chunkX * 16 + 8) + ", " + posY + ", " + (chunkZ * 16 + 8) + "\n[Debug] Components: ");
|
||||
System.out.print("[Debug] StructureStart at " + i + ", 64, " + j + "\n[Debug] Components: ");
|
||||
this.components.forEach((component) -> {
|
||||
System.out.print(MapGenStructureIO.func_143036_a((StructureComponent) component) + " ");
|
||||
});
|
||||
|
||||
@ -17,15 +17,15 @@ import static net.minecraftforge.event.terraingen.TerrainGen.*;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
|
||||
public class NTMWorldGenerator implements IWorldGenerator {
|
||||
|
||||
private MapGenNTMFeatures scatteredFeatureGenerator = new MapGenNTMFeatures();
|
||||
private MapGenNTMFeatures scatteredFeatureGen = new MapGenNTMFeatures();
|
||||
|
||||
private final Random rand = new Random(); //A central random, used to cleanly generate our stuff without affecting vanilla or modded seeds.
|
||||
|
||||
/** Inits all MapGen upon the loading of a new world. Hopefully clears out structureMaps and structureData when a different world is loaded. */
|
||||
@SubscribeEvent
|
||||
public void onLoad(WorldEvent.Load event) {
|
||||
scatteredFeatureGenerator = (MapGenNTMFeatures) getModdedMapGen(new MapGenNTMFeatures(), EventType.CUSTOM);
|
||||
scatteredFeatureGen = (MapGenNTMFeatures) getModdedMapGen(new MapGenNTMFeatures(), EventType.CUSTOM);
|
||||
|
||||
hasPopulationEvent = false;
|
||||
}
|
||||
|
||||
@ -65,8 +65,8 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
protected void generateOverworldStructures(World world, IChunkProvider chunkProvider, int chunkX, int chunkZ) {
|
||||
Block[] ablock = new Block[65536]; //ablock isn't actually used for anything in MapGenStructure
|
||||
|
||||
this.scatteredFeatureGenerator.func_151539_a(chunkProvider, world, chunkX, chunkZ, ablock);
|
||||
this.scatteredFeatureGenerator.generateStructuresInChunk(world, rand, chunkX, chunkZ);
|
||||
this.scatteredFeatureGen.func_151539_a(chunkProvider, world, chunkX, chunkZ, ablock);
|
||||
this.scatteredFeatureGen.generateStructuresInChunk(world, rand, chunkX, chunkZ);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -116,4 +116,13 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/** utility method, same as above but inclusive. useful for catch-alls, like the dirty glass structures have */
|
||||
public static boolean doesBiomeHaveTypes(BiomeGenBase biome, Type... types) {
|
||||
for(Type type : types) {
|
||||
if(isBiomeOfType(biome, type)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,6 @@ import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.tileentity.machine.TileEntityLockableBase;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockWeb;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@ -25,12 +24,7 @@ import net.minecraft.world.gen.structure.StructureComponent;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
abstract public class Component extends StructureComponent {
|
||||
/** The size of the bounding box for this feature in the X axis */
|
||||
protected int sizeX;
|
||||
/** The size of the bounding box for this feature in the Y axis */
|
||||
protected int sizeY;
|
||||
/** The size of the bounding box for this feature in the Z axis */
|
||||
protected int sizeZ;
|
||||
|
||||
/** Average height (Presumably stands for height position) */
|
||||
protected int hpos = -1;
|
||||
|
||||
@ -44,9 +38,6 @@ abstract public class Component extends StructureComponent {
|
||||
|
||||
protected Component(Random rand, int minX, int minY, int minZ, int maxX, int maxY, int maxZ ) {
|
||||
super(0);
|
||||
this.sizeX = maxX;
|
||||
this.sizeY = maxY;
|
||||
this.sizeZ = maxZ;
|
||||
this.coordBaseMode = rand.nextInt(4);
|
||||
|
||||
switch(this.coordBaseMode) {
|
||||
@ -70,17 +61,11 @@ abstract public class Component extends StructureComponent {
|
||||
|
||||
/** Set to NBT */
|
||||
protected void func_143012_a(NBTTagCompound nbt) {
|
||||
nbt.setInteger("Width", this.sizeX);
|
||||
nbt.setInteger("Height", this.sizeY);
|
||||
nbt.setInteger("Depth", this.sizeZ);
|
||||
nbt.setInteger("HPos", this.hpos);
|
||||
}
|
||||
|
||||
/** Get from NBT */
|
||||
protected void func_143011_b(NBTTagCompound nbt) {
|
||||
this.sizeX = nbt.getInteger("Width");
|
||||
this.sizeY = nbt.getInteger("Height");
|
||||
this.sizeZ = nbt.getInteger("Depth");
|
||||
this.hpos = nbt.getInteger("HPos");
|
||||
}
|
||||
|
||||
@ -210,7 +195,7 @@ abstract public class Component extends StructureComponent {
|
||||
metadata = metadata ^ 3;
|
||||
break;
|
||||
}
|
||||
|
||||
//genuinely like. why did i do that
|
||||
return metadata << 2; //To accommodate for BlockDecoModel's shift in the rotation bits; otherwise, simply bit-shift right and or any non-rotation meta after
|
||||
}
|
||||
|
||||
@ -377,6 +362,7 @@ abstract public class Component extends StructureComponent {
|
||||
return generateInvContents(world, box, rand, block, 0, featureX, featureY, featureZ, content, amount);
|
||||
}
|
||||
|
||||
//TODO: explore min / max item generations: e.g., between 3 and 5 separate items are generated
|
||||
protected boolean generateInvContents(World world, StructureBoundingBox box, Random rand, Block block, int meta, int featureX, int featureY, int featureZ, WeightedRandomChestContent[] content, int amount) {
|
||||
int posX = this.getXWithOffset(featureX, featureZ);
|
||||
int posY = this.getYWithOffset(featureY);
|
||||
@ -520,47 +506,11 @@ abstract public class Component extends StructureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
/** Fills an area with cobwebs. Cobwebs will concentrate on corners and surfaces without floating cobwebs. */
|
||||
protected void fillWithCobwebs(World world, StructureBoundingBox box, Random rand, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) {
|
||||
|
||||
if(getYWithOffset(minY) < box.minY || getYWithOffset(maxY) > box.maxY)
|
||||
return;
|
||||
|
||||
for(int x = minX; x <= maxX; x++) {
|
||||
|
||||
for(int z = minZ; z <= maxZ; z++) {
|
||||
int posX = getXWithOffset(x, z);
|
||||
int posZ = getZWithOffset(x, z);
|
||||
|
||||
if(posX >= box.minX && posX <= box.maxX && posZ >= box.minZ && posZ <= box.maxZ) {
|
||||
for(int y = minY; y <= maxY; y++) {
|
||||
int posY = getYWithOffset(y);
|
||||
Block genTarget = world.getBlock(posX, posY, posZ);
|
||||
|
||||
if(!genTarget.isAir(world, posX, posY, posZ))
|
||||
continue;
|
||||
|
||||
int validNeighbors = 0;
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
Block neighbor = world.getBlock(posX + dir.offsetX, posY + dir.offsetY, posZ + dir.offsetZ);
|
||||
|
||||
if(neighbor.getMaterial().blocksMovement() || neighbor instanceof BlockWeb)
|
||||
validNeighbors++;
|
||||
}
|
||||
|
||||
if(validNeighbors > 5 || (validNeighbors > 1 && rand.nextInt(6 - validNeighbors) == 0))
|
||||
world.setBlock(posX, posY, posZ, Blocks.web);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** getXWithOffset & getZWithOffset Methods that are actually fixed **/
|
||||
//Turns out, this entire time every single minecraft structure is mirrored instead of rotated when facing East and North
|
||||
//Also turns out, it's a scarily easy fix that they somehow didn't see *entirely*
|
||||
@Override
|
||||
protected int getXWithOffset(int x, int z) {
|
||||
public int getXWithOffset(int x, int z) {
|
||||
switch(this.coordBaseMode) {
|
||||
case 0:
|
||||
return this.boundingBox.minX + x;
|
||||
@ -576,7 +526,7 @@ abstract public class Component extends StructureComponent {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getZWithOffset(int x, int z) {
|
||||
public int getZWithOffset(int x, int z) {
|
||||
switch(this.coordBaseMode) {
|
||||
case 0:
|
||||
return this.boundingBox.minZ + z;
|
||||
@ -739,7 +689,7 @@ abstract public class Component extends StructureComponent {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO replace the shitty block selector with something else. probably a lambda that returns a metablock for convenience
|
||||
protected void fillWithRandomizedBlocks(World world, StructureBoundingBox box, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, Random rand, BlockSelector selector) { //so i don't have to replace shit
|
||||
|
||||
if(getYWithOffset(minY) < box.minY || getYWithOffset(maxY) > box.maxY)
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.HbmChestContents;
|
||||
import com.hbm.util.LootGenerator;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
@ -29,8 +30,8 @@ public class OfficeFeatures {
|
||||
super();
|
||||
}
|
||||
|
||||
public LargeOffice(Random rand, int minX, int minY, int minZ) {
|
||||
super(rand, minX, minY, minZ, 14, 5, 12);
|
||||
public LargeOffice(Random rand, int minX, int minZ) {
|
||||
super(rand, minX, 64, minZ, 14, 5, 12);
|
||||
this.hasPlacedLoot[0] = false;
|
||||
this.hasPlacedLoot[1] = false;
|
||||
}
|
||||
@ -59,60 +60,60 @@ public class OfficeFeatures {
|
||||
|
||||
this.boundingBox.offset(0, -1, 0);
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 5, 0, sizeX, 1, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 2, sizeX, 7, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 8, 8, sizeZ, 0, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 9, 8, sizeX, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 5, 0, 14, 1, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 2, 14, 7, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 8, 8, 12, 0, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 9, 8, 14, 12, -1, box);
|
||||
|
||||
fillWithAir(world, box, 1, 1, 3, 4, 3, 6);
|
||||
fillWithAir(world, box, 6, 1, 1, sizeX - 1, 3, 6);
|
||||
fillWithAir(world, box, 10, 1, 7, sizeX - 1, 3, sizeZ - 1);
|
||||
fillWithAir(world, box, 6, 1, 1, 14 - 1, 3, 6);
|
||||
fillWithAir(world, box, 10, 1, 7, 14 - 1, 3, 12 - 1);
|
||||
|
||||
//Pillars
|
||||
//Back
|
||||
fillWithBlocks(world, box, 0, 0, 2, 0, 4, 2, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 5, 0, 0, 5, 4, 0, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, sizeX, 0, 0, sizeX, 4, 0, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 14, 0, 0, 14, 4, 0, ModBlocks.concrete_pillar);
|
||||
//Front
|
||||
fillWithBlocks(world, box, 0, 0, 7, 0, 3, 7, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 0, 0, sizeZ, 0, 3, sizeZ, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 3, 0, sizeZ, 3, 3, sizeZ, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 6, 0, sizeZ, 6, 3, sizeZ, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 9, 0, sizeZ, 9, 3, sizeZ, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 0, 0, 12, 0, 3, 12, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 3, 0, 12, 3, 3, 12, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 6, 0, 12, 6, 3, 12, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 9, 0, 12, 9, 3, 12, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 9, 0, 7, 9, 3, 7, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, sizeX, 0, sizeZ, sizeX, 4, sizeZ, ModBlocks.concrete_pillar);
|
||||
fillWithBlocks(world, box, 14, 0, 12, 14, 4, 12, ModBlocks.concrete_pillar);
|
||||
|
||||
//Walls
|
||||
//Back
|
||||
fillWithRandomizedBlocks(world, box, 1, 0, 2, 5, 4, 2, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 5, 0, 1, 5, 4, 1, rand, ConcreteBricks);
|
||||
|
||||
fillWithRandomizedBlocks(world, box, 6, 0, 0, sizeX - 1, 1, 0, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 6, 0, 0, 14 - 1, 1, 0, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 6, 2, 0, 6, 2, 0, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 9, 2, 0, 10, 2, 0, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, sizeX - 1, 2, 0, sizeX - 1, 2, 0, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 6, 3, 0, sizeX - 1, 4, 0, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 14 - 1, 2, 0, 14 - 1, 2, 0, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 6, 3, 0, 14 - 1, 4, 0, rand, ConcreteBricks);
|
||||
//Right
|
||||
fillWithRandomizedBlocks(world, box, sizeX, 0, 1, sizeX, 1, sizeZ - 1, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, sizeX, 2, 1, sizeX, 2, 2, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, sizeX, 2, 5, sizeX, 2, 7, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, sizeX, 2, sizeZ - 2, sizeX, 2, sizeZ - 1, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, sizeX, 3, 1, sizeX, 4, sizeZ - 1, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 14, 0, 1, 14, 1, 12 - 1, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 14, 2, 1, 14, 2, 2, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 14, 2, 5, 14, 2, 7, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 14, 2, 12 - 2, 14, 2, 12 - 1, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 14, 3, 1, 14, 4, 12 - 1, rand, ConcreteBricks);
|
||||
//Front
|
||||
fillWithRandomizedBlocks(world, box, 0, 4, sizeZ, sizeX - 1, 4, sizeZ, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 10, 0, sizeZ, sizeX - 1, 1, sizeZ, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 10, 2, sizeZ, 10, 2, sizeZ, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, sizeX - 1, 2, sizeZ, sizeX - 1, 2, sizeZ, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 10, 3, sizeZ, sizeX - 1, 3, sizeZ, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 0, 4, 12, 14 - 1, 4, 12, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 10, 0, 12, 14 - 1, 1, 12, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 10, 2, 12, 10, 2, 12, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 14 - 1, 2, 12, 14 - 1, 2, 12, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 10, 3, 12, 14 - 1, 3, 12, rand, ConcreteBricks);
|
||||
|
||||
fillWithRandomizedBlocks(world, box, 9, 0, 8, 9, 3, sizeZ - 1, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 9, 0, 8, 9, 3, 12 - 1, rand, ConcreteBricks);
|
||||
|
||||
fillWithRandomizedBlocks(world, box, 1, 0, 7, 8, 0, 7, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 1, 1, 7, 1, 2, 7, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 4, 1, 7, 8, 3, 7, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 1, 3, 7, 3, 3, 7, rand, ConcreteBricks);
|
||||
//Left
|
||||
fillWithRandomizedBlocks(world, box, 0, 4, 3, 0, 4, sizeZ - 1, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 0, 4, 3, 0, 4, 12 - 1, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 0, 0, 3, 0, 1, 6, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 0, 2, 3, 0, 3, 3, rand, ConcreteBricks);
|
||||
fillWithRandomizedBlocks(world, box, 0, 2, 6, 0, 3, 6, rand, ConcreteBricks);
|
||||
@ -121,21 +122,21 @@ public class OfficeFeatures {
|
||||
fillWithRandomizedBlocks(world, box, 5, 3, 6, 5, 3, 6, rand, ConcreteBricks);
|
||||
|
||||
//Trim
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 0, sizeY, 2, 5, sizeY, 2, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 5, sizeY, 1, 5, sizeY, 1, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 5, sizeY, 0, sizeX, sizeY, 0, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, sizeX, sizeY, 1, sizeX, sizeY, sizeZ, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 0, sizeY, sizeZ, sizeX - 1, sizeY, sizeZ, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 0, sizeY, 3, 0, sizeY, sizeZ - 1, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 0, 5, 2, 5, 5, 2, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 5, 5, 1, 5, 5, 1, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 5, 5, 0, 14, 5, 0, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 14, 5, 1, 14, 5, 12, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 0, 5, 12, 14 - 1, 5, 12, Blocks.stone_slab);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.85F, 0, 5, 3, 0, 5, 12 - 1, Blocks.stone_slab);
|
||||
|
||||
//Floor
|
||||
fillWithMetadataBlocks(world, box, 1, 0, 3, 4, 0, 6, Blocks.wool, 13); //Green Wool
|
||||
fillWithBlocks(world, box, 5, 0, 3, 5, 0, 6, ModBlocks.brick_light);
|
||||
fillWithBlocks(world, box, 6, 0, 1, sizeX - 1, 0, 6, ModBlocks.brick_light);
|
||||
fillWithBlocks(world, box, 10, 0, 7, sizeX - 1, 0, sizeZ - 1, ModBlocks.brick_light);
|
||||
fillWithBlocks(world, box, 6, 0, 1, 14 - 1, 0, 6, ModBlocks.brick_light);
|
||||
fillWithBlocks(world, box, 10, 0, 7, 14 - 1, 0, 12 - 1, ModBlocks.brick_light);
|
||||
//Ceiling
|
||||
fillWithBlocks(world, box, 6, 4, 1, sizeX - 1, 4, 2, ModBlocks.brick_light);
|
||||
fillWithBlocks(world, box, 1, 4, 3, sizeX - 1, 4, sizeZ - 1, ModBlocks.brick_light);
|
||||
fillWithBlocks(world, box, 6, 4, 1, 14 - 1, 4, 2, ModBlocks.brick_light);
|
||||
fillWithBlocks(world, box, 1, 4, 3, 14 - 1, 4, 12 - 1, ModBlocks.brick_light);
|
||||
|
||||
//Decorations
|
||||
//Carpet
|
||||
@ -143,10 +144,10 @@ public class OfficeFeatures {
|
||||
//Windows
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, 0, 2, 4, 0, 3, 5, Blocks.glass_pane);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, 7, 2, 0, 8, 2, 0, Blocks.glass_pane);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, sizeX - 3, 2, 0, sizeX - 2, 2, 0, Blocks.glass_pane);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, sizeX, 2, 3, sizeX, 2, 4, Blocks.glass_pane);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, sizeX, 2, 8, sizeX, 2, 9, Blocks.glass_pane);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, sizeX - 3, 2, sizeZ, sizeX - 2, 2, sizeZ, Blocks.glass_pane);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, 14 - 3, 2, 0, 14 - 2, 2, 0, Blocks.glass_pane);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, 14, 2, 3, 14, 2, 4, Blocks.glass_pane);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, 14, 2, 8, 14, 2, 9, Blocks.glass_pane);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.75F, 14 - 3, 2, 12, 14 - 2, 2, 12, Blocks.glass_pane);
|
||||
//Fuwnituwe >w<
|
||||
int stairMetaE = getStairMeta(1); //East
|
||||
int stairMetaN = getStairMeta(2); //*SHOULD* be north
|
||||
@ -170,35 +171,35 @@ public class OfficeFeatures {
|
||||
placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 8, 2, 4, box);
|
||||
//Desk 3 :3
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaEU, 10, 1, 1, box);
|
||||
fillWithMetadataBlocks(world, box, 11, 1, 1, sizeX - 1, 1, 1, Blocks.spruce_stairs, stairMetaSU);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaNU, sizeX - 1, 1, 2, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaSU, sizeX - 1, 1, 3, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaWU, sizeX - 1, 1, 4, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaNU, sizeX - 1, 1, 5, box);
|
||||
fillWithMetadataBlocks(world, box, 11, 1, 1, 14 - 1, 1, 1, Blocks.spruce_stairs, stairMetaSU);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaNU, 14 - 1, 1, 2, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaSU, 14 - 1, 1, 3, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaWU, 14 - 1, 1, 4, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaNU, 14 - 1, 1, 5, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaN, 11, 1, 2, box); //Chaiw ;3
|
||||
placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaE, sizeX - 2, 1, 4, box); //Chaiw :333
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(1), sizeX - 3, 2, 1, box); //South-facing Computer :3
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(2), sizeX - 1, 2, 5, box); //West-facing Computer ^w^
|
||||
placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, sizeX - 1, 2, 3, box);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.radiorec, getDecoMeta(5), sizeX - 1, 2, 2, box); //Wadio
|
||||
placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaE, 14 - 2, 1, 4, box); //Chaiw :333
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(1), 14 - 3, 2, 1, box); //South-facing Computer :3
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(2), 14 - 1, 2, 5, box); //West-facing Computer ^w^
|
||||
placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 14 - 1, 2, 3, box);
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.radiorec, getDecoMeta(5), 14 - 1, 2, 2, box); //Wadio
|
||||
//Desk 4 DX
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaEU, 10, 1, 8, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaWU, 11, 1, 8, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaN, 10, 1, 9, box); //Chaiw ;3
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(1), 10, 2, 8, box); //South-facing Computer :33
|
||||
//Desk 5 :333
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaSU, sizeX - 1, 1, sizeZ - 3, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaWU, sizeX - 1, 1, sizeZ - 2, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaNU, sizeX - 1, 1, sizeZ - 1, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaE, sizeX - 3, 1, sizeZ - 1, box); //UwU... Chaiw!!!! :333 I wove chaiws XD :333 OwO what's this?? chaiw???? :333333333333333333
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(2), sizeX - 1, 2, sizeZ - 1, box); //West-facing Computer >w<
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaSU, 14 - 1, 1, 12 - 3, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaWU, 14 - 1, 1, 12 - 2, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaNU, 14 - 1, 1, 12 - 1, box);
|
||||
placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaE, 14 - 3, 1, 12 - 1, box); //UwU... Chaiw!!!! :333 I wove chaiws XD :333 OwO what's this?? chaiw???? :333333333333333333
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, getDecoModelMeta(2), 14 - 1, 2, 12 - 1, box); //West-facing Computer >w<
|
||||
//Cobwebs pwobabwy
|
||||
//Maybe make a method for this eventually?
|
||||
//Something where the tops of ceilings + empty corners along walls get most cobwebs,
|
||||
//with no cobwebs hanging midair + it not being performance intensive
|
||||
randomlyFillWithBlocks(world, box, rand, 0.25F, 1, 3, 3, 4, 3, 6, Blocks.web);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.25F, 6, 3, 1, sizeX - 1, 3, 6, Blocks.web);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.25F, 10, 3, 7, sizeX - 1, 3, sizeZ - 1, Blocks.web);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.25F, 6, 3, 1, 14 - 1, 3, 6, Blocks.web);
|
||||
randomlyFillWithBlocks(world, box, rand, 0.25F, 10, 3, 7, 14 - 1, 3, 12 - 1, Blocks.web);
|
||||
//Doors
|
||||
placeDoor(world, box, ModBlocks.door_office, 3, false, rand.nextBoolean(), 2, 1, 7);
|
||||
placeDoor(world, box, ModBlocks.door_office, 3, true, rand.nextBoolean(), 3, 1, 7);
|
||||
@ -206,7 +207,7 @@ public class OfficeFeatures {
|
||||
|
||||
//Woot
|
||||
if(!this.hasPlacedLoot[0])
|
||||
this.hasPlacedLoot[0] = generateInvContents(world, box, rand, ModBlocks.filing_cabinet, getDecoModelMeta(0), sizeX - 4, 1, sizeZ - 1, HbmChestContents.officeTrash, 8);
|
||||
this.hasPlacedLoot[0] = generateInvContents(world, box, rand, ModBlocks.filing_cabinet, getDecoModelMeta(0), 14 - 4, 1, 12 - 1, HbmChestContents.officeTrash, 8);
|
||||
if(!this.hasPlacedLoot[1]) {
|
||||
this.hasPlacedLoot[1] = generateLockableContents(world, box, rand, ModBlocks.safe, getDecoMeta(3), 6, 1, 1, HbmChestContents.machineParts, 10, 0.5D);
|
||||
if(rand.nextInt(2) == 0)
|
||||
@ -230,8 +231,8 @@ public class OfficeFeatures {
|
||||
super();
|
||||
}
|
||||
|
||||
public LargeOfficeCorner(Random rand, int minX, int minY, int minZ) {
|
||||
super(rand, minX, minY, minZ, 11, 15, 14);
|
||||
public LargeOfficeCorner(Random rand, int minX, int minZ) {
|
||||
super(rand, minX, 64, minZ, 11, 15, 14);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -545,7 +546,6 @@ public class OfficeFeatures {
|
||||
LootGenerator.lootCapStash(world, this.getXWithOffset(6, 11), this.getYWithOffset(13), this.getZWithOffset(6, 11));
|
||||
placeBlockAtCurrentPosition(world, ModBlocks.deco_loot, 0, 1, 10, 11, box);
|
||||
LootGenerator.lootMedicine(world, this.getXWithOffset(1, 11), this.getYWithOffset(10), this.getZWithOffset(1, 11));
|
||||
|
||||
//this hurt my soul
|
||||
|
||||
return true;
|
||||
|
||||
@ -26,8 +26,8 @@ public class RuinFeatures {
|
||||
super();
|
||||
}
|
||||
|
||||
public NTMRuin1(Random rand, int minX, int minY, int minZ) {
|
||||
super(rand, minX, minY, minZ, 8, 6, 10);
|
||||
public NTMRuin1(Random rand, int minX, int minZ) {
|
||||
super(rand, minX, 64, minZ, 8, 6, 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,52 +39,52 @@ public class RuinFeatures {
|
||||
}
|
||||
//System.out.println("" + this.boundingBox.minX + ", " + this.boundingBox.minY + ", " + this.boundingBox.minZ);
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 0, sizeX, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 0, 8, 10, -1, box);
|
||||
|
||||
int pillarMetaWE = this.getPillarMeta(4);
|
||||
int pillarMetaNS = this.getPillarMeta(8);
|
||||
|
||||
this.fillWithBlocks(world, box, 0, 0, 0, 0, sizeY, 0, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall
|
||||
this.fillWithBlocks(world, box, 0, 0, 0, 0, 6, 0, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall
|
||||
this.fillWithMetadataBlocks(world, box, 1, 3, 0, 3, 3, 0, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false);
|
||||
this.fillWithBlocks(world, box, 4, 0, 0, 4, sizeY - 1, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithMetadataBlocks(world, box, 5, 3, 0, sizeX - 1, 3, 0, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false);
|
||||
this.fillWithBlocks(world, box, sizeX, 0, 0, sizeX, sizeY - 1, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithBlocks(world, box, 4, 0, 0, 4, 6 - 1, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithMetadataBlocks(world, box, 5, 3, 0, 8 - 1, 3, 0, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false);
|
||||
this.fillWithBlocks(world, box, 8, 0, 0, 8, 6 - 1, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, 0, 3, 0, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 0, 0, sizeX - 1, 0, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 0, 0, 8 - 1, 0, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 1, 0, 1, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 3, 1, 0, 3, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 1, 0, 5, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX - 1, 1, 0, sizeX - 1, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8 - 1, 1, 0, 8 - 1, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 4, 0, 3, 4, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 4, 0, sizeX - 1, 4, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, 0, 3, 1, 0, 3, sizeZ - 1, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false); //Left Wall
|
||||
this.fillWithBlocks(world, box, 0, 0, sizeZ, 0, sizeY - 1, sizeZ, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, 1, 0, 0, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 4, 0, 8 - 1, 4, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, 0, 3, 1, 0, 3, 10 - 1, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false); //Left Wall
|
||||
this.fillWithBlocks(world, box, 0, 0, 10, 0, 6 - 1, 10, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, 1, 0, 0, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, 1, 0, 2, 2, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, 4, 0, 2, 6, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, sizeZ - 2, 0, 2, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, 10 - 2, 0, 2, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 4, 1, 0, 4, 5, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 5, 1, 0, 5, 2, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 4, sizeZ - 2, 0, 4, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, 1, 3, sizeZ, 3, 3, sizeZ, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false); //Front Wall
|
||||
this.fillWithBlocks(world, box, 4, 0, sizeZ, 4, sizeY - 2, sizeZ, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithMetadataBlocks(world, box, 5, 3, sizeZ, sizeX - 1, 3, sizeZ, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false);
|
||||
this.fillWithBlocks(world, box, sizeX, 0, sizeZ, sizeX, sizeY - 2, sizeZ, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, sizeZ, 3, 0, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 0, sizeZ, sizeX - 1, 0, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 1, sizeZ, 1, 2, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 3, 1, sizeZ, 3, 2, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 1, sizeZ, 5, 2, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX - 1, 1, sizeZ, sizeX - 1, 2, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, sizeX, 3, 1, sizeX, 3, 2, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false); //Right Wall
|
||||
this.fillWithMetadataBlocks(world, box, sizeX, 3, sizeZ - 1, sizeX, 3, sizeZ - 1, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 0, 1, sizeX, 0, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 1, 1, sizeX, 2, 2, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 0, 6, sizeX, 0, 6, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 0, sizeZ - 2, sizeX, 1, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 2, sizeZ - 1, sizeX, 2, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 4, 10 - 2, 0, 4, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, 1, 3, 10, 3, 3, 10, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false); //Front Wall
|
||||
this.fillWithBlocks(world, box, 4, 0, 10, 4, 6 - 2, 10, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithMetadataBlocks(world, box, 5, 3, 10, 8 - 1, 3, 10, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false);
|
||||
this.fillWithBlocks(world, box, 8, 0, 10, 8, 6 - 2, 10, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, 10, 3, 0, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 0, 10, 8 - 1, 0, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 1, 10, 1, 2, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 3, 1, 10, 3, 2, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 1, 10, 5, 2, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8 - 1, 1, 10, 8 - 1, 2, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, 8, 3, 1, 8, 3, 2, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false); //Right Wall
|
||||
this.fillWithMetadataBlocks(world, box, 8, 3, 10 - 1, 8, 3, 10 - 1, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 8, 0, 1, 8, 0, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8, 1, 1, 8, 2, 2, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8, 0, 6, 8, 0, 6, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8, 0, 10 - 2, 8, 1, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8, 2, 10 - 1, 8, 2, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.25F, 1, 0, 1, sizeX - 1, 0, sizeZ - 1, Blocks.gravel, Blocks.air, false);
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.25F, 1, 0, 1, 8 - 1, 0, 10 - 1, Blocks.gravel, Blocks.air, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -98,8 +98,8 @@ public class RuinFeatures {
|
||||
super();
|
||||
}
|
||||
|
||||
public NTMRuin2(Random rand, int minX, int minY, int minZ) {
|
||||
super(rand, minX, minY, minZ, 7, 5, 10);
|
||||
public NTMRuin2(Random rand, int minX, int minZ) {
|
||||
super(rand, minX, 64, minZ, 7, 5, 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -111,43 +111,43 @@ public class RuinFeatures {
|
||||
}
|
||||
//System.out.println("" + this.boundingBox.minX + ", " + this.boundingBox.minY + ", " + this.boundingBox.minZ);
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 0, sizeX, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 0, 7, 10, -1, box);
|
||||
|
||||
int pillarMetaWE = this.getPillarMeta(4);
|
||||
int pillarMetaNS = this.getPillarMeta(8);
|
||||
|
||||
this.fillWithBlocks(world, box, 0, 0, 0, 0, 3, 0, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall
|
||||
this.fillWithMetadataBlocks(world, box, 1, 3, 0, sizeX - 1, 3, 0, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false);
|
||||
this.fillWithBlocks(world, box, sizeX, 0, 0, sizeX, sizeY, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, 0, sizeX - 1, 0, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, 1, 3, 0, 7 - 1, 3, 0, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false);
|
||||
this.fillWithBlocks(world, box, 7, 0, 0, 7, 5, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, 0, 7 - 1, 0, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 1, 0, 1, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 3, 1, 0, 4, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX - 1, 1, 0, sizeX - 1, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 3, 4, 0, sizeX - 1, 4, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX - 1, sizeY, 0, sizeX - 1, sizeY, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 7 - 1, 1, 0, 7 - 1, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 3, 4, 0, 7 - 1, 4, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 7 - 1, 5, 0, 7 - 1, 5, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, 0, 3, 1, 0, 3, 4, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false); //Left Wall
|
||||
this.fillWithBlocks(world, box, 0, 0, 5, 0, 0, 5, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithBlocks(world, box, 0, 0, sizeZ, 0, 2, sizeZ, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithBlocks(world, box, 0, 0, 10, 0, 2, 10, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, 1, 0, 2, 3, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, sizeZ - 3, 0, 0, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, sizeZ - 1, 0, 1, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, sizeX - 1, 3, sizeZ, sizeX - 1, 3, sizeZ, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false); //Front Wall
|
||||
this.fillWithBlocks(world, box, sizeX, 0, sizeZ, sizeX, 3, sizeZ, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, sizeZ, sizeX - 1, 0, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 1, sizeZ, 1, 2, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX - 1, 1, sizeZ, sizeX - 1, 2, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, sizeX, 3, 1, sizeX, 3, 4, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false); //Right Wall
|
||||
this.fillWithBlocks(world, box, sizeX, 0, 5, sizeX, 4, 5, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithMetadataBlocks(world, box, sizeX, 3, sizeZ - 2, sizeX, 3, sizeZ - 1, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 0, 1, sizeX, 0, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 1, 1, sizeX, 2, 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 1, 3, sizeX, 2, 3, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 1, 4, sizeX, 1, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 0, 6, sizeX, 0, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 1, 6, sizeX, 1, 7, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 1, sizeZ - 1, sizeX, 2, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, 10 - 3, 0, 0, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, 10 - 1, 0, 1, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, 7 - 1, 3, 10, 7 - 1, 3, 10, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false); //Front Wall
|
||||
this.fillWithBlocks(world, box, 7, 0, 10, 7, 3, 10, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, 10, 7 - 1, 0, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 1, 10, 1, 2, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 7 - 1, 1, 10, 7 - 1, 2, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithMetadataBlocks(world, box, 7, 3, 1, 7, 3, 4, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false); //Right Wall
|
||||
this.fillWithBlocks(world, box, 7, 0, 5, 7, 4, 5, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithMetadataBlocks(world, box, 7, 3, 10 - 2, 7, 3, 10 - 1, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 7, 0, 1, 7, 0, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 7, 1, 1, 7, 2, 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 7, 1, 3, 7, 2, 3, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 7, 1, 4, 7, 1, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 7, 0, 6, 7, 0, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 7, 1, 6, 7, 1, 7, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 7, 1, 10 - 1, 7, 2, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.25F, 1, 0, 1, sizeX - 1, 0, sizeZ - 1, Blocks.gravel, Blocks.air, false);
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.25F, 1, 0, 1, 7 - 1, 0, 10 - 1, Blocks.gravel, Blocks.air, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -161,8 +161,8 @@ public class RuinFeatures {
|
||||
super();
|
||||
}
|
||||
|
||||
public NTMRuin3(Random rand, int minX, int minY, int minZ) {
|
||||
super(rand, minX, minY, minZ, 8, 3, 10);
|
||||
public NTMRuin3(Random rand, int minX, int minZ) {
|
||||
super(rand, minX, 64, minZ, 8, 3, 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -174,37 +174,37 @@ public class RuinFeatures {
|
||||
}
|
||||
//System.out.println("" + this.boundingBox.minX + ", " + this.boundingBox.minY + ", " + this.boundingBox.minZ);
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 0, 0, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, sizeX, 0, sizeX, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 0, 0, 10, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 8, 0, 8, 10, -1, box);
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 0, sizeX, 0, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 4, sizeX, 4, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 0, 8, 0, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 4, 8, 4, -1, box);
|
||||
|
||||
this.fillWithBlocks(world, box, 0, 0, 0, 0, sizeY, 0, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall
|
||||
this.fillWithBlocks(world, box, sizeX, 0, 0, sizeX, 1, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, 0, sizeX - 1, 0, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, 0, 0, 0, 0, 3, 0, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall
|
||||
this.fillWithBlocks(world, box, 8, 0, 0, 8, 1, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, 0, 8 - 1, 0, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 1, 0, 1, 1, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 4, 1, 0, 4, 1, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX - 1, 1, 0, sizeX - 1, 1, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 2, 0, sizeX - 2, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8 - 1, 1, 0, 8 - 1, 1, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 2, 0, 8 - 2, 2, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, 0, 0, 4, 0, 1, 4, ModBlocks.concrete_pillar, Blocks.air, false); //Left Wall
|
||||
this.placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, 0, 0, 0, sizeZ, box);
|
||||
this.placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, 0, 0, 0, 10, box);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, 1, 0, 0, 3, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, 5, 0, 0, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, 5, 0, 0, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, 5, 0, 1, 5, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, 7, 0, 1, 7, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, sizeX, 0, 4, sizeX, 1, 4, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall
|
||||
this.fillWithBlocks(world, box, sizeX, 0, sizeZ, sizeX, 1, sizeZ, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 0, 1, sizeX, 1, 3, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 0, 5, sizeX, 0, 6, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 0, sizeZ - 1, sizeX, 0, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX - 1, 0, sizeZ, sizeX - 1, 0, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, 8, 0, 4, 8, 1, 4, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall
|
||||
this.fillWithBlocks(world, box, 8, 0, 10, 8, 1, 10, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 8, 0, 1, 8, 1, 3, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8, 0, 5, 8, 0, 6, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8, 0, 10 - 1, 8, 0, 10 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 8 - 1, 0, 10, 8 - 1, 0, 10, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, 4, 0, 4, 4, 2, 4, ModBlocks.concrete_pillar, Blocks.air, false); //Center Wall
|
||||
this.fillWithRandomizedBlocks(world, box, 3, 0, 4, 3, 1, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 0, 4, sizeX - 1, 1, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 0, 4, 8 - 1, 1, 4, false, rand, RandomConcreteBricks);
|
||||
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.05F, 1, 0, 1, sizeX - 1, 0, 3, Blocks.gravel, Blocks.air, false);
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.05F, 1, 0, 5, sizeX - 1, 0, sizeZ - 1, Blocks.gravel, Blocks.air, false);
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.05F, 1, 0, 1, 8 - 1, 0, 3, Blocks.gravel, Blocks.air, false);
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.05F, 1, 0, 5, 8 - 1, 0, 10 - 1, Blocks.gravel, Blocks.air, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -218,8 +218,8 @@ public class RuinFeatures {
|
||||
super();
|
||||
}
|
||||
|
||||
public NTMRuin4(Random rand, int minX, int minY, int minZ) {
|
||||
super(rand, minX, minY, minZ, 10, 2, 11);
|
||||
public NTMRuin4(Random rand, int minX, int minZ) {
|
||||
super(rand, minX, 64, minZ, 10, 2, 11);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -232,40 +232,40 @@ public class RuinFeatures {
|
||||
//System.out.println("" + this.boundingBox.minX + ", " + this.boundingBox.minY + ", " + this.boundingBox.minZ);
|
||||
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 0, 0, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, sizeX, 5, sizeX, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 0, 0, 11, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 10, 5, 10, 11, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 5, 0, 5, 4, -1, box);
|
||||
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, sizeZ, sizeX - 1, sizeZ, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 11, 10 - 1, 11, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 0, 4, 0, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 5, 5, sizeX - 1, 5, -1, box);
|
||||
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 5, 5, 10 - 1, 5, -1, box);
|
||||
|
||||
this.fillWithBlocks(world, box, 0, 0, 0, 0, 1, 0, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall Pt. 1
|
||||
this.fillWithBlocks(world, box, 5, 0, 0, 5, sizeY, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithBlocks(world, box, 5, 0, 0, 5, 2, 0, ModBlocks.concrete_pillar, Blocks.air, false);
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, 0, 4, 0, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 4, 1, 0, 4, 1, 0, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, 5, 0, 5, 5, sizeY, 5, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall Pt. 1
|
||||
this.fillWithBlocks(world, box, 5, 0, 5, 5, 2, 5, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall Pt. 1
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 0, 1, 5, 0, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 1, 1, 5, 1, 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 1, 4, 5, 1, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 5, 2, 1, 5, 2, 4, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, sizeX, 0, 5, sizeX, 1, 5, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall Pt. 2
|
||||
this.fillWithRandomizedBlocks(world, box, 6, 0, 5, sizeX - 1, 0, 5, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, 10, 0, 5, 10, 1, 5, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall Pt. 2
|
||||
this.fillWithRandomizedBlocks(world, box, 6, 0, 5, 10 - 1, 0, 5, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 6, 1, 5, 6, 1, 5, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX - 1, 1, 5, sizeX - 1, 1, 5, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, sizeX, 0, sizeZ, sizeX, 1, sizeZ, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall Pt. 2
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 0, 6, sizeX, 0, sizeZ - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX, 1, 6, sizeX, 1, sizeZ - 3, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, 0, 0, sizeZ, 0, 0, sizeZ, ModBlocks.concrete_pillar, Blocks.air, false); //Front Wall
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, sizeZ, 1, 0, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 6, 0, sizeZ, 7, 0, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, sizeX - 1, 0, sizeZ, sizeX - 1, 0, sizeZ, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, 1, 0, 0, sizeZ - 1, false, rand, RandomConcreteBricks); //Left Wall
|
||||
this.fillWithRandomizedBlocks(world, box, 10 - 1, 1, 5, 10 - 1, 1, 5, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, 10, 0, 11, 10, 1, 11, ModBlocks.concrete_pillar, Blocks.air, false); //Right Wall Pt. 2
|
||||
this.fillWithRandomizedBlocks(world, box, 10, 0, 6, 10, 0, 11 - 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 10, 1, 6, 10, 1, 11 - 3, false, rand, RandomConcreteBricks);
|
||||
this.fillWithBlocks(world, box, 0, 0, 11, 0, 0, 11, ModBlocks.concrete_pillar, Blocks.air, false); //Front Wall
|
||||
this.fillWithRandomizedBlocks(world, box, 1, 0, 11, 1, 0, 11, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 6, 0, 11, 7, 0, 11, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 10 - 1, 0, 11, 10 - 1, 0, 11, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 0, 1, 0, 0, 11 - 1, false, rand, RandomConcreteBricks); //Left Wall
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, 1, 0, 1, 1, false, rand, RandomConcreteBricks);
|
||||
this.fillWithRandomizedBlocks(world, box, 0, 1, 4, 0, 1, 7, false, rand, RandomConcreteBricks);
|
||||
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.05F, 1, 0, 1, 4, 0, 5, Blocks.gravel, Blocks.air, false);
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.05F, 1, 0, 6, sizeX - 1, 0, sizeZ - 1, Blocks.gravel, Blocks.air, false);
|
||||
this.randomlyFillWithBlocks(world, box, rand, 0.05F, 1, 0, 6, 10 - 1, 0, 11 - 1, Blocks.gravel, Blocks.air, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user