diff --git a/src/main/java/com/hbm/items/tool/ItemWandD.java b/src/main/java/com/hbm/items/tool/ItemWandD.java index 0cb61cc3c..c8dcbbe19 100644 --- a/src/main/java/com/hbm/items/tool/ItemWandD.java +++ b/src/main/java/com/hbm/items/tool/ItemWandD.java @@ -5,16 +5,12 @@ import java.util.List; import com.hbm.entity.effect.EntityNukeTorex; import com.hbm.lib.Library; import com.hbm.util.TrackerUtil; -import com.hbm.world.WorldUtil; -import com.hbm.world.biome.BiomeGenCraterBase; -import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; -import net.minecraft.world.gen.structure.StructureBoundingBox; public class ItemWandD extends Item { @@ -38,88 +34,13 @@ public class ItemWandD extends Item { //PollutionHandler.incrementPollution(world, pos.blockX, pos.blockY, pos.blockZ, PollutionType.SOOT, 15); - int mI = 2; - int mK = 2; + /*int i = pos.blockX >> 4; + int j = pos.blockZ >> 4; - if(!player.isSneaking()) { - for(int i = 0; i < mI; i++) { - for(int k = 0; k < mK; k++) { - for(int j = 0; j < 6; j++) { - double r = world.rand.nextGaussian(); - - Block b; - int meta = 0; - if(r < -1) { - b = Blocks.iron_bars; - } else if(r < .1) { - - int h = world.rand.nextInt(20); - if(h < 5) - b = ModBlocks.brick_concrete_broken_stairs; - else if(h < 10) - b = ModBlocks.brick_concrete_cracked_stairs; - else - b = ModBlocks.brick_concrete_stairs; - - meta = world.rand.nextInt(16); - } else { - int h = world.rand.nextInt(20); - if(h < 5) - b = ModBlocks.brick_concrete_broken; - else if(h < 10) - b = ModBlocks.brick_concrete_cracked; - else - b = ModBlocks.brick_concrete; - } - - world.setBlock(pos.blockX + i, pos.blockY + j + 1, pos.blockZ + k, b, meta, 2); - } - } - } - } else { - for(int i = 0; i < mI; i++) { - for(int k = 0; k < mK; k++) { - double r = world.rand.nextGaussian(); - - Block b; - int meta = 0; - if(r < -2) { - b = Blocks.iron_bars; - } else if(r < -1) { - b = ModBlocks.concrete_brick_slab; - meta = 8; - int h = world.rand.nextInt(20); - - if(h < 5) - meta |= 3; - else if(h < 10) - meta |= 2; - - } else if(r < .1) { - - int h = world.rand.nextInt(20); - if(h < 5) - b = ModBlocks.brick_concrete_broken_stairs; - else if(h < 10) - b = ModBlocks.brick_concrete_cracked_stairs; - else - b = ModBlocks.brick_concrete_stairs; - - meta = world.rand.nextInt(16); - } else { - int h = world.rand.nextInt(20); - if(h < 5) - b = ModBlocks.brick_concrete_broken; - else if(h < 10) - b = ModBlocks.brick_concrete_cracked; - else - b = ModBlocks.brick_concrete; - } - - world.setBlock(pos.blockX + i, pos.blockY + 1, pos.blockZ + k, b, meta, 2); - } - } - } + i = (i << 4) + 8; + j = (j << 4) + 8; + Component comp = new ElevatedPrefab1(world.rand, i, 64, j); + comp.addComponentParts(world, world.rand, new StructureBoundingBox(i, j, i + 32, j + 32));*/ /*int i = pos.blockX >> 4; int j = pos.blockZ >> 4; diff --git a/src/main/java/com/hbm/lib/HbmChestContents.java b/src/main/java/com/hbm/lib/HbmChestContents.java index 38eca93a0..964bfc4dc 100644 --- a/src/main/java/com/hbm/lib/HbmChestContents.java +++ b/src/main/java/com/hbm/lib/HbmChestContents.java @@ -459,28 +459,4 @@ public class HbmChestContents { return ItemBookLore.createBook(key, pages, 0x1E1E1E, 0x46EA44); } - - public static ItemStack generateRuinBook(Random rand, int chunkX, int chunkZ) { - ChunkCoordIntPair pair = HbmWorld.worldGenerator.specialFeatureGen.findClosestPosition(chunkX, chunkZ); - int[] vec = new int[] { pair.chunkXPos - chunkX, pair.chunkZPos - chunkZ }; - int dist = (int) Math.sqrt(vec[0] * vec[0] + vec[1] * vec[1]); - - String conf = "book_lore.ruin_special."; - if(dist > 128) { - dist -= dist * .5F * (.5F - rand.nextFloat()); - conf += "low"; - } else if(dist > 64) { - dist -= dist * .25F * (.5F - rand.nextFloat()); - conf += "med"; - } else { - conf += "high"; - } - - String angle = Math.round(Math.toDegrees(Math.atan2(vec[0], vec[1])) * 10000D) / 10000D + ""; - String res = (Math.round((dist * 16) / 1000D * 100D) / 100D) + ""; - - ItemStack book = ItemBookLore.createBook("ruin_special", 1, 0x770011, 0xFFFFFF); - ItemBookLore.addArgs(book, 0, res, angle, conf); - return book; - } } diff --git a/src/main/java/com/hbm/lib/HbmWorld.java b/src/main/java/com/hbm/lib/HbmWorld.java index b2ff4699c..e8c745f28 100644 --- a/src/main/java/com/hbm/lib/HbmWorld.java +++ b/src/main/java/com/hbm/lib/HbmWorld.java @@ -2,14 +2,11 @@ package com.hbm.lib; import com.hbm.world.gen.MapGenNTMFeatures; import com.hbm.world.gen.NTMWorldGenerator; -import com.hbm.world.gen.MapGenSpecialFeatures.SpecialStart; -import com.hbm.world.gen.component.BrutalistFeatures; 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.SpecialFeatures; -import com.hbm.world.gen.component.BunkerComponents.BunkerStart; import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.registry.GameRegistry; @@ -30,7 +27,6 @@ public class HbmWorld { //MapGenStructureIO.func_143031_a(StructureComponentTest.class, "HFR_COMPONENT"); MapGenStructureIO.registerStructure(MapGenNTMFeatures.Start.class, "NTMFeatures"); MapGenStructureIO.registerStructure(BunkerStart.class, "NTMBunker"); - MapGenStructureIO.registerStructure(SpecialStart.class, "NTMSpecialFeatures"); registerNTMFeatures(); registerWorldGen(new HbmWorldGen(), 1); @@ -51,7 +47,5 @@ public class HbmWorld { OfficeFeatures.registerComponents(); RuinFeatures.registerComponents(); BunkerComponents.registerComponents(); - BrutalistFeatures.registerComponents(); - SpecialFeatures.registerComponents(); } } diff --git a/src/main/java/com/hbm/world/gen/MapGenNTMFeatures.java b/src/main/java/com/hbm/world/gen/MapGenNTMFeatures.java index 5b24ea05a..dc5487eb3 100644 --- a/src/main/java/com/hbm/world/gen/MapGenNTMFeatures.java +++ b/src/main/java/com/hbm/world/gen/MapGenNTMFeatures.java @@ -7,11 +7,18 @@ import java.util.Random; import com.hbm.config.GeneralConfig; import com.hbm.config.StructureConfig; -import com.hbm.world.gen.component.BrutalistFeatures.*; 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.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; diff --git a/src/main/java/com/hbm/world/gen/MapGenSpecialFeatures.java b/src/main/java/com/hbm/world/gen/MapGenSpecialFeatures.java deleted file mode 100644 index e6a104c8d..000000000 --- a/src/main/java/com/hbm/world/gen/MapGenSpecialFeatures.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.hbm.world.gen; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Random; -import java.util.Set; - -import com.hbm.config.GeneralConfig; -import com.hbm.world.gen.component.SpecialFeatures.SpecialContainer; - -import net.minecraft.util.Vec3; -import net.minecraft.world.ChunkCoordIntPair; -import net.minecraft.world.World; -import net.minecraft.world.gen.structure.MapGenStructure; -import net.minecraft.world.gen.structure.MapGenStructureIO; -import net.minecraft.world.gen.structure.StructureComponent; -import net.minecraft.world.gen.structure.StructureStart; - -//stuff like the exclusive n rare shipping containers. -//it's 'special' because it's not unique but also limited -public class MapGenSpecialFeatures extends MapGenStructure { - //suuuuuper efficient for .contains() - //do i even need chunkcoordintpairs? idk - Set locs = new HashSet(); - - /** String ID for this MapGen */ - @Override - public String func_143025_a() { - return "NTMSpecialFeatures"; - } - - public void setWorld(World world) { - this.worldObj = world; - } - - @Override - protected boolean canSpawnStructureAtCoords(int chunkX, int chunkZ) { - if(locs.isEmpty()) - generatePositions(); - - return locs.contains(new ChunkCoordIntPair(chunkX, chunkZ)); - } - - //i'll probs make a system to predict which locations are what in advance - //seems like biomes can be cached/gen'd without creating the chunk, thankfully - public ChunkCoordIntPair findClosestPosition(int chunkX, int chunkZ) { - if(locs.isEmpty()) - generatePositions(); - - ChunkCoordIntPair pair = new ChunkCoordIntPair(0, 0); - long dist = Long.MAX_VALUE; - for(ChunkCoordIntPair loc : locs) { - int x = loc.chunkXPos - chunkX; - int z = loc.chunkZPos - chunkZ; - long cont = x * x + z * z; - - if(cont < dist) { - pair = loc; - dist = cont; - } - } - - return pair; - } - - protected void generatePositions() { - //for safety: maybe mandate interactions with these methods to an outside class/wrapper who say "fuck you" - Random rand = new Random(this.worldObj.getSeed()); - double theta = rand.nextDouble() * Math.PI * 2; - int ringMax = 4; //each ring of structures has more (and is farther) than the last - int ringDist = 1; - final int total = 16; //for now - //no biome checks necessary, underground caches can always be a backup - for(int i = 1; i <= total; i++) { - double dist = 312D * (1.25 * ringDist + rand.nextDouble() * 0.5); //5k blocks * random dist in the region of a ring - int cX = (int)Math.round(Math.cos(theta) * dist); - int cZ = (int)Math.round(Math.sin(theta) * dist); - - ChunkCoordIntPair pair = new ChunkCoordIntPair(cX, cZ); - locs.add(pair); - - if(GeneralConfig.enableDebugMode) - System.out.println("SpecialFeature: " + (pair.chunkXPos * 16 + 8) + ", Y, " + (pair.chunkZPos * 16 + 8)); - - theta += Math.PI * 2 / ringMax; - - if(i == (ringDist - 1) * 4 + ringMax) { - ringDist++; - //maybe insert random theta each time? - if(i + ringDist * 4 > total) //last ring may be sparser, but evenly spaced too - ringMax = total - i; - else - ringMax = ringDist * 4; - } - } - } - - @Override - protected StructureStart getStructureStart(int chunkX, int chunkZ) { - return new SpecialStart(this.worldObj, this.rand, chunkX, chunkZ); - } - - public static class SpecialStart extends StructureStart { - - public SpecialStart() {} - - public SpecialStart(World world, Random rand, int chunkX, int chunkZ) { - super(chunkX, chunkZ); - - //test - SpecialContainer shipping = new SpecialContainer(rand, chunkX * 16 + 8, 64, chunkZ * 16 + 8); - this.components.add(shipping); - - if(GeneralConfig.enableDebugMode) { - System.out.print("[Debug] StructureStart at " + (chunkX * 16 + 8) + ", " + 64 + ", " + (chunkZ * 16 + 8) + "\n[Debug] Components: "); - this.components.forEach((component) -> { - System.out.print(MapGenStructureIO.func_143036_a((StructureComponent) component) + " "); - }); - - System.out.print("\n"); - } - - this.updateBoundingBox(); - } - } - -} diff --git a/src/main/java/com/hbm/world/gen/NTMWorldGenerator.java b/src/main/java/com/hbm/world/gen/NTMWorldGenerator.java index 45d7a24a2..cd29b0150 100644 --- a/src/main/java/com/hbm/world/gen/NTMWorldGenerator.java +++ b/src/main/java/com/hbm/world/gen/NTMWorldGenerator.java @@ -17,9 +17,7 @@ import static net.minecraftforge.event.terraingen.TerrainGen.*; import net.minecraftforge.event.world.WorldEvent; public class NTMWorldGenerator implements IWorldGenerator { - //turns out minecraft is cringe and WorldEvent.Load can be/is called after chunks are provided private MapGenNTMFeatures scatteredFeatureGen = new MapGenNTMFeatures(); - public MapGenSpecialFeatures specialFeatureGen = new MapGenSpecialFeatures(); private final Random rand = new Random(); //A central random, used to cleanly generate our stuff without affecting vanilla or modded seeds. @@ -27,8 +25,6 @@ public class NTMWorldGenerator implements IWorldGenerator { @SubscribeEvent public void onLoad(WorldEvent.Load event) { scatteredFeatureGen = (MapGenNTMFeatures) getModdedMapGen(new MapGenNTMFeatures(), EventType.CUSTOM); - specialFeatureGen = (MapGenSpecialFeatures) getModdedMapGen(new MapGenSpecialFeatures(), EventType.CUSTOM); - specialFeatureGen.setWorld(event.world); //doesn't matter on the client so we're good anyway hasPopulationEvent = false; } @@ -71,9 +67,6 @@ public class NTMWorldGenerator implements IWorldGenerator { this.scatteredFeatureGen.func_151539_a(chunkProvider, world, chunkX, chunkZ, ablock); this.scatteredFeatureGen.generateStructuresInChunk(world, rand, chunkX, chunkZ); - - this.specialFeatureGen.func_151539_a(chunkProvider, world, chunkX, chunkZ, ablock); - this.specialFeatureGen.generateStructuresInChunk(world, rand, chunkX, chunkZ); } /* diff --git a/src/main/java/com/hbm/world/gen/component/BrutalistFeatures.java b/src/main/java/com/hbm/world/gen/component/BrutalistFeatures.java deleted file mode 100644 index 9ba8696a7..000000000 --- a/src/main/java/com/hbm/world/gen/component/BrutalistFeatures.java +++ /dev/null @@ -1,623 +0,0 @@ -package com.hbm.world.gen.component; - -import java.util.Random; - -import com.hbm.blocks.ModBlocks; -import com.hbm.lib.HbmChestContents; -import com.hbm.world.gen.NTMWorldGenerator; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.init.Blocks; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.world.World; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.feature.WorldGenShrub; -import net.minecraft.world.gen.structure.MapGenStructureIO; -import net.minecraft.world.gen.structure.StructureBoundingBox; -import net.minecraft.world.gen.structure.StructureComponent; -import net.minecraftforge.common.BiomeDictionary; -import net.minecraftforge.common.BiomeDictionary.Type; - -//civilian features is fucking cringe :P -public class BrutalistFeatures { - - public static void registerComponents() { - MapGenStructureIO.func_143031_a(ElevatedPrefab1.class, "NTMElevatedPrefab1"); - } - - //might be other than a lab, placeholder :P - public static class ElevatedPrefab1 extends Component { - - protected int type; - - public ElevatedPrefab1() { super(); } - - public ElevatedPrefab1(Random rand, int minX, int minY, int minZ) { - super(rand, minX, minY, minZ, 16, 11, 14); - - this.type = rand.nextInt(2); - } - - /** Set to NBT */ - protected void func_143012_a(NBTTagCompound nbt) { - super.func_143012_a(nbt); - nbt.setInteger("type", type); - } - - /** Get from NBT */ - protected void func_143011_b(NBTTagCompound nbt) { - super.func_143011_b(nbt); - this.type = nbt.getInteger("type"); - } - - @Override - public boolean addComponentParts(World world, Random rand, StructureBoundingBox box) { - - if(hpos == -1 && !this.setAverageHeight(world, box, this.boundingBox.minY)) { - return false; - } - - BiomeGenBase biome = world.getBiomeGenForCoords(this.boundingBox.minX, this.boundingBox.minZ); - DirtyGlass glass = new DirtyGlass(biome, 0.1F, true); - - final int stairMetaW = getStairMeta(0); - final int stairMetaE = getStairMeta(1); - final int stairMetaN = getStairMeta(2); - final int stairMetaS = getStairMeta(3); - - //greater pillars - for(int i = 2; i <= 12; i+=5) { - fillWithBlocks(world, box, i, 0, 2, i, 1, 4, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, i, 4, 2, i, 5, 4, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, i+1, 0, 2, i+1, 5, 4, ModBlocks.concrete_pillar); - fillWithBlocks(world, box, i+2, 0, 2, i+2, 1, 4, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, i+2, 4, 2, i+2, 5, 4, ModBlocks.concrete_smooth); - - for(int j = 0; j <= 1; j++) { - final int u = j * 4; - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaN | u, i, 2 + j, 2, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaN | u, i+2, 2 + j, 2, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaW | u, i, 2 + j, 3, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaE | u, i+2, 2 + j, 3, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaS | u, i, 2 + j, 4, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaS | u, i+2, 2 + j, 4, box); - } - - placeFoundationUnderneath(world, ModBlocks.concrete_smooth, 0, i, 2, i, 4, -1, box); - placeFoundationUnderneath(world, ModBlocks.concrete_pillar, 0, i+1, 2, i+1, 4, -1, box); - placeFoundationUnderneath(world, ModBlocks.concrete_smooth, 0, i+2, 2, i+2, 4, -1, box); - } - - //lesser pillars - for(int i = 2; i <= 12; i+=5) { - fillWithBlocks(world, box, i, 0, 10, i, 1, 12, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, i, 3, 10, i, 3, 12, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, i+1, 0, 10, i+1, 3, 12, ModBlocks.concrete_pillar); - fillWithBlocks(world, box, i+2, 0, 10, i+2, 1, 12, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, i+2, 3, 10, i+2, 3, 12, ModBlocks.concrete_smooth); - - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaN, i, 2, 10, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaN, i+2, 2, 10, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaW, i, 2, 11, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaE, i+2, 2, 11, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaS, i, 2, 12, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaS, i+2, 2, 12, box); - - placeFoundationUnderneath(world, ModBlocks.concrete_smooth, 0, i, 10, i, 12, -1, box); - placeFoundationUnderneath(world, ModBlocks.concrete_pillar, 0, i+1, 10, i+1, 12, -1, box); - placeFoundationUnderneath(world, ModBlocks.concrete_smooth, 0, i+2, 10, i+2, 12, -1, box); - } - - fillWithAir(world, box, 1, 5, 9, 15, 7, 13); - fillWithAir(world, box, 13, 6, 8, 14, 6, 8); - fillWithAir(world, box, 13, 7, 6, 14, 8, 8); - fillWithAir(world, box, 1, 7, 1, 15, 9, 5); - - /* lower floor */ - //lower slabs - fillWithMetadataBlocks(world, box, 0, 3, 9, 16, 3, 9, ModBlocks.concrete_slab, 8); - fillWithMetadataBlocks(world, box, 1, 3, 10, 1, 3, 12, ModBlocks.concrete_slab, 8); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_slab, 8, 0, 3, 11, box); - fillWithMetadataBlocks(world, box, 0, 3, 13, 16, 3, 13, ModBlocks.concrete_slab, 8); - fillWithMetadataBlocks(world, box, 5, 3, 10, 6, 3, 12, ModBlocks.concrete_slab, 8); - fillWithMetadataBlocks(world, box, 10, 3, 10, 11, 3, 12, ModBlocks.concrete_slab, 8); - fillWithMetadataBlocks(world, box, 15, 3, 10, 15, 3, 12, ModBlocks.concrete_slab, 8); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_slab, 8, 16, 3, 11, box); - //floor & lining - fillWithBlocks(world, box, 1, 4, 9, 15, 4, 13, ModBlocks.deco_titanium); - fillWithMetadataBlocks(world, box, 0, 4, 8, 16, 4, 8, ModBlocks.concrete_smooth_stairs, stairMetaN | 4); - fillWithBlocks(world, box, 0, 4, 9, 0, 4, 13, ModBlocks.concrete_smooth); - fillWithMetadataBlocks(world, box, 0, 4, 14, 16, 4, 14, ModBlocks.concrete_smooth_stairs, stairMetaS | 4); - fillWithBlocks(world, box, 16, 4, 9, 16, 4, 13, ModBlocks.concrete_smooth); - //walls - fillWithBlocks(world, box, 0, 5, 8, 1, 6, 8, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 4, 5, 8, 12, 6, 8, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 0, 7, 8, 12, 7, 8, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, 15, 5, 8, 16, 6, 8, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 15, 7, 8, 16, 7, 8, ModBlocks.concrete_smooth); - - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 0, 0, 5, 9, box); - fillWithBlocks(world, box, 0, 5, 11, 0, 6, 11, ModBlocks.concrete_colored_ext); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 0, 0, 5, 13, box); - fillWithBlocks(world, box, 0, 5, 14, 0, 6, 14, ModBlocks.concrete_colored_ext); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth, 0, 0, 7, 9, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 1, 0, 7, 11, box); - fillWithBlocks(world, box, 0, 7, 13, 0, 7, 14, ModBlocks.concrete_smooth); - - fillWithBlocks(world, box, 4, 5, 14, 4, 6, 14, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 6, 5, 14, 6, 6, 14, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 8, 5, 14, 8, 6, 14, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 10, 5, 14, 10, 6, 14, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 12, 5, 14, 12, 6, 14, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 16, 5, 14, 16, 6, 14, ModBlocks.concrete_colored_ext); - fillWithMetadataBlocks(world, box, 1, 7, 14, 3, 7, 14, ModBlocks.concrete_smooth_stairs, stairMetaS | 4); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth, 0, 4, 7, 14, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 1, 6, 7, 14, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 1, 8, 7, 14, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 1, 10, 7, 14, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth, 0, 12, 7, 14, box); - fillWithMetadataBlocks(world, box, 13, 7, 14, 15, 7, 14, ModBlocks.concrete_smooth_stairs, stairMetaS | 4); - - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 0, 16, 5, 13, box); - fillWithBlocks(world, box, 16, 5, 11, 16, 6, 11, ModBlocks.concrete_colored_ext); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 0, 16, 5, 9, box); - fillWithBlocks(world, box, 16, 7, 13, 16, 7, 14, ModBlocks.concrete_smooth); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 1, 16, 7, 11, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth, 0, 16, 7, 9, box); - //windows - fillWithRandomizedBlocks(world, box, 0, 6, 9, 0, 6, 9, rand, glass); - fillWithRandomizedBlocks(world, box, 0, 5, 10, 0, 7, 10, rand, glass); - fillWithRandomizedBlocks(world, box, 0, 5, 12, 0, 7, 12, rand, glass); - fillWithRandomizedBlocks(world, box, 0, 6, 13, 0, 6, 13, rand, glass); - fillWithRandomizedBlocks(world, box, 1, 5, 14, 3, 6, 14, rand, glass); - fillWithRandomizedBlocks(world, box, 5, 5, 14, 5, 7, 14, rand, glass); - fillWithRandomizedBlocks(world, box, 7, 5, 14, 7, 7, 14, rand, glass); - fillWithRandomizedBlocks(world, box, 9, 5, 14, 9, 7, 14, rand, glass); - fillWithRandomizedBlocks(world, box, 11, 5, 14, 11, 7, 14, rand, glass); - fillWithRandomizedBlocks(world, box, 13, 5, 14, 15, 6, 14, rand, glass); - fillWithRandomizedBlocks(world, box, 16, 6, 13, 16, 6, 13, rand, glass); - fillWithRandomizedBlocks(world, box, 16, 5, 12, 16, 7, 12, rand, glass); - fillWithRandomizedBlocks(world, box, 16, 5, 10, 16, 7, 10, rand, glass); - fillWithRandomizedBlocks(world, box, 16, 6, 9, 16, 6, 9, rand, glass); - //ceiling with liner - fillWithMetadataBlocks(world, box, 1, 8, 9, 15, 8, 13, ModBlocks.vinyl_tile, 1); - fillWithMetadataBlocks(world, box, 0, 8, 8, 11, 8, 8, ModBlocks.concrete_smooth_stairs, stairMetaN); - fillWithBlocks(world, box, 12, 8, 8, 12, 8, 9, ModBlocks.concrete_smooth); - fillWithMetadataBlocks(world, box, 13, 8, 9, 14, 8, 9, ModBlocks.concrete_smooth_stairs, stairMetaN | 4); - fillWithBlocks(world, box, 15, 8, 8, 15, 8, 9, ModBlocks.concrete_smooth); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaN, 16, 8, 8, box); - fillWithBlocks(world, box, 16, 8, 9, 16, 8, 13, ModBlocks.concrete_smooth); - fillWithMetadataBlocks(world, box, 0, 8, 14, 16, 8, 14, ModBlocks.concrete_smooth_stairs, stairMetaS); - fillWithBlocks(world, box, 0, 8, 9, 0, 8, 13, ModBlocks.concrete_smooth); - //upper slabs - fillWithBlocks(world, box, 0, 9, 9, 16, 9, 9, ModBlocks.concrete_slab); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_slab, 0, 0, 9, 11, box); - fillWithBlocks(world, box, 0, 9, 13, 16, 9, 13, ModBlocks.concrete_slab); - fillWithBlocks(world, box, 1, 9, 10, 15, 9, 12, ModBlocks.concrete_slab); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_slab, 0, 16, 9, 11, box); - fillWithBlocks(world, box, 12, 9, 8, 15, 9, 8, ModBlocks.concrete_slab); - - /* middle stairs */ - //stairs - fillWithMetadataBlocks(world, box, 13, 5, 8, 14, 5, 8, ModBlocks.concrete_smooth_stairs, stairMetaS); - fillWithMetadataBlocks(world, box, 13, 6, 7, 14, 6, 7, ModBlocks.concrete_smooth_stairs, stairMetaS); - fillWithMetadataBlocks(world, box, 12, 5, 7, 15, 5, 7, ModBlocks.concrete_smooth_stairs, stairMetaN | 4); - //walls - fillWithBlocks(world, box, 12, 6, 7, 12, 8, 7, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, 15, 6, 7, 15, 8, 7, ModBlocks.concrete_smooth); - //ceiling - fillWithMetadataBlocks(world, box, 12, 9, 7, 15, 9, 7, ModBlocks.concrete_smooth_stairs, stairMetaS); - fillWithMetadataBlocks(world, box, 13, 9, 6, 14, 9, 6, ModBlocks.concrete_slab, 8); - - /* upper floor */ - //lower slabs - fillWithMetadataBlocks(world, box, 0, 5, 1, 16, 5, 1, ModBlocks.concrete_slab, 8); - fillWithMetadataBlocks(world, box, 1, 5, 2, 1, 5, 4, ModBlocks.concrete_slab, 8); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_slab, 8, 0, 5, 3, box); - fillWithMetadataBlocks(world, box, 0, 5, 5, 16, 5, 5, ModBlocks.concrete_slab, 8); - fillWithMetadataBlocks(world, box, 12, 5, 6, 15, 5, 6, ModBlocks.concrete_slab, 8); - fillWithMetadataBlocks(world, box, 5, 5, 2, 6, 5, 4, ModBlocks.concrete_slab, 8); - fillWithMetadataBlocks(world, box, 10, 5, 2, 11, 5, 4, ModBlocks.concrete_slab, 8); - fillWithMetadataBlocks(world, box, 15, 5, 2, 15, 5, 4, ModBlocks.concrete_slab, 8); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_slab, 8, 16, 5, 3, box); - //floor and lining - fillWithBlocks(world, box, 1, 6, 1, 15, 6, 5, ModBlocks.deco_titanium); - fillWithBlocks(world, box, 13, 6, 6, 14, 6, 6, ModBlocks.deco_titanium); - fillWithMetadataBlocks(world, box, 0, 6, 0, 16, 6, 0, ModBlocks.concrete_smooth_stairs, stairMetaN | 4); - fillWithBlocks(world, box, 0, 6, 1, 0, 6, 5, ModBlocks.concrete_smooth); - fillWithMetadataBlocks(world, box, 0, 6, 6, 11, 6, 6, ModBlocks.concrete_smooth_stairs, stairMetaS | 4); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth, 0, 12, 6, 6, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth, 0, 15, 6, 6, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth_stairs, stairMetaS | 4, 16, 6, 6, box); - fillWithBlocks(world, box, 16, 6, 1, 16, 6, 5, ModBlocks.concrete_smooth); - //walls - fillWithBlocks(world, box, 0, 7, 0, 0, 8, 0, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 4, 7, 0, 4, 8, 0, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 6, 7, 0, 6, 8, 0, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 10, 7, 0, 10, 8, 0, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 12, 7, 0, 12, 8, 0, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 16, 7, 0, 16, 8, 0, ModBlocks.concrete_colored_ext); - fillWithMetadataBlocks(world, box, 1, 9, 0, 3, 9, 0, ModBlocks.concrete_smooth_stairs, stairMetaN | 4); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth, 0, 4, 9, 0, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 1, 6, 9, 0, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 1, 10, 9, 0, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth, 0, 12, 9, 0, box); - fillWithMetadataBlocks(world, box, 13, 9, 0, 15, 9, 0, ModBlocks.concrete_smooth_stairs, stairMetaN | 4); - - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 0, 0, 7, 1, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 0, 0, 7, 5, box); - fillWithBlocks(world, box, 0, 9, 0, 0, 9, 1, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, 0, 9, 5, 0, 9, 6, ModBlocks.concrete_smooth); - - fillWithBlocks(world, box, 0, 7, 6, 12, 8, 6, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 15, 7, 6, 16, 8, 6, ModBlocks.concrete_colored_ext); - fillWithBlocks(world, box, 1, 9, 6, 12, 9, 6, ModBlocks.concrete_smooth); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_smooth, 0, 15, 9, 6, box); - - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 0, 16, 7, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_colored_ext, 0, 16, 7, 1, box); - fillWithBlocks(world, box, 16, 9, 5, 16, 9, 6, ModBlocks.concrete_smooth); - fillWithBlocks(world, box, 16, 9, 0, 16, 9, 1, ModBlocks.concrete_smooth); - //windows - fillWithRandomizedBlocks(world, box, 1, 7, 0, 3, 8, 0, rand, glass); - fillWithRandomizedBlocks(world, box, 5, 7, 0, 5, 9, 0, rand, glass); - fillWithRandomizedBlocks(world, box, 7, 7, 0, 9, 9, 0, rand, glass); - fillWithRandomizedBlocks(world, box, 11, 7, 0, 11, 9, 0, rand, glass); - fillWithRandomizedBlocks(world, box, 13, 7, 0, 15, 8, 0, rand, glass); - fillWithRandomizedBlocks(world, box, 0, 8, 1, 0, 8, 1, rand, glass); - fillWithRandomizedBlocks(world, box, 0, 7, 2, 0, 9, 4, rand, glass); - fillWithRandomizedBlocks(world, box, 0, 8, 5, 0, 8, 5, rand, glass); - fillWithRandomizedBlocks(world, box, 16, 8, 5, 16, 8, 5, rand, glass); - fillWithRandomizedBlocks(world, box, 16, 7, 2, 16, 9, 4, rand, glass); - fillWithRandomizedBlocks(world, box, 16, 8, 1, 16, 8, 1, rand, glass); - //ceiling with liner - fillWithMetadataBlocks(world, box, 1, 10, 1, 15, 10, 5, ModBlocks.vinyl_tile, 1); - fillWithMetadataBlocks(world, box, 0, 10, 0, 16, 10, 0, ModBlocks.concrete_smooth_stairs, stairMetaN); - fillWithBlocks(world, box, 0, 10, 1, 0, 10, 5, ModBlocks.concrete_smooth); - fillWithMetadataBlocks(world, box, 0, 10, 6, 16, 10, 6, ModBlocks.concrete_smooth_stairs, stairMetaS); - fillWithBlocks(world, box, 16, 10, 1, 16, 10, 5, ModBlocks.concrete_smooth); - //slabs - fillWithBlocks(world, box, 0, 11, 1, 16, 11, 1, ModBlocks.concrete_slab); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_slab, 0, 0, 11, 3, box); - fillWithBlocks(world, box, 1, 11, 2, 15, 11, 4, ModBlocks.concrete_slab); - fillWithBlocks(world, box, 0, 11, 5, 16, 11, 5, ModBlocks.concrete_slab); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_slab, 0, 16, 11, 3, box); - - //stairs (probably wip) - fillWithMetadataBlocks(world, box, 2, 4, 7, 3, 4, 7, ModBlocks.steel_grate, 7); - placeBlockAtCurrentPosition(world, ModBlocks.steel_grate, 3, 4, 4, 7, box); - placeBlockAtCurrentPosition(world, ModBlocks.steel_grate, 7, 5, 3, 7, box); - placeBlockAtCurrentPosition(world, ModBlocks.steel_grate, 3, 6, 3, 7, box); - placeBlockAtCurrentPosition(world, ModBlocks.steel_grate, 7, 7, 2, 7, box); - placeBlockAtCurrentPosition(world, ModBlocks.steel_grate, 3, 8, 2, 7, box); - placeBlockAtCurrentPosition(world, ModBlocks.steel_grate, 7, 9, 1, 7, box); - placeBlockAtCurrentPosition(world, ModBlocks.steel_grate, 3, 10, 1, 7, box); - placeBlockAtCurrentPosition(world, ModBlocks.steel_grate, 7, 11, 0, 7, box); - placeBlockAtCurrentPosition(world, ModBlocks.steel_grate, 3, 12, 0, 7, box); - final int decoMetaS = getDecoMeta(2); - final int decoMetaN = getDecoMeta(3); - final int decoMetaE = getDecoMeta(4); - placeBlockAtCurrentPosition(world, ModBlocks.steel_wall, decoMetaE, 1, 5, 7, box); - fillWithMetadataBlocks(world, box, 2, 4, 6, 3, 5, 6, ModBlocks.steel_wall, decoMetaS); - fillWithMetadataBlocks(world, box, 4, 4, 6, 5, 4, 6, ModBlocks.steel_wall, decoMetaS); - fillWithMetadataBlocks(world, box, 5, 3, 6, 7, 3, 6, ModBlocks.steel_wall, decoMetaS); - fillWithMetadataBlocks(world, box, 7, 2, 6, 9, 2, 6, ModBlocks.steel_wall, decoMetaS); - fillWithMetadataBlocks(world, box, 9, 1, 6, 11, 1, 6, ModBlocks.steel_wall, decoMetaS); - fillWithMetadataBlocks(world, box, 11, 0, 6, 12, 0, 6, ModBlocks.steel_wall, decoMetaS); - fillWithMetadataBlocks(world, box, 5, 3, 8, 7, 3, 8, ModBlocks.steel_wall, decoMetaN); - fillWithMetadataBlocks(world, box, 7, 2, 8, 9, 2, 8, ModBlocks.steel_wall, decoMetaN); - fillWithMetadataBlocks(world, box, 9, 1, 8, 11, 1, 8, ModBlocks.steel_wall, decoMetaN); - fillWithMetadataBlocks(world, box, 11, 0, 8, 12, 0, 8, ModBlocks.steel_wall, decoMetaN); - - /* Deco */ - //lights - for(int j = 4; j <= 12; j+=4) - placeBlockAtCurrentPosition(world, ModBlocks.reinforced_lamp_off, 0, j, 8, 11, box); - for(int j = 4; j <= 12; j+=4) - placeBlockAtCurrentPosition(world, ModBlocks.reinforced_lamp_off, 0, j, 10, 3, box); - //doors - placeDoor(world, box, ModBlocks.door_office, 1, false, false, 3, 5, 8); - placeDoor(world, box, ModBlocks.door_office, 1, true, false, 2, 5, 8); - - final int decoModelMetaN = getDecoModelMeta(0); - final int decoModelMetaS = getDecoModelMeta(1); - final int decoModelMetaW = getDecoModelMeta(2); - final int decoModelMetaE = getDecoModelMeta(3); - final int decoMetaW = getDecoMeta(5); - switch(this.type) { - default: //machinery lab - //lower floor - placeBlockAtCurrentPosition(world, ModBlocks.deco_pipe_rim, 0, 1, 5, 9, box); - placeBlockAtCurrentPosition(world, Blocks.fence, 0, 1, 5, 11, box); - placeBlockAtCurrentPosition(world, Blocks.wooden_pressure_plate, 0, 1, 6, 11, box); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaE | 4, 1, 5, 13, box); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaW | 4, 2, 5, 13, box); - placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 1, 6, 13, box); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaS | 4, 5, 5, 9, box); //desk 1 - fillWithMetadataBlocks(world, box, 5, 5, 10, 5, 5, 11, Blocks.spruce_stairs, stairMetaE | 4); - placeBlockAtCurrentPosition(world, Blocks.wooden_slab, 9, 6, 5, 11, box); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaW | 4, 7, 5, 11, box); - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaS, 7, 5, 9, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, decoModelMetaN, 6, 6, 11, box); - placeBlockAtCurrentPosition(world, Blocks.dark_oak_stairs, stairMetaW | 4, 11, 5, 9, box); //desk 2 - fillWithMetadataBlocks(world, box, 9, 5, 9, 10, 5, 9, Blocks.dark_oak_stairs, stairMetaS | 4); - placeBlockAtCurrentPosition(world, Blocks.wooden_slab, 13, 9, 5, 10, box); - placeBlockAtCurrentPosition(world, Blocks.dark_oak_stairs, stairMetaN | 4, 9, 5, 11, box); - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaW, 11, 5, 10, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, decoModelMetaS, 10, 6, 9, box); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaE | 4, 13, 5, 13, box); //desk 3 - fillWithMetadataBlocks(world, box, 14, 5, 13, 15, 5, 13, Blocks.wooden_slab, 9); - placeBlockAtCurrentPosition(world, Blocks.wooden_slab, 9, 15, 5, 12, box); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaS | 4, 15, 5, 11, box); - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaE, 14, 5, 12, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, decoModelMetaN, 14, 6, 13, box); - placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 15, 5, 10, box); - placeBlockAtCurrentPosition(world, Blocks.fence, 0, 15, 5, 9, box); - placeBlockAtCurrentPosition(world, Blocks.wooden_pressure_plate, 0, 15, 6, 9, box); - //loot - generateInvContents(world, box, rand, ModBlocks.filing_cabinet, decoModelMetaS, 8, 5, 9, HbmChestContents.officeTrash, 4); - generateInvContents(world, box, rand, ModBlocks.filing_cabinet, decoModelMetaN, 12, 5, 13, HbmChestContents.filingCabinet, 6); - //there were supposed to be paintings included, but i don't want to figure out how to - //force the art type on both the server and clientside - //upper floor - placeBlockAtCurrentPosition(world, ModBlocks.deco_pipe_rim, 0, 15, 7, 5, box); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaW | 4, 15, 7, 1, box); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaE | 4, 14, 7, 1, box); - placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 14, 8, 1, box); - fillWithBlocks(world, box, 8, 7, 3, 11, 7, 3, ModBlocks.tile_lab); //central table - placeBlockAtCurrentPosition(world, ModBlocks.steel_wall, decoMetaW, 12, 7, 3, box); - fillWithMetadataBlocks(world, box, 8, 7, 2, 11, 7, 2, ModBlocks.steel_wall, decoMetaS); - placeBlockAtCurrentPosition(world, ModBlocks.steel_wall, decoMetaE, 7, 7, 3, box); - fillWithMetadataBlocks(world, box, 8, 7, 4, 11, 7, 4, ModBlocks.steel_wall, decoMetaN); - fillWithBlocks(world, box, 10, 7, 5, 12, 7, 5, ModBlocks.cm_sheet); //machine 1 - placeBlockAtCurrentPosition(world, ModBlocks.cm_block, 0, 12, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.tape_recorder, decoMetaS, 11, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_block, 0, 10, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_sheet, 0, 12, 9, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_port, 0, 11, 9, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_sheet, 0, 10, 9, 5, box); - placeBlockAtCurrentPosition(world, Blocks.stone_button, getButtonMeta(4), 11, 9, 4, box); - fillWithMetadataBlocks(world, box, 9, 7, 5, 9, 8, 5, ModBlocks.steel_wall, decoMetaW); //locker - placeBlockAtCurrentPosition(world, ModBlocks.steel_roof, decoMetaN, 8, 9, 5, box); - fillWithMetadataBlocks(world, box, 7, 7, 5, 7, 8, 5, ModBlocks.steel_wall, decoMetaE); - fillWithBlocks(world, box, 4, 7, 5, 6, 7, 5, ModBlocks.cm_block); //machine 2 - placeBlockAtCurrentPosition(world, ModBlocks.tape_recorder, decoMetaS, 6, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_circuit, 0, 5, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.tape_recorder, decoMetaS, 4, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_engine, 0, 6, 9, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.reinforced_lamp_off, 0, 5, 9, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_engine, 0, 4, 9, 5, box); - placeLever(world, box, 4, false, 5, 8, 4); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaE | 4, 4, 7, 1, box); //table - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaW | 4, 5, 7, 1, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_pipe_rim, 0, 1, 7, 1, box); - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaW | 4, 2, 7, 5, box); //desk - placeBlockAtCurrentPosition(world, Blocks.spruce_stairs, stairMetaE | 4, 1, 7, 5, box); - placeBlockAtCurrentPosition(world, Blocks.wooden_slab, 2, 2, 7, 4, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, decoModelMetaN, 2, 8, 5, box); - //loot - generateInvContents(world, box, rand, ModBlocks.filing_cabinet, decoModelMetaS, 13, 7, 1, HbmChestContents.filingCabinet, 4); - if(rand.nextInt(2) == 0) - generateLoreBook(world, box, 13, 7, 1, 4, HbmChestContents.generateLabBook(rand)); - generateInvContents(world, box, rand, Blocks.chest, decoMetaS, 8, 7, 5, HbmChestContents.labVault, 4); - generateInvContents(world, box, rand, Blocks.chest, decoMetaS, 8, 8, 5, HbmChestContents.machineParts, 5); - break; - case 1: //hazmat - //lower floor - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaS | 4, 1, 5, 9, box); //table - placeBlockAtCurrentPosition(world, Blocks.wooden_slab, 10, 1, 5, 10, box); - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaN | 4, 1, 5, 11, box); - placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 1, 6, 10, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_pipe_rim, 0, 1, 5, 13, box); - fillWithMetadataBlocks(world, box, 5, 5, 9, 11, 5, 9, ModBlocks.concrete_asbestos_stairs, stairMetaS | 4); //con. desk - fillWithMetadataBlocks(world, box, 5, 5, 10, 7, 5, 10, ModBlocks.concrete_slab, 10); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_asbestos_stairs, stairMetaN | 4, 7, 5, 11, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_slab, 10, 11, 5, 10, box); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_asbestos_stairs, stairMetaN | 4, 11, 5, 11, box); - fillWithMetadataBlocks(world, box, 4, 6, 9, 4, 7, 9, ModBlocks.steel_wall, decoMetaE); //bank of tape recorders - fillWithMetadataBlocks(world, box, 5, 6, 9, 5, 7, 9, ModBlocks.tape_recorder, decoMetaN); - placeBlockAtCurrentPosition(world, ModBlocks.tape_recorder, decoMetaN, 6, 6, 9, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_block, 0, 7, 6, 9, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_block, 0, 6, 7, 9, box); - placeBlockAtCurrentPosition(world, ModBlocks.tape_recorder, decoMetaN, 7, 7, 9, box); - placeBlockAtCurrentPosition(world, Blocks.lever, 3, 6, 7, 10, box); - placeBlockAtCurrentPosition(world, Blocks.stone_button, 3, 7, 6, 10, box); - fillWithMetadataBlocks(world, box, 8, 6, 9, 8, 7, 9, ModBlocks.steel_corner, decoMetaW); - placeBlockAtCurrentPosition(world, ModBlocks.tape_recorder, decoMetaN, 9, 6, 9, box); - fillWithMetadataBlocks(world, box, 10, 6, 9, 10, 7, 9, ModBlocks.steel_corner, decoMetaN); - placeBlockAtCurrentPosition(world, ModBlocks.cm_block, 0, 11, 6, 9, box); - placeBlockAtCurrentPosition(world, ModBlocks.tape_recorder, decoMetaN, 11, 7, 9, box); - fillWithMetadataBlocks(world, box, 12, 6, 9, 12, 7, 9, ModBlocks.steel_wall, decoMetaW); - placeBlockAtCurrentPosition(world, Blocks.stone_button, 3, 11, 6, 10, box); - placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaN, 5, 5, 11, box); //chairs and computers - placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaN, 8, 5, 12, box); - placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaE, 10, 5, 11, box); - placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 6, 6, 10, box); - placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 7, 5, 12, box); - placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 10, 5, 10, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, decoModelMetaE, 7, 6, 11, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, decoModelMetaW, 11, 6, 11, box); - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaE | 4, 14, 5, 13, box); //table - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaW | 4, 15, 5, 13, box); - placeBlockAtCurrentPosition(world, Blocks.oak_stairs, stairMetaS, 15, 5, 11, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_pipe_rim, 0, 15, 5, 9, box); - //loot - generateInvContents(world, box, rand, ModBlocks.filing_cabinet, decoModelMetaS | 1, 9, 7, 9, HbmChestContents.filingCabinet, 3); - generateInvContents(world, box, rand, Blocks.chest, decoMetaS, 14, 6, 13, HbmChestContents.modGeneric, 3); - //upper floor - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaW | 4, 15, 7, 5, box); //desks - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaE | 4, 15, 7, 4, box); - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaS | 4, 15, 7, 2, box); - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaW | 4, 15, 7, 1, box); - placeBlockAtCurrentPosition(world, Blocks.wooden_slab, 0, 13, 7, 2, box); - placeBlockAtCurrentPosition(world, Blocks.wooden_slab, 0, 14, 7, 4, box); - placeBlockAtCurrentPosition(world, ModBlocks.deco_computer, decoModelMetaW, 15, 8, 4, box); - for(int i = 3; i <= 9; i+=6) { //hazmat tables - fillWithMetadataBlocks(world, box, i, 7, 3, i, 7, 5, ModBlocks.concrete_asbestos_stairs, stairMetaW | 4); - placeBlockAtCurrentPosition(world, ModBlocks.concrete_asbestos_stairs, stairMetaN | 4, i+1, 7, 3, box); - fillWithMetadataBlocks(world, box, i+2, 7, 3, i+2, 7, 5, ModBlocks.concrete_asbestos_stairs, stairMetaE | 4); - fillWithMetadataBlocks(world, box, i+1, 7, 4, i+1, 7, 5, ModBlocks.concrete_colored_ext, 5); - } - placeBlockAtCurrentPosition(world, ModBlocks.block_electrical_scrap, 0, 10, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.crate_lead, 0, 4, 8, 4, box); - fillWithMetadataBlocks(world, box, 6, 7, 5, 8, 7, 5, ModBlocks.cm_block, 1); //machine - placeBlockAtCurrentPosition(world, ModBlocks.cm_circuit, 2, 6, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_port, 1, 7, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_circuit, 2, 8, 8, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_sheet, 1, 6, 9, 5, box); - placeBlockAtCurrentPosition(world, Blocks.redstone_lamp, 0, 7, 9, 5, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_sheet, 1, 8, 9, 5, box); - placeBlockAtCurrentPosition(world, Blocks.lever, 4, 7, 8, 4, box); - placeBlockAtCurrentPosition(world, ModBlocks.geiger, decoMetaE, 6, 7, 4, box); //geiger - if(rand.nextInt(2) == 0) - placeBlockAtCurrentPosition(world, ModBlocks.crate_metal, 0, 6, 7, 1, box); - else - placeRandomBobble(world, box, rand, 6, 7, 1 ); - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaS | 4, 1, 7, 1, box); //desk - placeBlockAtCurrentPosition(world, Blocks.birch_stairs, stairMetaE | 4, 2, 7, 1, box); - placeBlockAtCurrentPosition(world, Blocks.wooden_slab, 0, 1, 7, 3, box); - placeBlockAtCurrentPosition(world, Blocks.flower_pot, 0, 2, 8, 1, box); - placeBlockAtCurrentPosition(world, ModBlocks.crate_lead, 0, 1, 7, 5, box); - //loot - generateInvContents(world, box, rand, ModBlocks.crate_iron, 8, 7, 3, HbmChestContents.nuclearFuel, 8); - generateInvContents(world, box, rand, ModBlocks.crate_iron, 2, 7, 5, HbmChestContents.nukeTrash, 6); - //other crate - placeBlockAtCurrentPosition(world, ModBlocks.crate_lead, 0, 2, 8, 5, box); - - break; - } - - //webs - randomlyFillWithBlocks(world, box, rand, 0.15F, 0, 6, 7, 10, 8, 7, Blocks.web); - randomlyFillWithBlocks(world, box, rand, 0.4F, 11, 5, 7, 11, 9, 7, Blocks.web); - randomlyFillWithBlocks(world, box, rand, 0.4F, 16, 5, 7, 16, 9, 7, Blocks.web); - - placeWebs(world, box, rand, 1, 5, 9, 15, 7, 13, 0.10F, 0.01F); - placeWebs(world, box, rand, 13, 7, 6, 14, 8, 8, 0.20F, 0F); - placeWebs(world, box, rand, 1, 7, 1, 15, 9, 5, 0.10F, 0.01F); - - //test - //plan is: biome-dependent overgrowth, integrated neatly - /*generateShrubs(world, box, rand, 0, 0, 16, 1, 4); - generateShrubs(world, box, rand, 0, 13, 16, 14, 2); - generateShrubs(world, box, rand, 0, 4, 16, 8, 2);*/ - - - return true; - } - - protected void placeWebs(World world, StructureBoundingBox box, Random rand, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, float chance, float bigWebChance) { - 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); - - if(world.getBlock(posX, posY, posZ) == Blocks.web) continue; - - boolean onWall = (x == minX || x == maxX || z == minZ || z == maxZ); - boolean onCeiling = (y == minY || y == maxY); //floor or ceiling, really - //this will go over the subchunk boundaries, but trees already do that all the time; it's only really an issue if it causes updates or - //goes over the 2x2 chunk area entirely - if(onWall && onCeiling && rand.nextFloat() <= bigWebChance) { - - for(int j = Math.max(minY, y - 1); j <= Math.min(maxY, y + 1); j++) { //on one hand, eugh. on the other, good-looking webs! - int fac = 2 - Math.abs(j - y); //rounds out the edges with distance from starting block - - int maxI = Math.min(maxX, x + 1); - for(int i = Math.max(minX, x - 1); i <= maxI; i++) { - - int maxK = Math.min(maxZ, z + 1); - for(int k = Math.max(minZ, z - 1); k <= maxK; k++) { - int posI = getXWithOffset(i, k); - int posJ = getYWithOffset(j); - int posK = getZWithOffset(i, k); - - if(world.isAirBlock(posI, posJ, posK) && (Math.abs(i - x) != fac || Math.abs(k - z) != fac || rand.nextInt(3) == 0)) - world.setBlock(posI, posJ, posK, Blocks.web, 0, 2); - - } - } - } - } else if((onWall || onCeiling) && world.isAirBlock(posX, posY, posZ) && rand.nextFloat() <= chance) - world.setBlock(posX, posY, posZ, Blocks.web, 0, 2); - } - } - } - } - } - - /*protected void generateShrubs(World world, StructureBoundingBox box, Random rand, int minX, int minZ, int maxX, int maxZ, int startY) { - int startX = Math.min(this.getXWithOffset(minX, minZ), this.getXWithOffset(maxX, maxZ)); - int startZ = Math.min(this.getZWithOffset(minX, minZ), this.getZWithOffset(maxX, maxZ)); - int endX = Math.max(this.getXWithOffset(minX, minZ), this.getXWithOffset(maxX, maxZ)) - startX; - int endZ = Math.max(this.getZWithOffset(minX, minZ), this.getZWithOffset(maxX, maxZ)) - startZ; - - int attempts = rand.nextInt(2); - WorldGenShrub shrub = new WorldGenShrub(0, 0); - - for(int i = 0; i < attempts; i++) { - int posX = startX + rand.nextInt(endX <= 0 ? 1 : endX); - int posY = this.getYWithOffset(startY); - int posZ = startZ + rand.nextInt(endZ <= 0 ? 1 : endZ); - - if(box.isVecInside(posX, posY, posZ)) { - int brake = 0; - - do { - Block block = world.getBlock(posX, posY, posZ); - - if(!((block.isAir(world, posX, posY, posZ) || block.isFoliage(world, posX, posY, posZ) || block.isLeaves(world, posX, posY, posZ)) && posY > 0)) { - shrub.generate(world, rand, posX, posY, posZ); - break; - } - - posY--; - } while(brake++ <= 15); - } - } - }*/ - } - - //the block selector in general is kinda mid, i might just replace it entirely - public static class DirtyGlass extends StructureComponent.BlockSelector { - protected boolean webs; - protected float chance; - protected int meta; //argh - - public DirtyGlass(BiomeGenBase biome, float chance, boolean webs) { - if(BiomeDictionary.isBiomeOfType(biome, Type.COLD)) - this.meta = 8; //fogged-up - else if(NTMWorldGenerator.doesBiomeHaveTypes(biome, Type.WASTELAND, Type.JUNGLE, Type.SANDY, Type.SAVANNA, Type.SWAMP)) - this.meta = 12; //super dirty - else - this.meta = 7; //dirty - - this.field_151562_a = Blocks.stained_glass_pane; - this.chance = chance; - this.webs = webs; - } - - @Override - public void selectBlocks(Random rand, int posX, int posY, int posZ, boolean notInterior) { - if(rand.nextFloat() <= chance) { - this.selectedBlockMetaData = 0; - if(webs && rand.nextInt(3) == 0) - this.field_151562_a = Blocks.web; - else - this.field_151562_a = Blocks.air; - } else { - this.field_151562_a = Blocks.stained_glass_pane; - this.selectedBlockMetaData = meta; - } - } - } -} \ No newline at end of file diff --git a/src/main/java/com/hbm/world/gen/component/Component.java b/src/main/java/com/hbm/world/gen/component/Component.java index e11e5aca5..f1263b23a 100644 --- a/src/main/java/com/hbm/world/gen/component/Component.java +++ b/src/main/java/com/hbm/world/gen/component/Component.java @@ -436,22 +436,6 @@ abstract public class Component extends StructureComponent { } } - protected void placeLootBlock(World world, StructureBoundingBox box, Random rand, int featureX, int featureY, int featureZ, ItemStack stack) { - int posX = this.getXWithOffset(featureX, featureZ); - int posY = this.getYWithOffset(featureY); - int posZ = this.getZWithOffset(featureX, featureZ); - - if(!box.isVecInside(posX, posY, posZ)) return; - - world.setBlock(posX, posY, posZ, ModBlocks.deco_loot, 0, 2); - - TileEntityLoot loot = (TileEntityLoot) world.getTileEntity(posX, posY, posZ); - - if(loot != null && loot.items.isEmpty()) { - loot.addItem(stack, rand.nextGaussian() * 0.02, 0, rand.nextGaussian() * 0.02); - } - } - /** * Places random bobblehead with a randomized orientation at specified location */ diff --git a/src/main/java/com/hbm/world/gen/component/RuinFeatures.java b/src/main/java/com/hbm/world/gen/component/RuinFeatures.java index ff494c6b0..914b01b7e 100644 --- a/src/main/java/com/hbm/world/gen/component/RuinFeatures.java +++ b/src/main/java/com/hbm/world/gen/component/RuinFeatures.java @@ -3,10 +3,8 @@ package com.hbm.world.gen.component; import java.util.Random; import com.hbm.blocks.ModBlocks; -import com.hbm.lib.HbmChestContents; import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraft.world.gen.structure.MapGenStructureIO; import net.minecraft.world.gen.structure.StructureBoundingBox; @@ -20,21 +18,6 @@ public class RuinFeatures { MapGenStructureIO.func_143031_a(NTMRuin4.class, "NTMRuin4"); } - public static void placeBook(World world, StructureBoundingBox box, Random rand, int minX, int minZ, int maxX, int maxZ, Component com) { - int i = minX + rand.nextInt(maxX); - int j = minZ + rand.nextInt(maxZ); - - int posX = com.getXWithOffset(i, j); - int posZ = com.getZWithOffset(i, j); - - if(box.isVecInside(posX, 64, posZ)) { - int topHeight = world.getTopSolidOrLiquidBlock(posX, posZ); - - ItemStack book = HbmChestContents.generateRuinBook(rand, posX >> 4, posZ >> 4); - com.placeLootBlock(world, box, rand, i, topHeight - com.getBoundingBox().minY, j, book); - } - } - public static class NTMRuin1 extends Component { private static ConcreteBricks RandomConcreteBricks = new ConcreteBricks(); @@ -103,9 +86,6 @@ public class RuinFeatures { this.randomlyFillWithBlocks(world, box, rand, 0.25F, 1, 0, 1, 8 - 1, 0, 10 - 1, Blocks.gravel, Blocks.air, false); - if(rand.nextInt(3) == 0) //it's all in one chunk so it's fine - placeBook(world, box, rand, 1, 1, 7, 9, this); - return true; } } @@ -226,9 +206,6 @@ public class RuinFeatures { 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); - if(rand.nextInt(3) == 0) - placeBook(world, box, rand, 1, 5, 7, 9, this); - return true; } } @@ -290,9 +267,6 @@ public class RuinFeatures { 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, 10 - 1, 0, 11 - 1, Blocks.gravel, Blocks.air, false); - if(rand.nextInt(3) == 0) - placeBook(world, box, rand, 1, 1, 4, 10, this); - return true; } } diff --git a/src/main/java/com/hbm/world/gen/component/SpecialFeatures.java b/src/main/java/com/hbm/world/gen/component/SpecialFeatures.java deleted file mode 100644 index 7664f2b6e..000000000 --- a/src/main/java/com/hbm/world/gen/component/SpecialFeatures.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.hbm.world.gen.component; - -import java.util.Random; - -import com.hbm.blocks.ModBlocks; - -import net.minecraft.block.Block; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.gen.structure.MapGenStructureIO; -import net.minecraft.world.gen.structure.StructureBoundingBox; - -public class SpecialFeatures { - - public static void registerComponents() { - MapGenStructureIO.func_143031_a(SpecialContainer.class, "NTMSpecialContainer"); - } - - public static class SpecialContainer extends Component { - - public SpecialContainer() { - - } - - public SpecialContainer(Random rand, int minX, int minY, int minZ) { - super(rand, minX, minY, minZ, 3, 3, 9); - - } - - @Override - public boolean addComponentParts(World world, Random rand, StructureBoundingBox box) { - - if(hpos == -1 && !this.setAverageHeight(world, box, this.boundingBox.minY)) { - return false; - } - - fillWithAir(world, box, 1, 1, 1, 2, 2, 8); - - //floor - fillWithBlocks(world, box, 0, 0, 0, 3, 0, 1, ModBlocks.deco_steel); - fillWithBlocks(world, box, 1, 0, 2, 2, 0, 7, ModBlocks.deco_steel); - fillWithBlocks(world, box, 0, 0, 8, 3, 0, 9, ModBlocks.deco_steel); - fillWithBlocks(world, box, 1, 0, 1, 2, 0, 1, ModBlocks.cm_block); - fillWithBlocks(world, box, 1, 0, 8, 2, 0, 8, ModBlocks.cm_block); - //roof - fillWithBlocks(world, box, 0, 3, 0, 3, 3, 9, ModBlocks.deco_steel); - placeBlockAtCurrentPosition(world, ModBlocks.cm_block, 0, 0, 3, 2, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_block, 0, 3, 3, 2, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_block, 0, 0, 3, 7, box); - placeBlockAtCurrentPosition(world, ModBlocks.cm_block, 0, 3, 3, 7, box); - //walls - fillWithBlocks(world, box, 0, 1, 0, 0, 2, 0, ModBlocks.deco_steel); - fillWithBlocks(world, box, 0, 1, 1, 0, 2, 8, ModBlocks.cm_sheet); - fillWithBlocks(world, box, 0, 1, 9, 0, 2, 9, ModBlocks.deco_steel); - fillWithBlocks(world, box, 1, 1, 9, 2, 2, 9, ModBlocks.cm_sheet); - fillWithBlocks(world, box, 3, 1, 9, 3, 2, 9, ModBlocks.deco_steel); - fillWithBlocks(world, box, 3, 1, 1, 3, 2, 8, ModBlocks.cm_sheet); - fillWithBlocks(world, box, 3, 1, 0, 3, 2, 0, ModBlocks.deco_steel); - //doors - placeDoor(world, box, ModBlocks.door_metal, 1, false, false, 2, 1, 0); - placeDoor(world, box, ModBlocks.door_metal, 1, true, false, 1, 1, 0); - - return true; - } - - @Override - protected boolean setAverageHeight(World world, StructureBoundingBox box, int y) { - - int total = 0; - int iterations = 0; - - for(int z = this.boundingBox.minZ; z <= this.boundingBox.maxZ; z++) { - for(int x = this.boundingBox.minX; x <= this.boundingBox.maxX; x++) { - if(box.isVecInside(x, y, z)) { - total += Math.max(world.getTopSolidOrLiquidBlock(x, z), 1); // underwater :3c - iterations++; - } - } - } - - if(iterations == 0) - return false; - - this.hpos = total / iterations; //finds mean of every block in bounding box - this.boundingBox.offset(0, this.hpos - this.boundingBox.minY, 0); - return true; - } - } -} diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 3f50734d1..05365875c 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -451,12 +451,6 @@ book_lore.beacon.page.9=Once the desired peer has responded, give the "ACCEPT CO book_lore.beacon.page.10=using the FAR-5M standard. Communication will end immediately if no standard has been negotiated, serving as a "ping". Should communication continue, the connection can be ended using another long single tone "END CONNECTION". book_lore.beacon.page.11=Chapter 5: Warranty $ [ page intentionally left blank ] -book_lore.ruin_special.name=Detection Printout -book_lore.ruin_special.page.0=§lDETECTION $ ----------------- $ DIST: %1$s km $ THETA: %2$s° $ PROGNOSIS $ %3$s -book_lore.ruin_special.low=Low-confidence detection. Distance is large and imprecise; high chance of interference. -book_lore.ruin_special.med=Medium-confidence detection. Chance of interference is low; further investigation recommended. -book_lore.ruin_special.high=High-confidence detection. Location precisely triangulated by sensors; expedition urgently recommended. - cannery.f1=[ Press F1 for help ] cannery.centrifuge=Gas Centrifuge