From c5e2fe287c4232fb3c790bae5382ea0f4c634bfb Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Thu, 7 Aug 2014 12:04:18 +0200 Subject: [PATCH] Add more expensive silky cloth and jewel config --- .../reference/Config.java | 6 +++++- .../tweaks/IguanaTweaks.java | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java b/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java index b09fb1a..4f76026 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/reference/Config.java @@ -56,10 +56,12 @@ public class Config { public static boolean addFlintRecipe; public static int recipeGravelPerFlint; public static boolean disableStoneTools; - public static boolean removeStoneTorchRecipe; public static boolean castsBurnMaterial; public static boolean easyToolRepair; public static boolean allowPartReuse; + public static boolean removeStoneTorchRecipe; + public static boolean moreExpensiveSilkyCloth; + public static boolean moreExpensiveSilkyJewel; // debug public static boolean showDebugXP; @@ -160,6 +162,8 @@ public class Config { // stuff removeStoneTorchRecipe = configfile.getBoolean("removeStoneTorchRecipe", CATEGORY_Tweaks, false, "Removes the recipe for Tinker's Construct's stone torch"); + moreExpensiveSilkyCloth = configfile.getBoolean("moreExpensiveSilkyCloth", CATEGORY_Tweaks, true, "Silky Cloth needs gold ingots, instead of nuggets"); + moreExpensiveSilkyJewel = configfile.getBoolean("moreExpensiveSilkyJewel", CATEGORY_Tweaks, false, "Silky Jewel needs an emerald block, instead of one emerald"); /** Debug **/ diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/tweaks/IguanaTweaks.java b/src/main/java/iguanaman/iguanatweakstconstruct/tweaks/IguanaTweaks.java index b848309..55a56e5 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/tweaks/IguanaTweaks.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/tweaks/IguanaTweaks.java @@ -17,12 +17,14 @@ import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.oredict.ShapedOreRecipe; import tconstruct.library.TConstructRegistry; import tconstruct.library.crafting.CastingRecipe; import tconstruct.library.crafting.PatternBuilder; import tconstruct.library.crafting.ToolBuilder; import tconstruct.library.util.IPattern; import tconstruct.smeltery.TinkerSmeltery; +import tconstruct.tools.TinkerTools; import tconstruct.world.TinkerWorld; import java.lang.reflect.Field; @@ -65,6 +67,22 @@ public class IguanaTweaks { Log.info("Removing stone torch recipe"); RecipeRemover.removeAnyRecipeFor(Item.getItemFromBlock(TinkerWorld.stoneTorch)); } + + // silky jewel nerfs + if(Config.moreExpensiveSilkyCloth) + { + Log.info("Making Silky Cloth more expensive"); + RecipeRemover.removeAnyRecipe(new ItemStack(TinkerTools.materials, 1, 25)); + String[] patSurround = { "###", "#m#", "###" }; + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 1, 25), patSurround, 'm', new ItemStack(TinkerTools.materials, 1, 14), '#', new ItemStack(Items.string)); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerTools.materials, 1, 25), patSurround, 'm', "ingotGold", '#', new ItemStack(Items.string))); + } + if(Config.moreExpensiveSilkyJewel) + { + Log.info("Making Silky Jewel more expensive"); + RecipeRemover.removeAnyRecipe(new ItemStack(TinkerTools.materials, 1, 26)); + GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 1, 26), " c ", "cec", " c ", 'c', new ItemStack(TinkerTools.materials, 1, 25), 'e', new ItemStack(Item.getItemFromBlock(Blocks.emerald_block))); + } } private void flintTweaks()