Merge pull request #2069 from Lazzzycatwastaken/conccoloredcrack

replacing sloppium structure
This commit is contained in:
HbmMods 2025-04-19 17:47:59 +02:00 committed by GitHub
commit cacf041cab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 333 additions and 376 deletions

View File

@ -37,7 +37,7 @@ public class BlockSkeletonHolder extends BlockContainer {
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 3, 2); if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 4, 2); if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2); if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
} } //I hope you change this shit to not be hardcoded because im not doing it
@Override @Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {

View File

@ -7,6 +7,7 @@ import com.hbm.util.fauxpointtwelve.BlockPos;
import api.hbm.block.IToolable; import api.hbm.block.IToolable;
import api.hbm.energymk2.IEnergyReceiverMK2; import api.hbm.energymk2.IEnergyReceiverMK2;
import com.hbm.world.gen.INBTTransformable;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -27,7 +28,7 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
public class Floodlight extends BlockContainer implements IToolable { public class Floodlight extends BlockContainer implements IToolable, INBTTransformable {
public Floodlight(Material mat) { public Floodlight(Material mat) {
super(mat); super(mat);
@ -84,6 +85,50 @@ public class Floodlight extends BlockContainer implements IToolable {
} }
} }
@Override
public int transformMeta(int meta, int coordBaseMode) {
if(meta < 6) {
switch(coordBaseMode) {
case 1: // West
switch(meta) {
case 2: return 5;
case 3: return 4;
case 4: return 2;
case 5: return 3;
}
break;
case 2: // North
switch(meta) {
case 2: return 3;
case 3: return 2;
case 4: return 5;
case 5: return 4;
}
break;
case 3: // East
switch(meta) {
case 2: return 4;
case 3: return 5;
case 4: return 3;
case 5: return 2;
}
break;
}
}
// Also rotate the upper bits that store additional state (6-11)
if(meta >= 6) {
return transformMeta(meta - 6, coordBaseMode) + 6;
}
return meta;
}
@Override
public Block transformBlock(Block block) {
return block; // No block transformation needed
}
public static class TileEntityFloodlight extends TileEntity implements IEnergyReceiverMK2 { public static class TileEntityFloodlight extends TileEntity implements IEnergyReceiverMK2 {
public float rotation; public float rotation;

View File

@ -8,6 +8,7 @@ import com.hbm.inventory.material.Mats;
import com.hbm.items.ItemEnums.EnumCokeType; import com.hbm.items.ItemEnums.EnumCokeType;
import com.hbm.items.machine.ItemCircuit.EnumCircuitType; import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemRTGPelletDepleted;
import com.hbm.items.tool.ItemBlowtorch; import com.hbm.items.tool.ItemBlowtorch;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
@ -26,6 +27,7 @@ public class ItemPoolsComponent {
public static final String POOL_VAULT_LOCKERS = "POOL_VAULT_LOCKERS"; public static final String POOL_VAULT_LOCKERS = "POOL_VAULT_LOCKERS";
public static final String POOL_METEOR_SAFE = "POOL_METEOR_SAFE"; public static final String POOL_METEOR_SAFE = "POOL_METEOR_SAFE";
public static final String POOL_OIL_RIG = "POOL_OIL_RIG"; public static final String POOL_OIL_RIG = "POOL_OIL_RIG";
public static final String POOL_RTG = "POOL_RTG";
public static final String POOL_REPAIR_MATERIALS = "POOL_REPAIR_MATERIALS"; public static final String POOL_REPAIR_MATERIALS = "POOL_REPAIR_MATERIALS";
public static void init() { public static void init() {
@ -213,6 +215,13 @@ public class ItemPoolsComponent {
}; };
}}; }};
new ItemPool(POOL_RTG) {{
this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.pellet_rtg_depleted, ItemRTGPelletDepleted.DepletedRTGMaterial.LEAD.ordinal(), 1, 1, 40),
weighted(ModItems.pellet_rtg_weak,0, 0, 1, 1),
};
}};
new ItemPool(POOL_REPAIR_MATERIALS) {{ new ItemPool(POOL_REPAIR_MATERIALS) {{
this.pool = new WeightedRandomChestContent[] { this.pool = new WeightedRandomChestContent[] {
weighted(ModItems.ingot_aluminium, 0, 2, 8, 3), weighted(ModItems.ingot_aluminium, 0, 2, 8, 3),

View File

@ -59,6 +59,7 @@ public class StructureManager {
public static final NBTStructure aircraft_carrier = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/aircraft_carrier.nbt")); public static final NBTStructure aircraft_carrier = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/aircraft_carrier.nbt"));
public static final NBTStructure oil_rig = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/oil_rig.nbt")); public static final NBTStructure oil_rig = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/oil_rig.nbt"));
public static final NBTStructure beached_patrol = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/beached_patrol.nbt")); public static final NBTStructure beached_patrol = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/beached_patrol.nbt"));
public static final NBTStructure lighthouse = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/lighthouse.nbt"));
public static final NBTStructure dish = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/dish.nbt")); public static final NBTStructure dish = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/dish.nbt"));
// public static final NBTStructure test_rot = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-rot.nbt")); // public static final NBTStructure test_rot = new NBTStructure(new ResourceLocation(RefStrings.MODID, "structures/test-rot.nbt"));

