From 72c0c2f2ac9223c9cf22d9fa8dcaffa4fdbeaac1 Mon Sep 17 00:00:00 2001 From: Vaern Date: Sat, 24 Sep 2022 18:52:46 -0700 Subject: [PATCH] LargeOfficeCorner, two more structure wands i would like to reiterate: bob i could kiss you --- src/main/java/com/hbm/items/ModItems.java | 6 + .../hbm/items/tool/ItemStructurePattern.java | 10 +- .../items/tool/ItemStructureRandomized.java | 47 ++++ .../hbm/items/tool/ItemStructureRandomly.java | 51 ++++ .../hbm/items/tool/ItemStructureSingle.java | 10 +- .../hbm/items/tool/ItemStructureSolid.java | 15 +- .../com/hbm/items/tool/ItemStructureTool.java | 34 ++- src/main/java/com/hbm/lib/HbmWorld.java | 1 + .../hbm/world/worldgen/MapGenNTMFeatures.java | 9 +- .../worldgen/components/OfficeFeatures.java | 224 ++++++++++++++++++ .../textures/items/structure_randomized.png | Bin 0 -> 224 bytes .../hbm/textures/items/structure_randomly.png | Bin 0 -> 225 bytes 12 files changed, 391 insertions(+), 16 deletions(-) create mode 100644 src/main/java/com/hbm/items/tool/ItemStructureRandomized.java create mode 100644 src/main/java/com/hbm/items/tool/ItemStructureRandomly.java create mode 100644 src/main/resources/assets/hbm/textures/items/structure_randomized.png create mode 100644 src/main/resources/assets/hbm/textures/items/structure_randomly.png diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index b0b5c08ac..0be9a8f18 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -2321,6 +2321,8 @@ public class ModItems { public static Item structure_single; public static Item structure_solid; public static Item structure_pattern; + public static Item structure_randomized; + public static Item structure_randomly; public static Item rod_of_discord; @@ -4749,6 +4751,8 @@ public class ModItems { structure_single = new ItemStructureSingle().setUnlocalizedName("structure_single").setMaxStackSize(1).setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":structure_single"); structure_solid = new ItemStructureSolid().setUnlocalizedName("structure_solid").setMaxStackSize(1).setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":structure_solid"); structure_pattern = new ItemStructurePattern().setUnlocalizedName("structure_pattern").setMaxStackSize(1).setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":structure_pattern"); + structure_randomized = new ItemStructureRandomized().setUnlocalizedName("structure_randomized").setMaxStackSize(1).setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":structure_randomized"); + structure_randomly = new ItemStructureRandomly().setUnlocalizedName("structure_randomly").setMaxStackSize(1).setCreativeTab(null).setFull3D().setTextureName(RefStrings.MODID + ":structure_randomly"); rod_of_discord = new ItemDiscord().setUnlocalizedName("rod_of_discord").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":rod_of_discord"); @@ -8111,6 +8115,8 @@ public class ModItems { GameRegistry.registerItem(structure_single, structure_single.getUnlocalizedName()); GameRegistry.registerItem(structure_solid, structure_solid.getUnlocalizedName()); GameRegistry.registerItem(structure_pattern, structure_pattern.getUnlocalizedName()); + GameRegistry.registerItem(structure_randomized, structure_randomized.getUnlocalizedName()); + GameRegistry.registerItem(structure_randomly, structure_randomly.getUnlocalizedName()); GameRegistry.registerItem(rod_of_discord, rod_of_discord.getUnlocalizedName()); //GameRegistry.registerItem(analyzer, analyzer.getUnlocalizedName()); //GameRegistry.registerItem(remote, remote.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/tool/ItemStructurePattern.java b/src/main/java/com/hbm/items/tool/ItemStructurePattern.java index 9fa41ace7..f65d4c80a 100644 --- a/src/main/java/com/hbm/items/tool/ItemStructurePattern.java +++ b/src/main/java/com/hbm/items/tool/ItemStructurePattern.java @@ -29,7 +29,8 @@ public class ItemStructurePattern extends ItemStructureTool { BlockPos pos = this.getAnchor(stack); if(pos == null) return; - + + String message = ""; int savedX = stack.stackTagCompound.getInteger("x"); int savedY = stack.stackTagCompound.getInteger("y"); int savedZ = stack.stackTagCompound.getInteger("z"); @@ -47,10 +48,13 @@ 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()); - - System.out.println("this.placeBlockAtCurrentPosition(world, " + b.getUnlocalizedName() + ", " + meta + ", " + ix + ", " + iy + ", " + iz + ", box)"); + + message.concat("placeBlockAtCurrentPosition(world, " + b.getUnlocalizedName() + ", " + meta + ", " + ix + ", " + iy + ", " + iz + ", box);\n"); } } } + + System.out.print(message); + writeToFile(message); } } diff --git a/src/main/java/com/hbm/items/tool/ItemStructureRandomized.java b/src/main/java/com/hbm/items/tool/ItemStructureRandomized.java new file mode 100644 index 000000000..484c6451e --- /dev/null +++ b/src/main/java/com/hbm/items/tool/ItemStructureRandomized.java @@ -0,0 +1,47 @@ +package com.hbm.items.tool; + +import java.util.List; + +import com.hbm.util.fauxpointtwelve.BlockPos; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +public class ItemStructureRandomized extends ItemStructureTool { + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { + super.addInformation(stack, player, list, ext); + list.add(EnumChatFormatting.YELLOW + "Click to print a "); + list.add(EnumChatFormatting.YELLOW + "line with block selector."); + } + + @Override + protected boolean dualUse() { + return true; + } + + @Override + protected void doTheThing(ItemStack stack, World world, int x, int y, int z) { + + BlockPos pos = this.getAnchor(stack); + if(pos == null) return; + + int savedX = stack.stackTagCompound.getInteger("x"); + int savedY = stack.stackTagCompound.getInteger("y"); + int savedZ = stack.stackTagCompound.getInteger("z"); + + int minX = Math.min(savedX, x) - pos.getX(); + int minY = Math.min(savedY, y) - pos.getY(); + int minZ = Math.min(savedZ, z) - pos.getZ(); + int maxX = Math.max(savedX, x) - pos.getX(); + int maxY = Math.max(savedY, y) - pos.getY(); + int maxZ = Math.max(savedZ, z) - pos.getZ(); + + String message = "fillWithRandomizedBlocks(world, box, " + minX + ", " + minY + ", " + minZ + ", " + maxX + ", " + maxY + ", " + maxZ + ", rand, );\n"; + System.out.print(message); + writeToFile(message); + } +} diff --git a/src/main/java/com/hbm/items/tool/ItemStructureRandomly.java b/src/main/java/com/hbm/items/tool/ItemStructureRandomly.java new file mode 100644 index 000000000..e3b1626bf --- /dev/null +++ b/src/main/java/com/hbm/items/tool/ItemStructureRandomly.java @@ -0,0 +1,51 @@ +package com.hbm.items.tool; + +import java.util.List; + +import com.hbm.util.fauxpointtwelve.BlockPos; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +public class ItemStructureRandomly extends ItemStructureTool { + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { + super.addInformation(stack, player, list, ext); + list.add(EnumChatFormatting.YELLOW + "Click to print a "); + list.add(EnumChatFormatting.YELLOW + "line with the targeted block."); + } + + @Override + protected boolean dualUse() { + return true; + } + + @Override + protected void doTheThing(ItemStack stack, World world, int x, int y, int z) { + + BlockPos pos = this.getAnchor(stack); + if(pos == null) return; + + int savedX = stack.stackTagCompound.getInteger("x"); + int savedY = stack.stackTagCompound.getInteger("y"); + int savedZ = stack.stackTagCompound.getInteger("z"); + + int minX = Math.min(savedX, x) - pos.getX(); + int minY = Math.min(savedY, y) - pos.getY(); + int minZ = Math.min(savedZ, z) - pos.getZ(); + int maxX = Math.max(savedX, x) - pos.getX(); + int maxY = Math.max(savedY, y) - pos.getY(); + int maxZ = Math.max(savedZ, z) - pos.getZ(); + //Assumes the last selected block is the one that all of them are. + Block b = world.getBlock(x, y, z); + + String line = "randomlyFillWithBlocks(world, box, rand, , " + minX + ", " + minY + ", " + minZ + ", " + maxX + ", " + maxY + ", " + maxZ + ", " + b.getUnlocalizedName() + ");\n"; + System.out.print(line); + writeToFile(line); + } + +} diff --git a/src/main/java/com/hbm/items/tool/ItemStructureSingle.java b/src/main/java/com/hbm/items/tool/ItemStructureSingle.java index b35974d32..e20e10c45 100644 --- a/src/main/java/com/hbm/items/tool/ItemStructureSingle.java +++ b/src/main/java/com/hbm/items/tool/ItemStructureSingle.java @@ -26,12 +26,14 @@ public class ItemStructureSingle extends ItemStructureTool { if(pos == null) return; int ix = x - pos.getX(); - int iy = y - pos.getX(); - int iz = z - pos.getX(); + int iy = y - pos.getY(); + int iz = z - pos.getZ(); Block b = world.getBlock(x, y, z); int meta = world.getBlockMetadata(x, y, z); - - System.out.println("this.placeBlockAtCurrentPosition(world, " + b.getUnlocalizedName() + ", " + meta + ", " + x + ", " + y + ", " + z + ", box)"); + + String message = "placeBlockAtCurrentPosition(world, " + b.getUnlocalizedName() + ", " + meta + ", " + ix + ", " + iy + ", " + iz + ", box);\n"; + System.out.print(message); + writeToFile(message); } } diff --git a/src/main/java/com/hbm/items/tool/ItemStructureSolid.java b/src/main/java/com/hbm/items/tool/ItemStructureSolid.java index 8267f96b8..9263e71ec 100644 --- a/src/main/java/com/hbm/items/tool/ItemStructureSolid.java +++ b/src/main/java/com/hbm/items/tool/ItemStructureSolid.java @@ -4,6 +4,7 @@ import java.util.List; import com.hbm.util.fauxpointtwelve.BlockPos; +import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; @@ -14,7 +15,7 @@ public class ItemStructureSolid extends ItemStructureTool { @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { super.addInformation(stack, player, list, ext); - list.add(EnumChatFormatting.YELLOW + "Click to print a "); + list.add(EnumChatFormatting.YELLOW + "Click to print a or "); list.add(EnumChatFormatting.YELLOW + "line with wildcard block and metadata."); } @@ -39,7 +40,17 @@ public class ItemStructureSolid extends ItemStructureTool { int maxX = Math.max(savedX, x) - pos.getX(); int maxY = Math.max(savedY, y) - pos.getY(); int maxZ = Math.max(savedZ, z) - pos.getZ(); + //Assumes the last selected block is the one that all of them are. + Block b = world.getBlock(x, y, z); + int meta = world.getBlockMetadata(x, y, z); - System.out.println("this.fillWithMetadataBlocks(world, box, " + minX + ", " + minY + ", " + minZ + ", " + maxX + ", " + maxY + ", " + maxZ + ", , , Blocks.air, 0, false)"); + String line; + if(meta > 0) + line = "fillWithMetadataBlocks(world, box, " + minX + ", " + minY + ", " + minZ + ", " + maxX + ", " + maxY + ", " + maxZ + ", " + b.getUnlocalizedName() +", " + meta +");\n"; + else + line = "fillWithBlocks(world, box, " + minX + ", " + minY + ", " + minZ + ", " + maxX + ", " + maxY + ", " + maxZ + ", " + b.getUnlocalizedName() +");\n"; + + System.out.print(line); + writeToFile(line); } } diff --git a/src/main/java/com/hbm/items/tool/ItemStructureTool.java b/src/main/java/com/hbm/items/tool/ItemStructureTool.java index c72f6a392..62e43b03c 100644 --- a/src/main/java/com/hbm/items/tool/ItemStructureTool.java +++ b/src/main/java/com/hbm/items/tool/ItemStructureTool.java @@ -1,10 +1,15 @@ package com.hbm.items.tool; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; import java.util.ArrayList; import java.util.List; import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.ModBlocks; +import com.hbm.config.GeneralConfig; +import com.hbm.main.MainRegistry; import com.hbm.util.fauxpointtwelve.BlockPos; import net.minecraft.block.Block; @@ -19,13 +24,33 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; public abstract class ItemStructureTool extends Item implements ILookOverlay { + File file = new File(MainRegistry.configHbmDir, "structureOutput.txt"); + FileWriter writer; + + public void writeToFile(String message) { + if(!GeneralConfig.enableDebugMode) + return; + + try { + if(!file.exists()) file.createNewFile(); + if(writer == null) writer = new FileWriter(file, true); + + writer.write(message); + writer.flush(); + } catch(IOException e) { + System.out.print("ItemStructureWand encountered an IOException!"); + } + } + @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { BlockPos anchor = this.getAnchor(stack); - if(anchor == null) { + if(anchor == null) list.add(EnumChatFormatting.RED + "No anchor set! Right click an anchor to get started."); - } + + if(GeneralConfig.enableDebugMode) + list.add(EnumChatFormatting.GREEN + "Will write to \"structureOutput.txt\" in hbmConfig."); } public static BlockPos getAnchor(ItemStack stack) { @@ -62,7 +87,7 @@ public abstract class ItemStructureTool extends Item implements ILookOverlay { return false; } - if(!this.dualUse()) { + if(!this.dualUse() && world.isRemote) { this.doTheThing(stack, world, x, y, z); } else { @@ -71,7 +96,8 @@ public abstract class ItemStructureTool extends Item implements ILookOverlay { stack.stackTagCompound.setInteger("y", y); stack.stackTagCompound.setInteger("z", z); } else { - this.doTheThing(stack, world, x, y, z); + if(world.isRemote) + this.doTheThing(stack, world, x, y, z); stack.stackTagCompound.removeTag("x"); stack.stackTagCompound.removeTag("y"); stack.stackTagCompound.removeTag("z"); diff --git a/src/main/java/com/hbm/lib/HbmWorld.java b/src/main/java/com/hbm/lib/HbmWorld.java index 4f2c9444f..fae367daf 100644 --- a/src/main/java/com/hbm/lib/HbmWorld.java +++ b/src/main/java/com/hbm/lib/HbmWorld.java @@ -48,5 +48,6 @@ public class HbmWorld { MapGenStructureIO.func_143031_a(BasicHelipad.class, "NTMBasicHelipad"); MapGenStructureIO.func_143031_a(RadioShack.class, "NTMRadioShack"); MapGenStructureIO.func_143031_a(LargeOffice.class, "NTMLargeOffice"); + MapGenStructureIO.func_143031_a(LargeOfficeCorner.class, "NTMLargeOfficeCorner"); } } diff --git a/src/main/java/com/hbm/world/worldgen/MapGenNTMFeatures.java b/src/main/java/com/hbm/world/worldgen/MapGenNTMFeatures.java index 7045891e0..5e6b70789 100644 --- a/src/main/java/com/hbm/world/worldgen/MapGenNTMFeatures.java +++ b/src/main/java/com/hbm/world/worldgen/MapGenNTMFeatures.java @@ -109,7 +109,7 @@ 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.nextBoolean()) { //Empty Ruin Structures + 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); @@ -141,11 +141,11 @@ public class MapGenNTMFeatures extends MapGenStructure { NTMWorkshop1 workshop1 = new NTMWorkshop1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8); this.components.add(workshop1); - } else if(biome.heightVariation <= 0.2 && biome.rainfall <= 0.5 && !(biome instanceof BiomeGenBeach) && rand.nextInt(3) == 0) { //Everything except jungles, extra-hilly areas, and beaches + } else if(biome.heightVariation <= 0.2 && biome.rainfall <= 0.5 && !(biome instanceof BiomeGenBeach) && rand.nextInt(5) == 0) { //Everything except jungles, extra-hilly areas, and beaches MilitaryBaseFeatures.smallHelipad(components, chunkX, posY, chunkZ, rand); //agggggggg } else { //Everything else - switch(rand.nextInt(3)) { + switch(rand.nextInt(4)) { case 0: NTMLab2 lab2 = new NTMLab2(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8); this.components.add(lab2); break; @@ -155,6 +155,9 @@ public class MapGenNTMFeatures extends MapGenStructure { case 2: LargeOffice office = new LargeOffice(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8); this.components.add(office); break; + case 3: + LargeOfficeCorner officeCorner = new LargeOfficeCorner(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8); + this.components.add(officeCorner); break; } } diff --git a/src/main/java/com/hbm/world/worldgen/components/OfficeFeatures.java b/src/main/java/com/hbm/world/worldgen/components/OfficeFeatures.java index ebcdeb079..b0244cf84 100644 --- a/src/main/java/com/hbm/world/worldgen/components/OfficeFeatures.java +++ b/src/main/java/com/hbm/world/worldgen/components/OfficeFeatures.java @@ -217,4 +217,228 @@ public class OfficeFeatures { } + //bob i could kiss you + public static class LargeOfficeCorner extends Feature { + + private static ConcreteBricks ConcreteBricks = new ConcreteBricks(); + + public LargeOfficeCorner() { + super(); + } + + public LargeOfficeCorner(Random rand, int minX, int minY, int minZ) { + super(rand, minX, minY, minZ, 11, 15, 14); + } + + @Override + public boolean addComponentParts(World world, Random rand, StructureBoundingBox box) { + + if(!this.setAverageHeight(world, box, this.boundingBox.minY)) { + return true; + } + + this.boundingBox.offset(0, -1, 0); + + int pillarMetaWE = getPillarMeta(4); + int pillarMetaNS = getPillarMeta(8); + + placeFoundationUnderneath(world, Blocks.stonebrick, 0, 4, 0, 11, 2, -1, box); + placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 3, 11, 13, -1, box); + placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 14, 4, 14, -1, box); + placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 10, 0, 13, -1, box); + + fillWithAir(world, box, 1, 1, 11, 3, 12, 13); + fillWithAir(world, box, 4, 1, 4, 10, 12, 12); + fillWithAir(world, box, 2, 1, 4, 3, 12, 10); + fillWithAir(world, box, 5, 1, 1, 10, 12, 2); + fillWithAir(world, box, 5, 13, 1, 8, 14, 2); + + //Back Wall + fillWithBlocks(world, box, 1, 0, 3, 5, 0, 3, ModBlocks.concrete_pillar); + placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, pillarMetaWE, 6, 0, 3, box); + fillWithBlocks(world, box, 7, 0, 3, 10, 0, 3, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 4, 0, 0, 4, 0, 2, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 5, 0, 0, 11, 0, 0, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 11, 1, 0, 11, 12, 0, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 1, 1, 3, 1, 12, 3, ModBlocks.concrete_pillar); + fillWithRandomizedBlocks(world, box, 4, 1, 0, 10, 12, 0, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 13, 0, 9, 13, 0, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 14, 0, 8, 14, 0, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 15, 0, 7, 15, 0, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 2, 1, 3, 5, 2, 3, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 7, 1, 3, 10, 2, 3, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 2, 3, 3, 10, 7, 3, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 2, 8, 3, 9, 10, 3, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 2, 11, 3, 10, 12, 3, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 13, 3, 4, 14, 3, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 6, 13, 3, 9, 13, 3, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 6, 14, 3, 8, 14, 3, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 15, 3, 7, 15, 3, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 1, 1, 4, 15, 2, rand, ConcreteBricks); + //Right Wall + fillWithBlocks(world, box, 11, 0, 1, 11, 0, 12, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 11, 0, 13, 11, 12, 13, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 11, 1, 3, 11, 7, 3, ModBlocks.concrete_pillar); + fillWithMetadataBlocks(world, box, 11, 4, 1, 11, 4, 2, ModBlocks.concrete_pillar, pillarMetaNS); + fillWithMetadataBlocks(world, box, 11, 8, 1, 11, 8, 12, ModBlocks.concrete_pillar, pillarMetaNS); + fillWithBlocks(world, box, 11, 9, 3, 11, 11, 3, ModBlocks.concrete_pillar); + fillWithMetadataBlocks(world, box, 11, 12, 1, 11, 12, 12, ModBlocks.concrete_pillar, pillarMetaNS); + fillWithRandomizedBlocks(world, box, 11, 9, 1, 11, 11, 2, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 11, 5, 1, 11, 7, 2, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 11, 1, 1, 11, 3, 2, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 11, 1, 4, 11, 7, 12, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 11, 9, 4, 11, 9, 12, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 11, 10, 4, 11, 10, 4, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 11, 10, 8, 11, 10, 8, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 11, 10, 12, 11, 10, 12, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 11, 11, 4, 11, 11, 12, rand, ConcreteBricks); + //Front Wall + fillWithBlocks(world, box, 4, 0, 13, 10, 0, 13, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 4, 0, 14, 4, 12, 14, ModBlocks.concrete_pillar); + placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, 0, 3, 0, 14, box); + fillWithMetadataBlocks(world, box, 1, 0, 14, 2, 0, 14, ModBlocks.concrete_pillar, pillarMetaWE); + fillWithBlocks(world, box, 0, 0, 14, 0, 12, 14, ModBlocks.concrete_pillar); + fillWithRandomizedBlocks(world, box, 4, 1, 13, 10, 1, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 10, 2, 13, 10, 3, 13, rand, ConcreteBricks); + fillWithBlocks(world, box, 9, 2, 13, 9, 3, 13, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 6, 2, 13, 6, 3, 13, ModBlocks.concrete_pillar); + fillWithRandomizedBlocks(world, box, 4, 2, 13, 5, 3, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 4, 13, 10, 5, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 10, 6, 13, 10, 7, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 6, 13, 5, 7, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 8, 13, 10, 9, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 10, 10, 13, 10, 11, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 10, 13, 5, 11, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 12, 13, 10, 12, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 3, 1, 14, 3, 2, 14, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 3, 14, 3, 5, 14, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 8, 14, 3, 9, 14, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 12, 14, 3, 12, 14, rand, ConcreteBricks); + //Left Wall + fillWithMetadataBlocks(world, box, 0, 0, 12, 0, 0, 13, ModBlocks.concrete_pillar, pillarMetaNS); + placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, 0, 0, 0, 11, box); + fillWithBlocks(world, box, 0, 0, 10, 0, 12, 10, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 1, 0, 4, 1, 0, 10, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 1, 0, 3, 1, 12, 3, ModBlocks.concrete_pillar); + fillWithRandomizedBlocks(world, box, 0, 1, 11, 0, 2, 11, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 0, 3, 11, 0, 5, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 0, 8, 11, 0, 9, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 0, 12, 11, 0, 12, 13, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 1, 4, 1, 1, 10, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 2, 9, 1, 3, 10, rand, ConcreteBricks); + fillWithBlocks(world, box, 1, 2, 8, 1, 3, 8, ModBlocks.concrete_pillar); + fillWithBlocks(world, box, 1, 2, 5, 1, 3, 5, ModBlocks.concrete_pillar); + fillWithRandomizedBlocks(world, box, 1, 2, 4, 1, 3, 4, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 4, 4, 1, 5, 10, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 6, 9, 1, 7, 10, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 6, 4, 1, 7, 4, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 8, 4, 1, 9, 10, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 10, 9, 1, 11, 10, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 10, 4, 1, 11, 4, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 1, 12, 4, 1, 12, 10, rand, ConcreteBricks); + + //Floor 1 + fillWithMetadataBlocks(world, box, 5, 0, 1, 10, 0, 2, ModBlocks.concrete_pillar, pillarMetaWE); + placeBlockAtCurrentPosition(world, ModBlocks.concrete_pillar, pillarMetaWE, 6, 0, 3, box); + fillWithMetadataBlocks(world, box, 2, 0, 4, 10, 0, 10, Blocks.planks, 1); + fillWithMetadataBlocks(world, box, 3, 0, 11, 10, 0, 11, Blocks.planks, 1); + fillWithMetadataBlocks(world, box, 4, 0, 12, 10, 0, 12, Blocks.planks, 1); + fillWithMetadataBlocks(world, box, 1, 0, 11, 2, 0, 13, Blocks.wool, 7); //Grey + fillWithMetadataBlocks(world, box, 3, 0, 12, 3, 0, 13, Blocks.wool, 7); + //Floor 2 + fillWithMetadataBlocks(world, box, 5, 4, 1, 5, 4, 3, ModBlocks.concrete_pillar, pillarMetaNS); + fillWithMetadataBlocks(world, box, 2, 4, 4, 10, 4, 12, Blocks.planks, 1); + fillWithMetadataBlocks(world, box, 1, 4, 11, 1, 4, 13, Blocks.planks, 1); + fillWithMetadataBlocks(world, box, 2, 4, 13, 3, 4, 13, Blocks.planks, 1); + //Floor 3 + fillWithMetadataBlocks(world, box, 10, 8, 1, 10, 8, 3, ModBlocks.concrete_pillar, pillarMetaNS); + fillWithMetadataBlocks(world, box, 2, 8, 4, 10, 8, 12, Blocks.planks, 1); + fillWithMetadataBlocks(world, box, 1, 8, 11, 1, 8, 13, Blocks.planks, 1); + fillWithMetadataBlocks(world, box, 2, 8, 13, 3, 8, 13, Blocks.planks, 1); + //Ceiling + fillWithMetadataBlocks(world, box, 5, 12, 1, 5, 12, 2, ModBlocks.concrete_pillar, pillarMetaNS); + fillWithBlocks(world, box, 10, 12, 1, 10, 12, 2, ModBlocks.asphalt); + fillWithBlocks(world, box, 9, 13, 1, 9, 13, 2, ModBlocks.asphalt); + fillWithBlocks(world, box, 8, 14, 1, 8, 14, 2, ModBlocks.asphalt); + fillWithBlocks(world, box, 5, 15, 1, 7, 15, 2, ModBlocks.asphalt); + fillWithBlocks(world, box, 2, 12, 4, 10, 12, 12, ModBlocks.brick_light); + fillWithBlocks(world, box, 1, 12, 11, 1, 12, 13, ModBlocks.brick_light); + fillWithBlocks(world, box, 2, 12, 13, 3, 12, 13, ModBlocks.brick_light); + //Staircase + int EastStairMeta = getStairMeta(1); + int WestStairMeta = getStairMeta(0); + int EastStairMetaUD = EastStairMeta | 4; + int WestStairMetaUD = WestStairMeta | 4; + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMeta, 9, 1, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMetaUD, 8, 1, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMeta, 8, 2, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMetaUD, 7, 2, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMeta, 7, 3, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMetaUD, 6, 3, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMeta, 6, 4, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMetaUD, 6, 4, 2, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMeta, 6, 5, 2, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMetaUD, 7, 5, 2, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMeta, 7, 6, 2, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMetaUD, 8, 6, 2, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMeta, 8, 7, 2, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMetaUD, 9, 7, 2, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMeta, 9, 8, 2, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMetaUD, 9, 8, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMeta, 9, 9, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMetaUD, 8, 9, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMeta, 8, 10, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMetaUD, 7, 10, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMeta, 7, 11, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, WestStairMetaUD, 6, 11, 1, box); + placeBlockAtCurrentPosition(world, Blocks.oak_stairs, EastStairMeta, 6, 12, 1, box); + + //Decoration already? holy fuck it's been like 20 minutes + //Windows + randomlyFillWithBlocks(world, box, rand, 0.75F, 11, 10, 5, 11, 10, 7, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 11, 10, 9, 11, 10, 11, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 7, 2, 13, 8, 3, 13, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 6, 6, 13, 9, 7, 13, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 6, 10, 13, 9, 11, 13, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 1, 6, 14, 3, 7, 14, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 1, 10, 14, 3, 11, 14, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 0, 6, 11, 0, 7, 13, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 0, 10, 11, 0, 11, 13, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 1, 2, 6, 1, 3, 7, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 1, 6, 5, 1, 7, 8, Blocks.glass_pane); + randomlyFillWithBlocks(world, box, rand, 0.75F, 1, 10, 5, 1, 11, 8, Blocks.glass_pane); + //Trim + randomlyFillWithBlocks(world, box, rand, 0.85F, 10, 13, 0, 10, 13, 0, Blocks.stone_slab); + randomlyFillWithBlocks(world, box, rand, 0.85F, 11, 13, 0, 11, 13, 13, Blocks.stone_slab); + randomlyFillWithBlocks(world, box, rand, 0.85F, 4, 13, 13, 10, 13, 13, Blocks.stone_slab); + randomlyFillWithBlocks(world, box, rand, 0.85F, 0, 13, 14, 4, 13, 14, Blocks.stone_slab); + randomlyFillWithBlocks(world, box, rand, 0.85F, 0, 13, 10, 0, 13, 13, Blocks.stone_slab); + randomlyFillWithBlocks(world, box, rand, 0.85F, 1, 13, 3, 1, 13, 10, Blocks.stone_slab); + randomlyFillWithBlocks(world, box, rand, 0.85F, 2, 13, 3, 3, 13, 3, Blocks.stone_slab); + //Interior Walls + fillWithRandomizedBlocks(world, box, 4, 5, 12, 4, 6, 12, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 5, 10, 4, 6, 10, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 7, 10, 4, 7, 12, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 2, 5, 10, 3, 7, 10, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 4, 9, 10, 4, 11, 12, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 2, 11, 10, 3, 11, 10, rand, ConcreteBricks); + fillWithRandomizedBlocks(world, box, 2, 9, 10, 2, 10, 10, rand, ConcreteBricks); + //Doors + placeDoor(world, box, Blocks.wooden_door, 3, 1, 1, 14); + placeDoor(world, box, Blocks.wooden_door, 3, 2, 1, 14); + placeDoor(world, box, Blocks.wooden_door, 0, 0, 1, 12); + placeDoor(world, box, Blocks.wooden_door, 0, 0, 1, 13); + placeDoor(world, box, ModBlocks.door_office, 0, 6, 1, 3); + placeDoor(world, box, ModBlocks.door_office, 0, 5, 5, 3); + placeDoor(world, box, ModBlocks.door_office, 2, 4, 5, 11); + placeDoor(world, box, ModBlocks.door_office, 0, 10, 9, 3); + placeDoor(world, box, ModBlocks.door_office, 1, 3, 9, 10); + placeDoor(world, box, ModBlocks.door_metal, 0, 5, 13, 3); + //Furniture + + return false; + } + } + + } diff --git a/src/main/resources/assets/hbm/textures/items/structure_randomized.png b/src/main/resources/assets/hbm/textures/items/structure_randomized.png new file mode 100644 index 0000000000000000000000000000000000000000..ad04cb3904cb3522f174d0a684575aef04b2ded3 GIT binary patch literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0G|-o|2Kdv5Rkvpp#-FuOM?7@|Nm#Weu@{UmVvXtBeIx*f$uN~Gak=h zkpdJ9^mK6y(Fl(1#evr|0p8%ho|^)^`;7&j>K~hdP&(0}W^JboFyt I=akR{08W-de*gdg literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/items/structure_randomly.png b/src/main/resources/assets/hbm/textures/items/structure_randomly.png new file mode 100644 index 0000000000000000000000000000000000000000..15c8ebcebb72ee900db995f44cfaf1003312d34e GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}c0G|-o|2Kdv5Rkvpp#-FuOM?7@|Nm#Weu@{UmVvXtBeIx*f$tCqGm2_> zH2?*JJY5_^G=gLMP6{$8a4<9f70=~!llgox*3zZkkvWvvN|Q_3OFyIN*9j95R_?94 zl9<$tg$lWPPb*JTmfQAV)@h+T+k7Vezq2IC;bTwC