diff --git a/changelog b/changelog index 986a2f483..945aaaca5 100644 --- a/changelog +++ b/changelog @@ -40,6 +40,8 @@ * The recipes are part of a shared auto switch group, meaning that even if different rod types are produced, only one PUREX is necessary * Grass is no longer a valid paint block for paintable cables and ducts * Multiblocks are no longer affected by collapses caused by nuclear explosions +* The old NITAN powder chests have been removed + * In their place, there's now a different, more useful structure with similar but not identical spawn rules ## Fixed * Fixed arc furnace only allowing electrodes to be inserted when the lid is down instead of up @@ -52,3 +54,4 @@ * Fixed creepers regaining their exploding AI task upon relog, if defused * Fixed assembly and chemical factories not properly saving their recipe fluid buffers * Fixed light blue and light gray dyes not working when dyeing cables +* Fixed bismuth armor not having a valid repair material diff --git a/src/main/java/com/hbm/itempool/ItemPoolsSingle.java b/src/main/java/com/hbm/itempool/ItemPoolsSingle.java index 896369884..570df9ef6 100644 --- a/src/main/java/com/hbm/itempool/ItemPoolsSingle.java +++ b/src/main/java/com/hbm/itempool/ItemPoolsSingle.java @@ -17,6 +17,7 @@ public class ItemPoolsSingle { public static final String POOL_VAULT_REINFORCED = "POOL_VAULT_REINFORCED"; public static final String POOL_VAULT_UNBREAKABLE = "POOL_VAULT_UNBREAKABLE"; public static final String POOL_METEORITE_TREASURE = "POOL_METEORITE_TREASURE"; + public static final String POOL_BLUEPRINTS = "POOL_BLUEPRINTS"; public static void init() { @@ -108,5 +109,13 @@ public class ItemPoolsSingle { weighted(ModItems.blueprint_folder, 1, 1, 1, 1) }; }}; + + new ItemPool(POOL_BLUEPRINTS) {{ + this.pool = new WeightedRandomChestContent[] { + weighted(ModItems.blueprint_folder, 0, 1, 1, 10), + weighted(ModItems.blueprint_folder, 1, 1, 1, 5), + weighted(ModItems.blueprint_folder, 0, 1, 1, 1), + }; + }}; } } diff --git a/src/main/java/com/hbm/lib/HbmWorldGen.java b/src/main/java/com/hbm/lib/HbmWorldGen.java index e483d5489..a77d4a15c 100644 --- a/src/main/java/com/hbm/lib/HbmWorldGen.java +++ b/src/main/java/com/hbm/lib/HbmWorldGen.java @@ -16,6 +16,7 @@ import com.hbm.tileentity.bomb.TileEntityLandmine; import com.hbm.tileentity.deco.TileEntityLanternBehemoth; import com.hbm.tileentity.machine.storage.TileEntitySafe; import com.hbm.tileentity.machine.storage.TileEntitySoyuzCapsule; +import com.hbm.util.Compat; import com.hbm.util.LootGenerator; import com.hbm.util.WeightedRandomGeneric; import com.hbm.world.dungeon.*; @@ -27,6 +28,8 @@ import com.hbm.world.generator.DungeonToolbox; import cpw.mods.fml.common.IWorldGenerator; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.WeightedRandom; import net.minecraft.util.WeightedRandomChestContent; import net.minecraft.world.World; @@ -515,7 +518,32 @@ public class HbmWorldGen implements IWorldGenerator { world.setBlock(x, y, z, ModBlocks.stone_keyhole); } } + + genBlueprintChest(world, rand, i, j, 5000, 5000); + } + + private static void genBlueprintChest(World world, Random rand, int i, int j, int boundsX, int boundsZ) { + if(Math.abs(i) < 100 && Math.abs(j) < 100) return; + if(rand.nextBoolean()) return; + int cX = Math.abs(i) % boundsX; + int cZ = Math.abs(j) % boundsZ; + + if(cX <= 0 && cX + 16 >= 0 && cZ <= 0 && cZ + 16 >= 0) { + int x = i + 8; + int z = j + 8; + int y = world.getHeightValue(x, z) - rand.nextInt(2); + + world.setBlock(x, y, z, Blocks.chest); + + for(int a = x - 1; a <= x + 1; a++) for(int b = y - 1; b <= y + 1; b++) for(int c = z - 1; c <= z + 1; c++) { + if(a != x || b != y || c != z) world.setBlock(a, b, c, Blocks.obsidian); + } + + TileEntity tile = Compat.getTileStandard(world, x, y, z); + + if(tile instanceof TileEntityChest) WeightedRandomChestContent.generateChestContents(rand, ItemPool.getPool(ItemPoolsSingle.POOL_BLUEPRINTS), (TileEntityChest) tile, 50); + } } private void generateNether(World world, Random rand, int i, int j) { diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index 3c70beff3..e8c951ae4 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -305,6 +305,7 @@ public class MainRegistry { aMatSecurity.customCraftingMaterial = ModItems.plate_kevlar; aMatCobalt.customCraftingMaterial = ModItems.ingot_cobalt; aMatStarmetal.customCraftingMaterial = ModItems.ingot_starmetal; + aMatBismuth.customCraftingMaterial = ModItems.plate_bismuth; tMatSchrab.setRepairItem(new ItemStack(ModItems.ingot_schrabidium)); tMatHammmer.setRepairItem(new ItemStack(Item.getItemFromBlock(ModBlocks.block_schrabidium))); tMatChainsaw.setRepairItem(new ItemStack(ModItems.ingot_steel));