View File

@ -3,6 +3,7 @@ package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder; import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -24,11 +25,11 @@ public class RenderSkeletonHolder extends TileEntitySpecialRenderer {
GL11.glTranslated(x + 0.5, y, z + 0.5); GL11.glTranslated(x + 0.5, y, z + 0.5);
switch(te.getBlockMetadata()) { switch(te.getBlockMetadata()) {
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break; case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
case 4: GL11.glRotatef(270, 0F, 1F, 0F); break; case 4: GL11.glRotatef(270, 0F, 1F, 0F); break;
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break; case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
case 5: GL11.glRotatef(90, 0F, 1F, 0F); break; case 5: GL11.glRotatef(90, 0F, 1F, 0F); break;
} } //why the FUCK did this not commit properl;y
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_CULL_FACE);
@ -45,6 +46,10 @@ public class RenderSkeletonHolder extends TileEntitySpecialRenderer {
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
if(stack.getItem() instanceof ItemGunBaseNT) {
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
}
if(!(stack.getItemSpriteNumber() == 0 && stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType()))) { if(!(stack.getItemSpriteNumber() == 0 && stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType()))) {
GL11.glScaled(1.5, 1.5, 1.5); GL11.glScaled(1.5, 1.5, 1.5);
} }

View File

@ -79,9 +79,10 @@ public interface INBTTransformable {
} }
public static int transformMetaPillar(int meta, int coordBaseMode) { public static int transformMetaPillar(int meta, int coordBaseMode) {
if(coordBaseMode == 2) return meta; if(coordBaseMode == 2) return meta; // 180° rotation: X and Z flip, result same
int type = meta & 3;
int rot = meta & 12; int type = meta & 3; // lower 2 bits
int rot = meta & 12; // upper 2 bits (4 or 8)
if(rot == 4) return type | 8; if(rot == 4) return type | 8;
if(rot == 8) return type | 4; if(rot == 8) return type | 4;
@ -158,4 +159,46 @@ public interface INBTTransformable {
return meta; return meta;
} }
public static int transformMetaVine(int meta, int coordBaseMode) { //Sloppppp coddee aa
int result = 0;
for (int i = 0; i < 4; i++) {
int bit = 1 << i;
if ((meta & bit) != 0) {
result |= rotateVineBit(bit, coordBaseMode);
}
}
return result;
}
static int rotateVineBit(int bit, int coordBaseMode) {
int index = -1;
switch (bit) {
case 1: index = 0; break; // south
case 2: index = 1; break; // west
case 4: index = 2; break; // north
case 8: index = 3; break; // east
default: return 0;
}
int rotated = index;
switch (coordBaseMode) {
case 1: rotated = (index + 1) % 4; break; // 90°
case 2: rotated = (index + 2) % 4; break; // 180°
case 3: rotated = (index + 3) % 4; break; // 270°
// case 0: vines work ughhggh (im dragging it)
}
switch (rotated) {
case 0: return 1; // south
case 1: return 2; // west
case 2: return 4; // north
case 3: return 8; // east
}
return 0;
}
} }

