From b2589102a91cc6262caeb1b7802e0686f84c4697 Mon Sep 17 00:00:00 2001 From: HbmMods Date: Sat, 20 Feb 2016 22:50:55 +0100 Subject: [PATCH] I don't feel like writing anything right now. --- com/hbm/gui/MachineRecipes.java | 2 +- com/hbm/lib/Library.java | 2 +- com/hbm/main/CraftingManager.java | 4 +-- com/hbm/render/ModelGasMask.java | 26 ++++++++++++------- com/hbm/render/ModelGoggles.java | 12 +++++++-- com/hbm/world/Bunker.java | 42 ++++++++++++++++++++++--------- com/hbm/world/Factory.java | 28 +++++++++++++++------ com/hbm/world/Silo.java | 21 +++++++++++----- 8 files changed, 96 insertions(+), 41 deletions(-) diff --git a/com/hbm/gui/MachineRecipes.java b/com/hbm/gui/MachineRecipes.java index 106dc0f21..6d5244898 100644 --- a/com/hbm/gui/MachineRecipes.java +++ b/com/hbm/gui/MachineRecipes.java @@ -49,7 +49,7 @@ public class MachineRecipes { } - if(item == ModItems.canister_empty && item2 == Item.getItemFromBlock(Blocks.coal_block) || item == Item.getItemFromBlock(Blocks.coal_block) && item2 == ModItems.canister_empty) { + if(item == ModItems.canister_empty && item2 == Items.coal || item == Items.coal && item2 == ModItems.canister_empty) { return new ItemStack(ModItems.canister_fuel, 1); } diff --git a/com/hbm/lib/Library.java b/com/hbm/lib/Library.java index f840e0184..1db0f7f14 100644 --- a/com/hbm/lib/Library.java +++ b/com/hbm/lib/Library.java @@ -29,7 +29,7 @@ public class Library { public static String book113 = "§lLead§r\nLead is a very common ore that can be smelted into an ingot. It can be used to craft breeding reactors, RTG-Units and if combined with copper in the alloy furnace, it can be processed into neutron reflectors."; public static String book114 = "§lSchrabidium§r\nSchrabidium is a very odd element only found near nuclear testing sites. It has violent behaviours if used the right way, making it perfect for bombs. If a big ammount is hit by neutrons, it will create other elements."; public static String book115 = "§lAdvanced Alloy§r\nThe advanced alloy is a very durable and useful material, only used for the best factories which can handle four operations at once. It is composed of Minecraft grade copper and steel, combined by an alloy furnace."; - public static String book116 = "§lFuel§r\nFuel is obtained by combining an empty canister and a coal block in the alloy furnace. It is used for crafting explosive barrels and missiles."; + public static String book116 = "§lFuel§r\nFuel is obtained by combining an empty canister and a piece of coal in the alloy furnace. It is used for crafting explosive barrels and missiles."; public static String book21 = "§lMachines§r\nAs an essential part of technic mods, Hbm's Nuclear Tech Mod also features many machines. They are either used to smelt or refine items or to store hazardous materials or even generate electricity."; public static String book22 = "§lAlloy Furnace§r\nThe alloy furnace is the most importand machine as it is used to create alloys like red copper or neutron reflectors. It uses different kinds of fuel such as coal, netherrack, lava or even redstone."; diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index ef8c52a5f..dd41ab560 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -170,7 +170,7 @@ public class CraftingManager { GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_u238, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_u238, ModItems.ingot_u238, ModItems.nugget_u238, ModItems.nugget_u238, ModItems.nugget_u238, ModItems.nugget_u238, ModItems.nugget_u238, ModItems.nugget_u238 }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_plutonium, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_plutonium, ModItems.ingot_plutonium, ModItems.nugget_plutonium, ModItems.nugget_plutonium, ModItems.nugget_plutonium, ModItems.nugget_plutonium, ModItems.nugget_plutonium, ModItems.nugget_plutonium }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_pu238, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_pu238, ModItems.ingot_pu238, ModItems.nugget_pu238, ModItems.nugget_pu238, ModItems.nugget_pu238, ModItems.nugget_pu238, ModItems.nugget_pu238, ModItems.nugget_pu238 }); - GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_pu239, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239 }); + GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_pu239, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_pu239, ModItems.ingot_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239, ModItems.nugget_pu239 }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_pu240, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_pu240, ModItems.ingot_pu240, ModItems.nugget_pu240, ModItems.nugget_pu240, ModItems.nugget_pu240, ModItems.nugget_pu240, ModItems.nugget_pu240, ModItems.nugget_pu240 }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_neptunium, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_neptunium, ModItems.ingot_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium, ModItems.nugget_neptunium }); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.rod_quad_lead, 1), new Object[] { ModItems.rod_quad_empty, ModItems.ingot_lead, ModItems.ingot_lead, ModItems.nugget_lead, ModItems.nugget_lead, ModItems.nugget_lead, ModItems.nugget_lead, ModItems.nugget_lead, ModItems.nugget_lead }); @@ -397,7 +397,7 @@ public class CraftingManager { GameRegistry.addRecipe(new ItemStack(ModItems.grenade_nuclear, 1), new Object[] {"RS ", "ITI", " I ", 'I', ModItems.plate_iron, 'R', ModItems.wire_red_copper, 'S', ModItems.plate_steel, 'T', ModItems.gun_fatman_ammo }); GameRegistry.addRecipe(new ItemStack(ModItems.bomb_waffle, 1), new Object[] { "WEW", "MPM", "WEW", 'W', Items.wheat, 'E', Items.egg, 'M', Items.milk_bucket, 'P', ModItems.man_core }); - GameRegistry.addRecipe(new ItemStack(ModItems.schnitzel_vegan, 3), new Object[] { "RWR", "WPW", "RWR", 'W', ModItems.trinitite, 'R', Items.reeds, 'P', Items.pumpkin_seeds }); + GameRegistry.addRecipe(new ItemStack(ModItems.schnitzel_vegan, 3), new Object[] { "RWR", "WPW", "RWR", 'W', ModItems.nuclear_waste, 'R', Items.reeds, 'P', Items.pumpkin_seeds }); GameRegistry.addRecipe(new ItemStack(ModItems.cotton_candy, 2), new Object[] { " S ", "SPS", " H ", 'P', ModItems.nugget_pu239, 'S', Items.sugar, 'H', Items.stick }); GameRegistry.addRecipe(new ItemStack(ModItems.apple_schrabidium, 1, 0), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.nugget_schrabidium, 'A', Items.apple }); GameRegistry.addRecipe(new ItemStack(ModItems.apple_schrabidium, 1, 1), new Object[] { "SSS", "SAS", "SSS", 'S', ModItems.ingot_schrabidium, 'A', Items.apple }); diff --git a/com/hbm/render/ModelGasMask.java b/com/hbm/render/ModelGasMask.java index b7bad9de0..b9c18ccf0 100644 --- a/com/hbm/render/ModelGasMask.java +++ b/com/hbm/render/ModelGasMask.java @@ -16,6 +16,7 @@ import org.lwjgl.opengl.GL11; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; public class ModelGasMask extends ModelBiped { @@ -36,42 +37,42 @@ public class ModelGasMask extends ModelBiped mask = new ModelRenderer(this, 0, 0); Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(0F, 0F, 0F, 8, 8, 3); - Shape1.setRotationPoint(0F - 4, 0F - 8 + 0.0625F / 2, 0F - 4); + Shape1.setRotationPoint(0F - 4, 0F - 8 + 0.075F / 2, 0F - 4); Shape1.setTextureSize(64, 32); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); convertToChild(mask, Shape1); Shape2 = new ModelRenderer(this, 22, 0); Shape2.addBox(0F, 0F, 0F, 2, 2, 1); - Shape2.setRotationPoint(1F - 4, 3F - 8 + 0.0625F / 2, -0.5333334F - 4); + Shape2.setRotationPoint(1F - 4, 3F - 8 + 0.075F / 2, -0.5333334F - 4); Shape2.setTextureSize(64, 32); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); convertToChild(mask, Shape2); Shape3 = new ModelRenderer(this, 22, 0); Shape3.addBox(0F, 0F, 0F, 2, 2, 1); - Shape3.setRotationPoint(5F - 4, 3F - 8 + 0.0625F / 2, -0.5F - 4); + Shape3.setRotationPoint(5F - 4, 3F - 8 + 0.075F / 2, -0.5F - 4); Shape3.setTextureSize(64, 32); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); convertToChild(mask, Shape3); Shape4 = new ModelRenderer(this, 0, 11); Shape4.addBox(0F, 0F, 0F, 2, 2, 2); - Shape4.setRotationPoint(3F - 4, 5F - 8 + 0.0625F / 2, 0F - 4); + Shape4.setRotationPoint(3F - 4, 5F - 8 + 0.075F / 2, 0F - 4); Shape4.setTextureSize(64, 32); Shape4.mirror = true; setRotation(Shape4, -0.7853982F, 0F, 0F); convertToChild(mask, Shape4); Shape5 = new ModelRenderer(this, 0, 15); Shape5.addBox(0F, 2F, -0.5F, 3, 4, 3); - Shape5.setRotationPoint(2.5F - 4, 5F - 8 + 0.0625F / 2, 0F - 4); + Shape5.setRotationPoint(2.5F - 4, 5F - 8 + 0.075F / 2, 0F - 4); Shape5.setTextureSize(64, 32); Shape5.mirror = true; setRotation(Shape5, -0.7853982F, 0F, 0F); convertToChild(mask, Shape5); Shape6 = new ModelRenderer(this, 0, 22); Shape6.addBox(0F, 0F, 0F, 8, 1, 5); - Shape6.setRotationPoint(0F - 4, 3F - 8 + 0.0625F / 2, 3F - 4); + Shape6.setRotationPoint(0F - 4, 3F - 8 + 0.075F / 2, 3F - 4); Shape6.setTextureSize(64, 32); Shape6.mirror = true; setRotation(Shape6, 0F, 0F, 0F); @@ -88,9 +89,16 @@ public class ModelGasMask extends ModelBiped @Override public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + EntityPlayer player = (EntityPlayer)entity; + if(player.isSneaking()) + { + this.isSneak = true; + } else { + this.isSneak = false; + } super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.mask.rotationPointX = 0.0F; - this.mask.rotationPointY = 0.0F; + this.mask.rotationPointX = this.bipedHead.rotationPointX; + this.mask.rotationPointY = this.bipedHead.rotationPointY; this.mask.rotateAngleY = this.bipedHead.rotateAngleY; this.mask.rotateAngleX = this.bipedHead.rotateAngleX; } @@ -99,7 +107,7 @@ public void render(Entity par1Entity, float par2, float par3, float par4, float { setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); GL11.glPushMatrix(); - GL11.glScalef(1.125F, 1.125F, 1.125F); + GL11.glScalef(1.15F, 1.15F, 1.15F); this.mask.render(par7); GL11.glPopMatrix(); } diff --git a/com/hbm/render/ModelGoggles.java b/com/hbm/render/ModelGoggles.java index 6bf314e43..8f20778f7 100644 --- a/com/hbm/render/ModelGoggles.java +++ b/com/hbm/render/ModelGoggles.java @@ -16,6 +16,7 @@ import org.lwjgl.opengl.GL11; import net.minecraft.client.model.ModelBiped; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; public class ModelGoggles extends ModelBiped { @@ -91,9 +92,16 @@ public class ModelGoggles extends ModelBiped @Override public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { + EntityPlayer player = (EntityPlayer)entity; + if(player.isSneaking()) + { + this.isSneak = true; + } else { + this.isSneak = false; + } super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); - this.google.rotationPointX = 0.0F; - this.google.rotationPointY = 0.0F; + this.google.rotationPointX = this.bipedHead.rotationPointX; + this.google.rotationPointY = this.bipedHead.rotationPointY; this.google.rotateAngleY = this.bipedHead.rotateAngleY; this.google.rotateAngleX = this.bipedHead.rotateAngleX; } diff --git a/com/hbm/world/Bunker.java b/com/hbm/world/Bunker.java index 6a8053c4e..a4f211315 100644 --- a/com/hbm/world/Bunker.java +++ b/com/hbm/world/Bunker.java @@ -294,27 +294,42 @@ public class Bunker extends WorldGenerator world.setBlock(x + 1, y + -24, z + 1, Block2, 0, 3); world.setBlock(x + 2, y + -24, z + 1, Blocks.chest, 3, 3); world.setBlockMetadataWithNotify(x + 2, y + -24, z + 1, 3, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 2, y + -24, z + 1), rand.nextInt(2)+ 6); - world.setBlock(x + 3, y + -24, z + 1, Block2, 0, 3); + if(world.getBlock(x + 2, y + -24, z + 1) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 2, y + -24, z + 1), rand.nextInt(2)+ 6); + } + world.setBlock(x + 3, y + -24, z + 1, Block2, 0, 3); world.setBlock(x + 4, y + -24, z + 1, Block1, 0, 3); world.setBlock(x + 11, y + -24, z + 1, Block1, 0, 3); world.setBlock(x + 0, y + -24, z + 2, Block1, 0, 3); world.setBlock(x + 1, y + -24, z + 2, Blocks.chest, 5, 3); world.setBlockMetadataWithNotify(x + 1, y + -24, z + 5, 3, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 1, y + -24, z + 2), 8); - world.setBlock(x + 3, y + -24, z + 2, Blocks.chest, 4, 3); + if(world.getBlock(x + 2, y + -24, z + 1) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 1, y + -24, z + 2), 8); + } + world.setBlock(x + 3, y + -24, z + 2, Blocks.chest, 4, 3); world.setBlockMetadataWithNotify(x + 3, y + -24, z + 2, 4, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 3, y + -24, z + 2), 8); - world.setBlock(x + 4, y + -24, z + 2, Block1, 0, 3); + if(world.getBlock(x + 3, y + -24, z + 2) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 3, y + -24, z + 2), 8); + } + world.setBlock(x + 4, y + -24, z + 2, Block1, 0, 3); world.setBlock(x + 11, y + -24, z + 2, Block1, 0, 3); world.setBlock(x + 0, y + -24, z + 3, Block1, 0, 3); world.setBlock(x + 1, y + -24, z + 3, Blocks.chest, 5, 3); world.setBlockMetadataWithNotify(x + 1, y + -24, z + 3, 5, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 1, y + -24, z + 3), 8); - world.setBlock(x + 3, y + -24, z + 3, Blocks.chest, 4, 3); + if(world.getBlock(x + 1, y + -24, z + 3) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 1, y + -24, z + 3), 8); + } + world.setBlock(x + 3, y + -24, z + 3, Blocks.chest, 4, 3); world.setBlockMetadataWithNotify(x + 3, y + -24, z + 3, 5, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 3, y + -24, z + 3), 8); - world.setBlock(x + 4, y + -24, z + 3, Block1, 0, 3); + if(world.getBlock(x + 3, y + -24, z + 3) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 3, y + -24, z + 3), 8); + } + world.setBlock(x + 4, y + -24, z + 3, Block1, 0, 3); world.setBlock(x + 7, y + -24, z + 3, Block1, 0, 3); world.setBlock(x + 8, y + -24, z + 3, Block1, 0, 3); world.setBlock(x + 9, y + -24, z + 3, Blocks.iron_door, 5, 3); @@ -796,8 +811,11 @@ public class Bunker extends WorldGenerator world.setBlock(x + 3, y + -20, z + 1, Block1, 0, 3); world.setBlock(x + 4, y + -20, z + 1, Blocks.chest, 5, 3); world.setBlockMetadataWithNotify(x + 4, y + -20, z + 1, 5, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(2), (TileEntityChest)world.getTileEntity(x + 4, y + -20, z + 1), 12); - world.setBlock(x + 8, y + -20, z + 1, Block4, 0, 3); + if(world.getBlock(x + 4, y + -20, z + 1) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(2), (TileEntityChest)world.getTileEntity(x + 4, y + -20, z + 1), 12); + } + world.setBlock(x + 8, y + -20, z + 1, Block4, 0, 3); world.setBlock(x + 9, y + -20, z + 1, Block4, 0, 3); world.setBlock(x + 10, y + -20, z + 1, Block4, 0, 3); world.setBlock(x + 11, y + -20, z + 1, Block1, 0, 3); diff --git a/com/hbm/world/Factory.java b/com/hbm/world/Factory.java index 05cfbfced..73fccb0c0 100644 --- a/com/hbm/world/Factory.java +++ b/com/hbm/world/Factory.java @@ -597,8 +597,11 @@ public class Factory extends WorldGenerator world.setBlock(x + 8, y + 0, z + 4, ModBlocks.factory_titanium_hull, 0, 3); world.setBlock(x + 9, y + 0, z + 4, Blocks.chest, 5, 3); world.setBlockMetadataWithNotify(x + 9, y + 0, z + 4, 5, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 4), rand.nextInt(2)+ 8); - world.setBlock(x + 13, y + 0, z + 4, Blocks.hopper, 3, 3); + if(world.getBlock(x + 9, y + 0, z + 4) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 4), rand.nextInt(2)+ 8); + } + world.setBlock(x + 13, y + 0, z + 4, Blocks.hopper, 3, 3); world.setBlock(x + 14, y + 0, z + 4, Blocks.stonebrick, 0, 3); world.setBlock(x + 0, y + 0, z + 5, Blocks.stonebrick, 0, 3); world.setBlock(x + 1, y + 0, z + 5, Blocks.stonebrick, 0, 3); @@ -630,8 +633,11 @@ public class Factory extends WorldGenerator world.setBlock(x + 8, y + 0, z + 10, ModBlocks.factory_titanium_hull, 0, 3); world.setBlock(x + 9, y + 0, z + 10, Blocks.chest, 5, 3); world.setBlockMetadataWithNotify(x + 9, y + 0, z + 10, 5, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 10), rand.nextInt(2)+ 8); - world.setBlock(x + 13, y + 0, z + 10, Blocks.hopper, 3, 3); + if(world.getBlock(x + 9, y + 0, z + 10) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 10), rand.nextInt(2)+ 8); + } + world.setBlock(x + 13, y + 0, z + 10, Blocks.hopper, 3, 3); world.setBlock(x + 14, y + 0, z + 10, Blocks.stonebrick, 0, 3); world.setBlock(x + 0, y + 0, z + 11, Blocks.stonebrick, 0, 3); world.setBlock(x + 1, y + 0, z + 11, Blocks.stonebrick, 0, 3); @@ -663,8 +669,11 @@ public class Factory extends WorldGenerator world.setBlock(x + 8, y + 0, z + 16, ModBlocks.factory_titanium_hull, 0, 3); world.setBlock(x + 9, y + 0, z + 16, Blocks.chest, 5, 3); world.setBlockMetadataWithNotify(x + 9, y + 0, z + 16, 5, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 16), rand.nextInt(2)+ 8); - world.setBlock(x + 13, y + 0, z + 16, Blocks.hopper, 3, 3); + if(world.getBlock(x + 9, y + 0, z + 16) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 16), rand.nextInt(2)+ 8); + } + world.setBlock(x + 13, y + 0, z + 16, Blocks.hopper, 3, 3); world.setBlock(x + 14, y + 0, z + 16, Blocks.stonebrick, 0, 3); world.setBlock(x + 0, y + 0, z + 17, Blocks.stonebrick, 0, 3); world.setBlock(x + 1, y + 0, z + 17, Blocks.stonebrick, 0, 3); @@ -723,8 +732,11 @@ public class Factory extends WorldGenerator world.setBlock(x + 3, y + 0, z + 25, Blocks.lava, 0, 3); world.setBlock(x + 4, y + 0, z + 25, Blocks.chest, 3, 3); world.setBlockMetadataWithNotify(x + 4, y + 0, z + 25, 3, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 4, y + 0, z + 25), rand.nextInt(2)+ 6); - world.setBlock(x + 5, y + 0, z + 25, Blocks.lava, 0, 3); + if(world.getBlock(x + 4, y + 0, z + 25) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 4, y + 0, z + 25), rand.nextInt(2)+ 6); + } + world.setBlock(x + 5, y + 0, z + 25, Blocks.lava, 0, 3); world.setBlock(x + 6, y + 0, z + 25, Blocks.stonebrick, 0, 3); world.setBlock(x + 7, y + 0, z + 25, Blocks.stone_brick_stairs, 5, 3); world.setBlock(x + 14, y + 0, z + 25, Block1, 4, 3); diff --git a/com/hbm/world/Silo.java b/com/hbm/world/Silo.java index 3afd80683..bb63d303e 100644 --- a/com/hbm/world/Silo.java +++ b/com/hbm/world/Silo.java @@ -386,8 +386,11 @@ public class Silo extends WorldGenerator world.setBlock(x + 18, y + -20, z + 10, Block1, 0, 3); world.setBlock(x + 19, y + -20, z + 10, Blocks.chest, 5, 3); world.setBlockMetadataWithNotify(x + 19, y + -20, z + 10, 5, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 19, y + -20, z + 10), rand.nextInt(2)+ 6); - world.setBlock(x + 20, y + -20, z + 10, Block1, 0, 3); + if(world.getBlock(x + 19, y + -20, z + 10) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 19, y + -20, z + 10), rand.nextInt(2)+ 6); + } + world.setBlock(x + 20, y + -20, z + 10, Block1, 0, 3); world.setBlock(x + 0, y + -20, z + 11, Block1, 0, 3); world.setBlock(x + 1, y + -20, z + 11, Blocks.air, 0, 3); world.setBlock(x + 2, y + -20, z + 11, Blocks.air, 0, 3); @@ -851,8 +854,11 @@ public class Silo extends WorldGenerator world.setBlock(x + 7, y + -17, z + 2, Block1, 0, 3); world.setBlock(x + 8, y + -17, z + 2, Blocks.chest, 3, 3); world.setBlockMetadataWithNotify(x + 8, y + -17, z + 2, 3, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(7), (TileEntityChest)world.getTileEntity(x + 8, y + -17, z + 2), rand.nextInt(2)+ 6); - world.setBlock(x + 10, y + -17, z + 2, Blocks.air, 0, 3); + if(world.getBlock(x + 8, y + -17, z + 2) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(7), (TileEntityChest)world.getTileEntity(x + 8, y + -17, z + 2), rand.nextInt(2)+ 6); + } + world.setBlock(x + 10, y + -17, z + 2, Blocks.air, 0, 3); world.setBlock(x + 11, y + -17, z + 2, Block1, 0, 3); world.setBlock(x + 7, y + -17, z + 3, Block1, 0, 3); world.setBlock(x + 8, y + -17, z + 3, Blocks.air, 0, 3); @@ -1632,8 +1638,11 @@ public class Silo extends WorldGenerator world.setBlock(x + 7, y + -9, z + 5, Block1, 0, 3); world.setBlock(x + 8, y + -9, z + 5, Blocks.chest, 2, 3); world.setBlockMetadataWithNotify(x + 8, y + -9, z + 2, 3, 3); - WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 8, y + -9, z + 5), rand.nextInt(2)+ 8); - world.setBlock(x + 8, y + -10, z + 5, Blocks.stone_slab, 8, 3); + if(world.getBlock(x + 8, y + -9, z + 2) == Blocks.chest) + { + WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 8, y + -9, z + 5), rand.nextInt(2)+ 8); + } + world.setBlock(x + 8, y + -10, z + 5, Blocks.stone_slab, 8, 3); world.setBlock(x + 9, y + -9, z + 5, Blocks.planks, 0, 3); world.setBlock(x + 10, y + -9, z + 5, Block4, 2, 3); world.setBlock(x + 11, y + -9, z + 5, Block1, 0, 3);