diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-07-11 23:52:42 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-07-11 23:52:42 +1000 |
commit | a0cd6de79d44979992bbf6a0c59cd4169e9450c7 (patch) | |
tree | 4e9b3ce36dc4a1b9480a303aab7effd9e57d3c2d /src | |
parent | 46131acd09225b99b8fa5618102ed4409942845a (diff) | |
download | GT5-Unofficial-a0cd6de79d44979992bbf6a0c59cd4169e9450c7.tar.gz GT5-Unofficial-a0cd6de79d44979992bbf6a0c59cd4169e9450c7.tar.bz2 GT5-Unofficial-a0cd6de79d44979992bbf6a0c59cd4169e9450c7.zip |
$ Fixed Post 5.09.28 Circuit Assembler recipe removal.
> Idea suggested by @Dragon2488 - Always saving my ass.
Diffstat (limited to 'src')
-rw-r--r-- | src/Java/gregtech/api/util/EmptyRecipeMap.java | 49 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/GTplusplus.java | 7 |
2 files changed, 53 insertions, 3 deletions
diff --git a/src/Java/gregtech/api/util/EmptyRecipeMap.java b/src/Java/gregtech/api/util/EmptyRecipeMap.java new file mode 100644 index 0000000000..60da5c3d0a --- /dev/null +++ b/src/Java/gregtech/api/util/EmptyRecipeMap.java @@ -0,0 +1,49 @@ +package gregtech.api.util; + +import java.util.Collection; + +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class EmptyRecipeMap extends GT_Recipe_Map{ + + public EmptyRecipeMap(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) { + super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, + aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, + aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); + + } + + @Override + public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + return null; + + } + + @Override + public GT_Recipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + return null; + } + + @Override + public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { + return null; + } + + @Override + public GT_Recipe addRecipe(GT_Recipe aRecipe) { + return null; + } + + @Override + protected GT_Recipe addRecipe(GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) { + return null; + } + + @Override + public GT_Recipe add(GT_Recipe aRecipe) { + return null; + } + +} diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index 393ad77612..d8df9cf6fd 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -19,6 +19,7 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.GT_Values; +import gregtech.api.util.EmptyRecipeMap; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map; @@ -182,6 +183,7 @@ public class GTplusplus implements ActionListener { // FirstCall(); FMLCommonHandler.instance().bus().register(new LoginEventHandler()); Utils.LOG_INFO("Login Handler Initialized"); + removeCircuitRecipeMap(); // Handle GT++ Config handleConfigFile(event); @@ -252,7 +254,6 @@ public class GTplusplus implements ActionListener { if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && CORE.configSwitches.enableOldGTcircuits){ } - removeCircuitRecipeMap(); } @Mod.EventHandler @@ -285,11 +286,11 @@ public class GTplusplus implements ActionListener { try { - ReflectionUtils.setFinalStatic(GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"), new GT_Recipe_Map(new HashSet<GT_Recipe>(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false)); + ReflectionUtils.setFinalStatic(GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"), new EmptyRecipeMap(new HashSet<GT_Recipe>(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false)); Field jaffar = GT_Recipe_Map.class.getDeclaredField("sCircuitAssemblerRecipes"); FieldUtils.removeFinalModifier(jaffar, true); - jaffar.set(null, null); + jaffar.set(null, new EmptyRecipeMap(new HashSet<GT_Recipe>(0), "gt.recipe.removed", "Removed", null, GT_Values.RES_PATH_GUI + "basicmachines/Default", 0, 0, 0, 0, 0, GT_Values.E, 0, GT_Values.E, true, false)); //GT_Recipe_Map.sCircuitAssemblerRecipes. |