View File

@ -12,7 +12,6 @@ import com.hbm.world.gen.component.CivilianFeatures.NTMHouse1;
import com.hbm.world.gen.component.CivilianFeatures.NTMHouse2; import com.hbm.world.gen.component.CivilianFeatures.NTMHouse2;
import com.hbm.world.gen.component.CivilianFeatures.NTMLab1; import com.hbm.world.gen.component.CivilianFeatures.NTMLab1;
import com.hbm.world.gen.component.CivilianFeatures.NTMLab2; import com.hbm.world.gen.component.CivilianFeatures.NTMLab2;
import com.hbm.world.gen.component.CivilianFeatures.NTMWorkshop1;
import com.hbm.world.gen.component.CivilianFeatures.RuralHouse1; import com.hbm.world.gen.component.CivilianFeatures.RuralHouse1;
import com.hbm.world.gen.component.OfficeFeatures.LargeOffice; import com.hbm.world.gen.component.OfficeFeatures.LargeOffice;
import com.hbm.world.gen.component.OfficeFeatures.LargeOfficeCorner; import com.hbm.world.gen.component.OfficeFeatures.LargeOfficeCorner;
@ -155,10 +154,6 @@ public class MapGenNTMFeatures extends MapGenStructure {
NTMHouse2 house2 = new NTMHouse2(rand, i, j); NTMHouse2 house2 = new NTMHouse2(rand, i, j);
this.components.add(house2); this.components.add(house2);
} }
} else if(biome.temperature >= 0.25 && biome.temperature <= 0.3 && biome.rainfall >= 0.6 && biome.rainfall <= 0.9 && rand.nextBoolean()) { //Taiga & Mega Taiga
NTMWorkshop1 workshop1 = new NTMWorkshop1(rand, i, j); //TODO replace this
this.components.add(workshop1);
} else { //Everything else } else { //Everything else
switch(rand.nextInt(6)) { switch(rand.nextInt(6)) {
case 0: case 0:

View File

@ -578,7 +578,7 @@ public class NBTStructure {
if(definition.block instanceof BlockSign) return INBTTransformable.transformMetaDeco(definition.meta, coordBaseMode); if(definition.block instanceof BlockSign) return INBTTransformable.transformMetaDeco(definition.meta, coordBaseMode);
if(definition.block instanceof BlockLadder) return INBTTransformable.transformMetaDeco(definition.meta, coordBaseMode); if(definition.block instanceof BlockLadder) return INBTTransformable.transformMetaDeco(definition.meta, coordBaseMode);
if(definition.block instanceof BlockTripWireHook) return INBTTransformable.transformMetaDirectional(definition.meta, coordBaseMode); if(definition.block instanceof BlockTripWireHook) return INBTTransformable.transformMetaDirectional(definition.meta, coordBaseMode);
if(definition.block == Blocks.vine) return INBTTransformable.transformMetaVine(definition.meta, coordBaseMode);
return definition.meta; return definition.meta;
} }

View File

@ -38,7 +38,7 @@ public class NTMWorldGenerator implements IWorldGenerator {
final List<BiomeGenBase> invalidBiomes = Arrays.asList(new BiomeGenBase[] {BiomeGenBase.ocean, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.deepOcean}); final List<BiomeGenBase> invalidBiomes = Arrays.asList(new BiomeGenBase[] {BiomeGenBase.ocean, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.deepOcean});
final List<BiomeGenBase> oceanBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.deepOcean }); final List<BiomeGenBase> oceanBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.deepOcean });
final List<BiomeGenBase> beachBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach }); final List<BiomeGenBase> beachBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach });
final List<BiomeGenBase> lighthouseBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.deepOcean, BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach });
NBTStructure.registerStructure(0, new SpawnCondition() {{ NBTStructure.registerStructure(0, new SpawnCondition() {{
canSpawn = biome -> !invalidBiomes.contains(biome); canSpawn = biome -> !invalidBiomes.contains(biome);
@ -79,6 +79,14 @@ public class NTMWorldGenerator implements IWorldGenerator {
spawnWeight = 2; spawnWeight = 2;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition() {{
canSpawn = lighthouseBiomes::contains;
structure = new JigsawPiece("lighthouse", StructureManager.lighthouse, -40);
maxHeight = 29;
minHeight = 28;
spawnWeight = 2;
}});
NBTStructure.registerStructure(0, new SpawnCondition() {{ NBTStructure.registerStructure(0, new SpawnCondition() {{
canSpawn = beachBiomes::contains; canSpawn = beachBiomes::contains;
structure = new JigsawPiece("beached_patrol", StructureManager.beached_patrol, -5); structure = new JigsawPiece("beached_patrol", StructureManager.beached_patrol, -5);
@ -87,6 +95,8 @@ public class NTMWorldGenerator implements IWorldGenerator {
spawnWeight = 8; spawnWeight = 8;
}}); }});
NBTStructure.registerNullWeight(0, 2, oceanBiomes::contains); //why the fuck did this change
NBTStructure.registerStructure(0, new SpawnCondition() {{ NBTStructure.registerStructure(0, new SpawnCondition() {{
canSpawn = biome -> biome == BiomeGenBase.plains; canSpawn = biome -> biome == BiomeGenBase.plains;
structure = new JigsawPiece("dish", StructureManager.dish, -10); structure = new JigsawPiece("dish", StructureManager.dish, -10);

View File

@ -31,7 +31,6 @@ public class CivilianFeatures {
MapGenStructureIO.func_143031_a(NTMHouse2.class, "NTMHouse2"); MapGenStructureIO.func_143031_a(NTMHouse2.class, "NTMHouse2");
MapGenStructureIO.func_143031_a(NTMLab1.class, "NTMLab1"); //i'll replace these shitty structures one day trust MapGenStructureIO.func_143031_a(NTMLab1.class, "NTMLab1"); //i'll replace these shitty structures one day trust
MapGenStructureIO.func_143031_a(NTMLab2.class, "NTMLab2"); MapGenStructureIO.func_143031_a(NTMLab2.class, "NTMLab2");
MapGenStructureIO.func_143031_a(NTMWorkshop1.class, "NTMWorkshop1");
MapGenStructureIO.func_143031_a(RuralHouse1.class, "NTMRuralHouse1"); MapGenStructureIO.func_143031_a(RuralHouse1.class, "NTMRuralHouse1");
} }
@ -581,156 +580,6 @@ public class CivilianFeatures {
} }
} }
public static class NTMWorkshop1 extends Component {
private static SuperConcrete RandomSuperConcrete = new SuperConcrete();
private boolean hasPlacedLoot;
public NTMWorkshop1() {
super();
}
public NTMWorkshop1(Random rand, int minX, int minZ) {
super(rand, minX, 64, minZ, 10, 6, 8);
this.hasPlacedLoot = false;
}
@Override
protected void func_143012_a(NBTTagCompound nbt) {
super.func_143012_a(nbt);
nbt.setBoolean("hasLoot", this.hasPlacedLoot);
}
@Override
protected void func_143011_b(NBTTagCompound nbt) {
super.func_143011_b(nbt);
this.hasPlacedLoot = nbt.getBoolean("hasLoot");
}
@Override
public boolean addComponentParts(World world, Random rand, StructureBoundingBox box) {
////System.out.println(this.coordBaseMode);
if(!this.setAverageHeight(world, box, this.boundingBox.minY)) {
return false;
}
//System.out.println("" + this.boundingBox.minX + ", " + this.boundingBox.minY + ", " + this.boundingBox.minZ);
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 1, 0, 8 - 3, 11, -1, box);
placeFoundationUnderneath(world, Blocks.dirt, 0, 8, 1, 10, 6, -1, box);
this.fillWithAir(world, box, 1, 0, 0, 10 - 3, 6 - 2, 8);
this.fillWithAir(world, box, 10 - 2, 0, 2, 10 - 1, 2, 5);
if(this.getBlockAtCurrentPosition(world, 0, 0, 5, box).getMaterial().isReplaceable()
|| this.getBlockAtCurrentPosition(world, 0, 0, 5, box) == Blocks.air) {
int stairMeta = this.getMetadataWithOffset(Blocks.stone_brick_stairs, 1);
this.placeBlockAtCurrentPosition(world, Blocks.stone_brick_stairs, stairMeta, 0, 0, 5, box);
placeFoundationUnderneath(world, Blocks.stonebrick, 0, 0, 1, 0, 8 - 1, -1, box);
this.fillWithMetadataBlocks(world, box, 0, 0, 1, 0, 0, 8 - 1, Blocks.stone_slab, 5, Blocks.air, 0, false);
}
//Walls
int pillarMetaWE = this.getPillarMeta(4);
int pillarMetaNS = this.getPillarMeta(8);
this.fillWithBlocks(world, box, 1, 0, 0, 1, 3, 0, ModBlocks.concrete_pillar, Blocks.air, false); //Back Wall
this.placeBlockAtCurrentPosition(world, ModBlocks.concrete, 0, 1, 4, 0, box);
this.fillWithMetadataBlocks(world, box, 2, 4, 0, 10 - 4, 4, 0, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false);
this.placeBlockAtCurrentPosition(world, ModBlocks.concrete, 0, 10 - 3, 4, 0, box);
this.fillWithBlocks(world, box, 10 - 3, 0, 0, 10 - 3, 3, 0, ModBlocks.concrete_pillar, Blocks.air, false);
this.fillWithRandomizedBlocks(world, box, 2, 0, 0, 10 - 4, 1, 0, false, rand, RandomSuperConcrete);
this.fillWithRandomizedBlocks(world, box, 2, 2, 0, 2, 2, 0, false, rand, RandomSuperConcrete);
this.fillWithBlocks(world, box, 3, 2, 0, 5, 2, 0, ModBlocks.reinforced_glass, Blocks.air, false);
this.fillWithRandomizedBlocks(world, box, 10 - 4, 2, 0, 10 - 4, 2, 0, false, rand, RandomSuperConcrete);
this.fillWithRandomizedBlocks(world, box, 2, 3, 0, 10 - 4, 3, 0, false, rand, RandomSuperConcrete);
this.fillWithMetadataBlocks(world, box, 1, 4, 1, 1, 4, 8 - 1, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false); //Left Wall
this.placeBlockAtCurrentPosition(world, ModBlocks.concrete, 0, 1, 4, 8, box);
this.fillWithBlocks(world, box, 1, 0, 8, 1, 3, 8, ModBlocks.concrete_pillar, Blocks.air, false);
this.fillWithRandomizedBlocks(world, box, 1, 0, 1, 1, 1, 4, false, rand, RandomSuperConcrete);
this.fillWithRandomizedBlocks(world, box, 1, 2, 1, 1, 2, 1, false, rand, RandomSuperConcrete);
this.fillWithBlocks(world, box, 1, 2, 2, 1, 2, 3, ModBlocks.reinforced_glass, Blocks.air, false);
this.fillWithRandomizedBlocks(world, box, 1, 2, 4, 1, 2, 4, false, rand, RandomSuperConcrete);
this.fillWithRandomizedBlocks(world, box, 1, 3, 1, 1, 3, 8 - 1, false, rand, RandomSuperConcrete);
this.fillWithRandomizedBlocks(world, box, 1, 0, 8 - 2, 1, 3, 8 - 1, false, rand, RandomSuperConcrete);
this.fillWithMetadataBlocks(world, box, 2, 4, 8, 10 - 4, 4, 8, ModBlocks.concrete_pillar, pillarMetaWE, Blocks.air, 0, false); //Front Wall
this.placeBlockAtCurrentPosition(world, ModBlocks.concrete, 0, 10 - 3, 4, 8, box);
this.fillWithBlocks(world, box, 10 - 3, 0, 8, 10 - 3, 3, 8, ModBlocks.concrete_pillar, Blocks.air, false);
this.fillWithRandomizedBlocks(world, box, 2, 0, 8, 10 - 4, 1, 8, false, rand, RandomSuperConcrete);
this.fillWithRandomizedBlocks(world, box, 2, 2, 8, 2, 2, 8, false, rand, RandomSuperConcrete);
this.fillWithBlocks(world, box, 3, 2, 8, 5, 2, 8, ModBlocks.reinforced_glass, Blocks.air, false);
this.fillWithRandomizedBlocks(world, box, 10 - 4, 2, 8, 10 - 4, 2, 8, false, rand, RandomSuperConcrete);
this.fillWithRandomizedBlocks(world, box, 2, 3, 8, 10 - 4, 3, 8, false, rand, RandomSuperConcrete);
this.fillWithMetadataBlocks(world, box, 10 - 3, 4, 1, 10 - 3, 4, 8 - 1, ModBlocks.concrete_pillar, pillarMetaNS, Blocks.air, 0, false); //Right Wall
this.fillWithRandomizedBlocks(world, box, 10 - 3, 0, 1, 10 - 3, 3, 8 - 1, false, rand, RandomSuperConcrete);
pillarMetaWE = this.getPillarMeta(5);
pillarMetaNS = this.getPillarMeta(9);
this.fillWithMetadataBlocks(world, box, 10 - 2, 2, 1, 10 - 1, 2, 1, Blocks.log, pillarMetaWE, Blocks.air, 0, false); //Back Wall
this.fillWithMetadataBlocks(world, box, 10, 0, 1, 10, 2, 1, Blocks.log, 1, Blocks.air, 0, false);
this.fillWithMetadataBlocks(world, box, 10 - 2, 0, 1, 10 - 1, 1, 1, Blocks.planks, 1, Blocks.air, 0, false);
this.fillWithMetadataBlocks(world, box, 10, 2, 2, 10, 2, 5, Blocks.log, pillarMetaNS, Blocks.air, 0, false); //Right Wall
this.fillWithMetadataBlocks(world, box, 10, 0, 6, 10, 2, 6, Blocks.log, 1, Blocks.air, 0, false);
this.fillWithMetadataBlocks(world, box, 10, 0, 3, 10, 1, 5, Blocks.planks, 1, Blocks.air, 0, false);
this.fillWithMetadataBlocks(world, box, 10 - 2, 2, 6, 10 - 1, 2, 6, Blocks.log, pillarMetaWE, Blocks.air, 0, false); //Front Wall
this.fillWithMetadataBlocks(world, box, 10 - 2, 0, 6, 10 - 1, 1, 6, Blocks.planks, 1, Blocks.air, 0, false);
//Floor & Ceiling
this.fillWithBlocks(world, box, 2, 0, 1, 6, 0, 8 - 1, ModBlocks.brick_light, Blocks.air, false); //Floor
this.placeBlockAtCurrentPosition(world, ModBlocks.brick_light, 0, 1, 0, 5, box);
this.fillWithRandomizedBlocks(world, box, 2, 4, 1, 6, 4, 3, false, rand, RandomSuperConcrete); //Ceiling
this.fillWithRandomizedBlocks(world, box, 2, 4, 4, 2, 4, 4, false, rand, RandomSuperConcrete);
this.fillWithRandomizedBlocks(world, box, 5, 4, 4, 6, 4, 4, false, rand, RandomSuperConcrete);
this.fillWithRandomizedBlocks(world, box, 2, 4, 8 - 3, 6, 4, 8 - 1, false, rand, RandomSuperConcrete);
this.fillWithBlocks(world, box, 10 - 2, 2, 2, 10 - 1, 2, 5, ModBlocks.deco_steel, Blocks.air, false);
//Loot & Decorations
int southMeta = this.getDecoMeta(2);
int eastMeta = this.getDecoMeta(5);
this.placeBlockAtCurrentPosition(world, ModBlocks.pole_satellite_receiver, eastMeta, 2, 6 - 1, 1, box);
this.fillWithBlocks(world, box, 3, 6 - 1, 1, 4, 6 - 1, 1, ModBlocks.deco_steel, Blocks.air, false);
this.fillWithBlocks(world, box, 2, 6 - 1, 2, 4, 6 - 1, 2, ModBlocks.deco_steel, Blocks.air, false);
this.fillWithBlocks(world, box, 2, 6, 1, 4, 6, 2, ModBlocks.steel_roof, Blocks.air, false);
this.fillWithBlocks(world, box, 2, 1, 1, 2, 3, 1, ModBlocks.deco_red_copper, Blocks.air, false);
this.fillWithBlocks(world, box, 3, 1, 1, 3, 1, 2, ModBlocks.deco_beryllium, Blocks.air, false);
this.placeBlockAtCurrentPosition(world, ModBlocks.machine_amgen, 0, 4, 1, 1, box);
this.placeBlockAtCurrentPosition(world, ModBlocks.machine_detector, 0, 4, 1, 2, box);
this.fillWithBlocks(world, box, 5, 1, 1, 5, 1, 2, ModBlocks.deco_beryllium, Blocks.air, false);
this.fillWithBlocks(world, box, 6, 1, 1, 6, 3, 1, ModBlocks.deco_red_copper, Blocks.air, false);
this.fillWithBlocks(world, box, 3, 1, 4, 4, 1, 4, ModBlocks.concrete_super_broken, Blocks.air, false);
this.fillWithMetadataBlocks(world, box, 6, 1, 4, 6, 3, 4, ModBlocks.steel_scaffold, eastMeta < 4 ? 0 : 8, Blocks.air, 0, false);
this.fillWithMetadataBlocks(world, box, 6, 1, 5, 6, 1, 7, ModBlocks.steel_grate, 7, Blocks.air, 0, false);
this.placeBlockAtCurrentPosition(world, ModBlocks.radiorec, eastMeta, 6, 2, 8 - 1, box);
this.fillWithMetadataBlocks(world, box, 2, 1, 8 - 1, 3, 1, 8 - 1, ModBlocks.machine_electric_furnace_off, southMeta, Blocks.air, 0, false);
if(!hasPlacedLoot) {
this.hasPlacedLoot = this.generateInvContents(world, box, rand, ModBlocks.crate_iron, 4, 1, 8 - 1, ItemPool.getPool(ItemPoolsComponent.POOL_MACHINE_PARTS), 11);
}
this.placeBlockAtCurrentPosition(world, Blocks.web, 0, 5, 3, 1, box);
this.placeBlockAtCurrentPosition(world, Blocks.web, 0, 2, 1, 2, box);
this.placeBlockAtCurrentPosition(world, Blocks.web, 0, 6, 1, 2, box);
this.placeBlockAtCurrentPosition(world, Blocks.web, 0, 6, 2, 5, box);
this.fillWithMetadataBlocks(world, box, 10 - 2, 0, 5, 10 - 1, 0, 5, ModBlocks.steel_grate, 7, Blocks.air, 0, false);
this.placeBlockAtCurrentPosition(world, ModBlocks.tape_recorder, southMeta, 10 - 2, 1, 5, box);
this.placeBlockAtCurrentPosition(world, ModBlocks.bobblehead, rand.nextInt(16), 10 - 1, 1, 5, box);
TileEntityBobble bobble = (TileEntityBobble) world.getTileEntity(this.getXWithOffset(10 - 1, 5), this.getYWithOffset(1), this.getZWithOffset(10 - 1, 5));
if(bobble != null) {
bobble.type = BobbleType.values()[rand.nextInt(BobbleType.values().length - 1) + 1];
bobble.markDirty();
}
this.fillWithMetadataBlocks(world, box, 10 - 2, 0, 2, 10 - 2, 0, 3, Blocks.log, pillarMetaWE, Blocks.air, 0, false);
this.placeBlockAtCurrentPosition(world, Blocks.log, pillarMetaWE, 10 - 2, 1, 2, box);
this.placeBlockAtCurrentPosition(world, Blocks.web, 0, 10 - 2, 1, 3, box);
return true;
}
}
public static class RuralHouse1 extends Component { public static class RuralHouse1 extends Component {
public RuralHouse1() { public RuralHouse1() {