diff --git a/changelog b/changelog index 2b9abf3b3..386439537 100644 --- a/changelog +++ b/changelog @@ -22,6 +22,10 @@ * Earlygame tool made from iron and copper * Has the harvest level of iron, a durability of just 250 but the AoE ability * Great for getting cobblestone quickly or making tunnels when you don't have desh or electric tools yet +* Cracked key + * A single-use item that can open red rooms like the red key, but does not work as a skeleton key for locks + * Spawns in dungeon chests or as a rare drop from hostile mobs + * Allows red rooms to be accessed without crafting the red key ## Changed * Large turbines, levis and geothermal heat exchangers now have their own sounds when operating @@ -40,6 +44,8 @@ * Dirt MREs are now just regular low-quality MREs made from latex packaging and some easily obtainable earlygame ingredients - wheat, rotten flesh and saplings (makes 4) * The recipe for the chemical plant has been slightly simplified (again) * Iron furnaces now have a 20% faster base smelting speed, making them complete operations in 8 seconds instead of 10 without upgrades +* Due to rising chlorine prices and a failing halogen market, the recipe of combination smelting chlorocalcite into chlorine and calcium has been added back + * For legacy reasons, the chlorocalcite processing chain involving chemical plants and electrolyzers will continue to work ## Fixed * Fixed basalt ores dropping their items with invalid metadata diff --git a/src/main/java/com/hbm/blocks/generic/BlockKeyhole.java b/src/main/java/com/hbm/blocks/generic/BlockKeyhole.java index 7c195a114..b1306c8cd 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockKeyhole.java +++ b/src/main/java/com/hbm/blocks/generic/BlockKeyhole.java @@ -51,19 +51,23 @@ public class BlockKeyhole extends BlockStone { @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { - if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.key_red && side != 0 && side != 1) { - if(world.isRemote) return true; - ForgeDirection dir = ForgeDirection.getOrientation(side); - generateRoom(world, x - dir.offsetX * 4, y - 2, z - dir.offsetZ * 4); - int b = 0; - if(side == 2) b = 1; - if(side == 5) b = 2; - if(side == 3) b = 3; - if(side == 4) b = 0; - ItemModDoor.placeDoorBlock(world, x, y - 1, z, b, ModBlocks.door_red); - world.playSoundAtEntity(player, "hbm:block.lockOpen", 1.0F, 1.0F); - player.triggerAchievement(MainRegistry.achRedRoom); - return true; + if(player.getHeldItem() != null) { + boolean cracked = player.getHeldItem().getItem() == ModItems.key_red_cracked; + if((player.getHeldItem().getItem() == ModItems.key_red || cracked) && side != 0 && side != 1) { + if(cracked) player.getHeldItem().stackSize--; + if(world.isRemote) return true; + ForgeDirection dir = ForgeDirection.getOrientation(side); + generateRoom(world, x - dir.offsetX * 4, y - 2, z - dir.offsetZ * 4); + int b = 0; + if(side == 2) b = 1; + if(side == 5) b = 2; + if(side == 3) b = 3; + if(side == 4) b = 0; + ItemModDoor.placeDoorBlock(world, x, y - 1, z, b, ModBlocks.door_red); + world.playSoundAtEntity(player, "hbm:block.lockOpen", 1.0F, 1.0F); + player.triggerAchievement(MainRegistry.achRedRoom); + return true; + } } return false; diff --git a/src/main/java/com/hbm/inventory/recipes/CombinationRecipes.java b/src/main/java/com/hbm/inventory/recipes/CombinationRecipes.java index 3c5b8bdd2..1fe93cf7e 100644 --- a/src/main/java/com/hbm/inventory/recipes/CombinationRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CombinationRecipes.java @@ -44,7 +44,7 @@ public class CombinationRecipes extends SerializableRecipe { recipes.put(LIGNITE.dust(), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.LIGNITE), new FluidStack(Fluids.COALCREOSOTE, 50))); recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.LIGNITE)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.LIGNITE), new FluidStack(Fluids.COALCREOSOTE, 100))); - //recipes.put(CHLOROCALCITE.dust(), new Pair(new ItemStack(ModItems.powder_calcium), new FluidStack(Fluids.CHLORINE, 250))); + recipes.put(CHLOROCALCITE.dust(), new Pair(new ItemStack(ModItems.powder_calcium), new FluidStack(Fluids.CHLORINE, 250))); recipes.put(MOLYSITE.dust(), new Pair(new ItemStack(Items.iron_ingot), new FluidStack(Fluids.CHLORINE, 250))); recipes.put(CINNABAR.crystal(), new Pair(new ItemStack(ModItems.sulfur), new FluidStack(Fluids.MERCURY, 100))); recipes.put(new ComparableStack(Items.glowstone_dust), new Pair(new ItemStack(ModItems.sulfur), new FluidStack(Fluids.CHLORINE, 100))); diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index bbadae89c..0c07cb805 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -2347,6 +2347,7 @@ public class ModItems { public static Item key; public static Item key_red; + public static Item key_red_cracked; public static Item key_kit; public static Item key_fake; public static Item pin; @@ -4645,6 +4646,7 @@ public class ModItems { key = new ItemKey().setUnlocalizedName("key").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":key"); key_red = new ItemCustomLore().setUnlocalizedName("key_red").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":key_red"); + key_red_cracked = new ItemCustomLore().setUnlocalizedName("key_red_cracked").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":key_red_cracked"); key_kit = new ItemCounterfitKeys().setUnlocalizedName("key_kit").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":key_pair"); key_fake = new ItemKey().setUnlocalizedName("key_fake").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":key_gold"); pin = new ItemCustomLore().setUnlocalizedName("pin").setMaxStackSize(8).setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pin"); @@ -6872,6 +6874,7 @@ public class ModItems { //Keys and Locks GameRegistry.registerItem(key, key.getUnlocalizedName()); GameRegistry.registerItem(key_red, key_red.getUnlocalizedName()); + GameRegistry.registerItem(key_red_cracked, key_red_cracked.getUnlocalizedName()); GameRegistry.registerItem(key_kit, key_kit.getUnlocalizedName()); GameRegistry.registerItem(key_fake, key_fake.getUnlocalizedName()); GameRegistry.registerItem(mech_key, mech_key.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index fc7d9bc9c..080f463d2 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -347,7 +347,9 @@ public class MainRegistry { ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(ModItems.bathwater), 1, 1, 1)); ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(ModItems.serum), 1, 1, 5)); ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(ModItems.no9), 1, 1, 5)); + ChestGenHooks.addItem(ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new ItemStack(ModItems.key_red_cracked), 1, 1, 5)); ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.heart_piece), 1, 1, 1)); + ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.key_red_cracked), 1, 1, 5)); ChestGenHooks.addItem(ChestGenHooks.PYRAMID_DESERT_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.heart_piece), 1, 1, 1)); ChestGenHooks.addItem(ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.heart_piece), 1, 1, 1)); ChestGenHooks.addItem(ChestGenHooks.DUNGEON_CHEST, new WeightedRandomChestContent(new ItemStack(ModItems.scrumpy), 1, 1, 1)); diff --git a/src/main/java/com/hbm/main/ModEventHandler.java b/src/main/java/com/hbm/main/ModEventHandler.java index d0ab5626f..edd594447 100644 --- a/src/main/java/com/hbm/main/ModEventHandler.java +++ b/src/main/java/com/hbm/main/ModEventHandler.java @@ -322,8 +322,9 @@ public class ModEventHandler { event.entityLiving.dropItem(ModItems.bandaid, 1); } - if(event.entityLiving instanceof IMob && event.entityLiving.getRNG().nextInt(1000) == 0) { - event.entityLiving.dropItem(ModItems.heart_piece, 1); + if(event.entityLiving instanceof IMob) { + if(event.entityLiving.getRNG().nextInt(1000) == 0) event.entityLiving.dropItem(ModItems.heart_piece, 1); + if(event.entityLiving.getRNG().nextInt(250) == 0) event.entityLiving.dropItem(ModItems.key_red_cracked, 1); } if(event.entityLiving instanceof EntityCyberCrab && event.entityLiving.getRNG().nextInt(500) == 0) { diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 83a7ea76a..825ebcafd 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -2216,6 +2216,7 @@ item.key.name=Schlüssel item.key_fake.name=Gefälschter Schlüssel item.key_kit.name=Schlüssel-Imitationskit item.key_red.name=Roter Schlüssel +item.key_red_cracked.name=Zerbrochener Schlüssel item.kit_toolbox.name=Werkzeugkasten item.kit_toolbox_empty.name=Leerer Werkzeugkasten item.laser_crystal_bismuth.desc=Bismuth-Samarium-Uran-Thorium-Kristallmatrix diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index ae9250687..bd97239b7 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -2964,6 +2964,9 @@ item.key_kit.name=Key Imitation Kit item.key_red.name=Red Key item.key_red.desc=Explore the other side. item.key_red.desc.P11=§4e§r +item.key_red_cracked.name=Cracked Key +item.key_red_cracked.desc=??? +item.key_red.key_red_cracked.P11=§4???§r item.kit_toolbox.name=Toolbox item.kit_toolbox_empty.name=Empty Toolbox item.laser_crystal_bismuth.desc=Bismuth-Samarium-Uranium-Thorium crystal matrix diff --git a/src/main/resources/assets/hbm/textures/items/key_red_cracked.png b/src/main/resources/assets/hbm/textures/items/key_red_cracked.png new file mode 100644 index 000000000..7abe81c3c Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/key_red_cracked.png differ