diff options
author | Alkalus <draknyte1@hotmail.com> | 2017-11-27 00:53:16 +1000 |
---|---|---|
committer | Alkalus <draknyte1@hotmail.com> | 2017-11-27 00:53:16 +1000 |
commit | 5fb4cdd13a452737f2bb62d84779de5067791a9b (patch) | |
tree | 17dfe2ce51e321676153673a485f484660248f6b /src/Java/gtPlusPlus | |
parent | 9d57f7f2f399689f5d39e0a130f363e5f5aa6877 (diff) | |
download | GT5-Unofficial-5fb4cdd13a452737f2bb62d84779de5067791a9b.tar.gz GT5-Unofficial-5fb4cdd13a452737f2bb62d84779de5067791a9b.tar.bz2 GT5-Unofficial-5fb4cdd13a452737f2bb62d84779de5067791a9b.zip |
- Removed Mekanism changes if RedTech is loaded.
Diffstat (limited to 'src/Java/gtPlusPlus')
4 files changed, 132 insertions, 128 deletions
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java b/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java index 1bf729cdc6..b534cd11cd 100644 --- a/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java +++ b/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java @@ -6,7 +6,6 @@ import gtPlusPlus.xmod.forestry.HANDLER_FR; import gtPlusPlus.xmod.gregtech.HANDLER_GT; import gtPlusPlus.xmod.growthcraft.HANDLER_GC; import gtPlusPlus.xmod.ic2.HANDLER_IC2; -import gtPlusPlus.xmod.mekanism.HANDLER_Mekanism; import gtPlusPlus.xmod.thaumcraft.common.HANDLER_Thaumcraft; import gtPlusPlus.xmod.thermalfoundation.HANDLER_TF; @@ -20,9 +19,8 @@ public class COMPAT_IntermodStaging { HANDLER_IC2.preInit(); HANDLER_Computronics.preInit(); HANDLER_BiomesOPlenty.preInit(); - HANDLER_Mekanism.preInit(); + //HANDLER_Mekanism.preInit(); HANDLER_Thaumcraft.preInit(); - } public static void init(){ @@ -33,7 +31,7 @@ public class COMPAT_IntermodStaging { HANDLER_IC2.init(); HANDLER_Computronics.init(); HANDLER_BiomesOPlenty.init(); - HANDLER_Mekanism.init(); + //HANDLER_Mekanism.init(); HANDLER_Thaumcraft.init(); } @@ -45,7 +43,7 @@ public class COMPAT_IntermodStaging { HANDLER_IC2.postInit(); HANDLER_Computronics.postInit(); HANDLER_BiomesOPlenty.postInit(); - HANDLER_Mekanism.postInit(); + //HANDLER_Mekanism.postInit(); HANDLER_Thaumcraft.postInit(); } diff --git a/src/Java/gtPlusPlus/core/lib/LoadedMods.java b/src/Java/gtPlusPlus/core/lib/LoadedMods.java index d97b41641d..dda50a0d84 100644 --- a/src/Java/gtPlusPlus/core/lib/LoadedMods.java +++ b/src/Java/gtPlusPlus/core/lib/LoadedMods.java @@ -45,6 +45,7 @@ public class LoadedMods { public static boolean PamsHarvestcraft = false; public static boolean GalacticraftCore = false; public static boolean Mekanism = false; + public static boolean RedTech = false; @@ -242,8 +243,13 @@ public class LoadedMods { Utils.LOG_INFO("Components disabled for: Computronics - This feature will enable itself if you remove Computronics."); totalMods++; } + if (Loader.isModLoaded("GTRedtech") == true){ + RedTech = true; + Utils.LOG_INFO("Components enabled for: GTRedtech"); + totalMods++; + } else { - Utils.LOG_INFO("Components enabled for: Computronics - This feature will disable itself if you add Computronics."); + Utils.LOG_INFO("Components enabled for: Computronics - This feature will disable itself if you add Computronics."); } Utils.LOG_INFO("Content found for "+totalMods+" mods"); diff --git a/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java b/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java index 26cefe7254..018e0bee82 100644 --- a/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java +++ b/src/Java/gtPlusPlus/preloader/Preloader_GT_OreDict.java @@ -10,48 +10,48 @@ import net.minecraft.item.ItemStack; public class Preloader_GT_OreDict { - public static boolean shouldPreventRegistration(String string, ItemStack bannedItem) { + public static boolean shouldPreventRegistration(final String string, final ItemStack bannedItem) { try { if (CORE_Preloader.enableOldGTcircuits){ - if (bannedItem != null && ItemUtils.getModId(bannedItem).toLowerCase().equals("gregtech")){ - int damageValue = bannedItem.getItemDamage() - 32000; + if ((bannedItem != null) && ItemUtils.getModId(bannedItem).toLowerCase().equals("gregtech")){ + final int damageValue = bannedItem.getItemDamage() - 32000; if (bannedItem.getItem() instanceof GT_MetaGenerated_Item_01) { // 700-720 - if (damageValue >= 700 && damageValue <= 720) { + if ((damageValue >= 700) && (damageValue <= 720)) { return true; } } else { try { if (Class.forName("gregtech.common.items.GT_MetaGenerated_Item_03") != null) { // 6/11/12/14/16/20/30-57/69-73/79-96 - Class<?> MetaItem03 = Class.forName("gregtech.common.items.GT_MetaGenerated_Item_03"); + final Class<?> MetaItem03 = Class.forName("gregtech.common.items.GT_MetaGenerated_Item_03"); if (isInstanceOf(MetaItem03, bannedItem.getItem())) { - if (damageValue == 6 || damageValue == 7 || damageValue == 11 || damageValue == 12 || damageValue == 14 - || damageValue == 16 || damageValue == 20 || damageValue == 21 || damageValue == 22) { + if ((damageValue == 6) || (damageValue == 7) || (damageValue == 11) || (damageValue == 12) || (damageValue == 14) + || (damageValue == 16) || (damageValue == 20) || (damageValue == 21) || (damageValue == 22)) { return true; } - else if (damageValue >= 30 && damageValue <= 57) { + else if ((damageValue >= 30) && (damageValue <= 57)) { return true; } - else if (damageValue >= 69 && damageValue <= 73) { + else if ((damageValue >= 69) && (damageValue <= 73)) { return true; } - else if (damageValue >= 78 && damageValue <= 96) { + else if ((damageValue >= 78) && (damageValue <= 96)) { return true; } } } } - catch (ClassNotFoundException e) { + catch (final ClassNotFoundException e) { } } } } - + //Mekanism Support - Let's not make Mek Osmium useful in GT anymore. - if (bannedItem != null && (ItemUtils.getModId(bannedItem).toLowerCase().equals("mekanism") || LoadedMods.Mekanism)){ + if ((((bannedItem != null) && (ItemUtils.getModId(bannedItem).toLowerCase().equals("mekanism"))) || (LoadedMods.Mekanism)) && !LoadedMods.RedTech){ //Circuits if (Class.forName("mekanism.common.item.ItemControlCircuit") != null) { - Class<?> MekCircuit = Class.forName("mekanism.common.item.ItemControlCircuit"); + final Class<?> MekCircuit = Class.forName("mekanism.common.item.ItemControlCircuit"); if (isInstanceOf(MekCircuit, bannedItem.getItem())) { for (int r=0;r<4;r++){ if (bannedItem.getItemDamage() == r){ @@ -63,7 +63,7 @@ public class Preloader_GT_OreDict { } //Ingots if (Class.forName("mekanism.common.item.ItemIngot") != null) { - Class<?> MekIngot = Class.forName("mekanism.common.item.ItemIngot"); + final Class<?> MekIngot = Class.forName("mekanism.common.item.ItemIngot"); if (isInstanceOf(MekIngot, bannedItem.getItem())) { if (bannedItem.getItemDamage() == 1){ FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing "+bannedItem.getDisplayName()+" from the OreDictionary to balance Mekanism."); @@ -73,7 +73,7 @@ public class Preloader_GT_OreDict { } //Dirty Dust if (Class.forName("mekanism.common.item.ItemDirtyDust") != null) { - Class<?> MekIngot = Class.forName("mekanism.common.item.ItemDirtyDust"); + final Class<?> MekIngot = Class.forName("mekanism.common.item.ItemDirtyDust"); if (isInstanceOf(MekIngot, bannedItem.getItem())) { if (bannedItem.getItemDamage() == 2){ FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing "+bannedItem.getDisplayName()+" from the OreDictionary to balance Mekanism."); @@ -83,27 +83,27 @@ public class Preloader_GT_OreDict { } //Dust if (Class.forName("mekanism.common.item.ItemDust") != null) { - Class<?> MekIngot = Class.forName("mekanism.common.item.ItemDust"); + final Class<?> MekIngot = Class.forName("mekanism.common.item.ItemDust"); if (isInstanceOf(MekIngot, bannedItem.getItem())) { if (bannedItem.getItemDamage() == 2){ FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing "+bannedItem.getDisplayName()+" from the OreDictionary to balance Mekanism."); return true; } } - } + } //Crystal if (Class.forName("mekanism.common.item.ItemCrystal") != null) { - Class<?> MekIngot = Class.forName("mekanism.common.item.ItemCrystal"); + final Class<?> MekIngot = Class.forName("mekanism.common.item.ItemCrystal"); if (isInstanceOf(MekIngot, bannedItem.getItem())) { if (bannedItem.getItemDamage() == 2){ FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing "+bannedItem.getDisplayName()+" from the OreDictionary to balance Mekanism."); return true; } } - } + } //Shard if (Class.forName("mekanism.common.item.ItemShard") != null) { - Class<?> MekIngot = Class.forName("mekanism.common.item.ItemShard"); + final Class<?> MekIngot = Class.forName("mekanism.common.item.ItemShard"); if (isInstanceOf(MekIngot, bannedItem.getItem())) { if (bannedItem.getItemDamage() == 2){ FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing "+bannedItem.getDisplayName()+" from the OreDictionary to balance Mekanism."); @@ -113,18 +113,18 @@ public class Preloader_GT_OreDict { } //Clump if (Class.forName("mekanism.common.item.ItemClump") != null) { - Class<?> MekIngot = Class.forName("mekanism.common.item.ItemClump"); + final Class<?> MekIngot = Class.forName("mekanism.common.item.ItemClump"); if (isInstanceOf(MekIngot, bannedItem.getItem())) { if (bannedItem.getItemDamage() == 2){ FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing "+bannedItem.getDisplayName()+" from the OreDictionary to balance Mekanism."); return true; } } - } + } //Ores if (Class.forName("mekanism.common.item.ItemBlockOre") != null) { - Class<?> MekOre = Class.forName("mekanism.common.item.ItemBlockOre"); - if (isInstanceOf(MekOre, bannedItem.getItem()) || bannedItem == ItemUtils.simpleMetaStack("Mekanism:OreBlock", 0, 1)) { + final Class<?> MekOre = Class.forName("mekanism.common.item.ItemBlockOre"); + if (isInstanceOf(MekOre, bannedItem.getItem()) || (bannedItem == ItemUtils.simpleMetaStack("Mekanism:OreBlock", 0, 1))) { if (bannedItem.getItemDamage() == 0){ FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Removing "+bannedItem.getDisplayName()+" from the OreDictionary to balance Mekanism."); return true; @@ -133,7 +133,7 @@ public class Preloader_GT_OreDict { } } - } catch (Throwable e) { + } catch (final Throwable e) { FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "A mod tried to register an invalid item with the OreDictonary."); if (bannedItem != null){ FMLRelaunchLog.log("[GT++ ASM] OreDictTransformer", Level.INFO, "Please report this issue to the authors of "+ItemUtils.getModId(bannedItem)); @@ -144,7 +144,7 @@ public class Preloader_GT_OreDict { } // Simplification of Life. - private static boolean isInstanceOf(Class<?> clazz, Object obj) { + private static boolean isInstanceOf(final Class<?> clazz, final Object obj) { return clazz.isInstance(obj); } diff --git a/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java b/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java index 401bd19e83..ce4ec38a09 100644 --- a/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java +++ b/src/Java/gtPlusPlus/xmod/mekanism/HANDLER_Mekanism.java @@ -27,180 +27,180 @@ public class HANDLER_Mekanism { } public static void postInit(){ - if (LoadedMods.Mekanism){ - + if (LoadedMods.Mekanism && !LoadedMods.RedTech){ + Utils.LOG_INFO("Performing GT recipe balance for Mek. now that it's Osmium is useless."); - + //Steel Casing - ItemStack tSteelCasing = ItemUtils.simpleMetaStack("Mekanism:BasicBlock:8", 8, 1); + final ItemStack tSteelCasing = ItemUtils.simpleMetaStack("Mekanism:BasicBlock:8", 8, 1); addNewRecipe( - "plateSteel", "blockGlass", "plateSteel", - "blockGlass", "plateStainlessSteel", "blockGlass", + "plateSteel", "blockGlass", "plateSteel", + "blockGlass", "plateStainlessSteel", "blockGlass", "plateSteel", "blockGlass", "plateSteel", tSteelCasing); //Energy Storage - ItemStack tAdvancedEnergyCube = ItemUtils.simpleMetaStack("Mekanism:EnergyCube", 0, 1).copy(); + final ItemStack tAdvancedEnergyCube = ItemUtils.simpleMetaStack("Mekanism:EnergyCube", 0, 1).copy(); NBTUtils.setString(tAdvancedEnergyCube, "tier", "Advanced"); - ItemStack tBasicEnergyCube = ItemUtils.simpleMetaStack("Mekanism:EnergyCube", 0, 1).copy(); + final ItemStack tBasicEnergyCube = ItemUtils.simpleMetaStack("Mekanism:EnergyCube", 0, 1).copy(); NBTUtils.setString(tBasicEnergyCube, "tier", "Basic"); //Gas tanks - ItemStack tBasicGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); + final ItemStack tBasicGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); NBTUtils.setInteger(tBasicGasTank, "tier", 0); - ItemStack tAdvancedGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); + final ItemStack tAdvancedGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); NBTUtils.setInteger(tAdvancedGasTank, "tier", 1); - ItemStack tEliteGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); + final ItemStack tEliteGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); NBTUtils.setInteger(tEliteGasTank, "tier", 2); - ItemStack tMasterGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); + final ItemStack tMasterGasTank = ItemUtils.simpleMetaStack("Mekanism:GasTank", 0, 1).copy(); NBTUtils.setInteger(tMasterGasTank, "tier", 3); //Machines that use Osmium - ItemStack tMachineBlock_Basic = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:5", 5, 1); - ItemStack tMachineBlock = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:6", 6, 1); + final ItemStack tMachineBlock_Basic = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:5", 5, 1); + final ItemStack tMachineBlock = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:6", 6, 1); //Smelting - ItemStack tMachineBlock_0_Basic = tMachineBlock_Basic.copy(); + final ItemStack tMachineBlock_0_Basic = tMachineBlock_Basic.copy(); NBTUtils.setInteger(tMachineBlock_0_Basic, "recipeType", 0); - ItemStack tMachineBlock_0 = tMachineBlock.copy(); + final ItemStack tMachineBlock_0 = tMachineBlock.copy(); NBTUtils.setInteger(tMachineBlock_0, "recipeType", 0); //Enriching - ItemStack tMachineBlock_1_Basic = tMachineBlock_Basic.copy(); + final ItemStack tMachineBlock_1_Basic = tMachineBlock_Basic.copy(); NBTUtils.setInteger(tMachineBlock_1_Basic, "recipeType", 1); - ItemStack tMachineBlock_1 = tMachineBlock.copy(); + final ItemStack tMachineBlock_1 = tMachineBlock.copy(); NBTUtils.setInteger(tMachineBlock_1, "recipeType", 1); //Crushing - ItemStack tMachineBlock_2_Basic = tMachineBlock_Basic.copy(); + final ItemStack tMachineBlock_2_Basic = tMachineBlock_Basic.copy(); NBTUtils.setInteger(tMachineBlock_2_Basic, "recipeType", 2); - ItemStack tMachineBlock_2 = tMachineBlock.copy(); + final ItemStack tMachineBlock_2 = tMachineBlock.copy(); NBTUtils.setInteger(tMachineBlock_2, "recipeType", 2); //Compressing - ItemStack tMachineBlock_3_Basic = tMachineBlock_Basic.copy(); + final ItemStack tMachineBlock_3_Basic = tMachineBlock_Basic.copy(); NBTUtils.setInteger(tMachineBlock_3_Basic, "recipeType", 3); - ItemStack tMachineBlock_3 = tMachineBlock.copy(); + final ItemStack tMachineBlock_3 = tMachineBlock.copy(); NBTUtils.setInteger(tMachineBlock_3, "recipeType", 3); //Combining - ItemStack tMachineBlock_4_Basic = tMachineBlock_Basic.copy(); + final ItemStack tMachineBlock_4_Basic = tMachineBlock_Basic.copy(); NBTUtils.setInteger(tMachineBlock_4_Basic, "recipeType", 4); - ItemStack tMachineBlock_4 = tMachineBlock.copy(); + final ItemStack tMachineBlock_4 = tMachineBlock.copy(); NBTUtils.setInteger(tMachineBlock_4, "recipeType", 4); //Purifying - ItemStack tMachineBlock_5_Basic = tMachineBlock_Basic.copy(); + final ItemStack tMachineBlock_5_Basic = tMachineBlock_Basic.copy(); NBTUtils.setInteger(tMachineBlock_5_Basic, "recipeType", 5); - ItemStack tMachineBlock_5 = tMachineBlock.copy(); + final ItemStack tMachineBlock_5 = tMachineBlock.copy(); NBTUtils.setInteger(tMachineBlock_5, "recipeType", 5); //Injecting - ItemStack tMachineBlock_6_Basic = tMachineBlock_Basic.copy(); + final ItemStack tMachineBlock_6_Basic = tMachineBlock_Basic.copy(); NBTUtils.setInteger(tMachineBlock_6_Basic, "recipeType", 6); - ItemStack tMachineBlock_6 = tMachineBlock.copy(); + final ItemStack tMachineBlock_6 = tMachineBlock.copy(); NBTUtils.setInteger(tMachineBlock_6, "recipeType", 6); //Infusing - ItemStack tMachineBlock_7_Basic = tMachineBlock_Basic.copy(); + final ItemStack tMachineBlock_7_Basic = tMachineBlock_Basic.copy(); NBTUtils.setInteger(tMachineBlock_7_Basic, "recipeType", 7); - ItemStack tMachineBlock_7 = tMachineBlock.copy(); + final ItemStack tMachineBlock_7 = tMachineBlock.copy(); NBTUtils.setInteger(tMachineBlock_7, "recipeType", 7); //Infuser - ItemStack tMachineBlock_8 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:8", 8, 1); + final ItemStack tMachineBlock_8 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:8", 8, 1); //Purification - ItemStack tMachineBlock_9 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:9", 9, 1); + final ItemStack tMachineBlock_9 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:9", 9, 1); //Pump - ItemStack tMachineBlock_12 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:12", 12, 1); + final ItemStack tMachineBlock_12 = ItemUtils.simpleMetaStack("Mekanism:MachineBlock:12", 12, 1); //<Mekanism:ElectrolyticCore> - ItemStack tItem_1 = ItemUtils.simpleMetaStack("Mekanism:ElectrolyticCore", 0, 1); + final ItemStack tItem_1 = ItemUtils.simpleMetaStack("Mekanism:ElectrolyticCore", 0, 1); //<Mekanism:FactoryInstaller:1> - ItemStack tItem_2 = ItemUtils.simpleMetaStack("Mekanism:FactoryInstaller:1", 1, 1); + final ItemStack tItem_2 = ItemUtils.simpleMetaStack("Mekanism:FactoryInstaller:1", 1, 1); //<Mekanism:SpeedUpgrade> - ItemStack tItem_3 = ItemUtils.simpleMetaStack("Mekanism:SpeedUpgrade", 0, 1); + final ItemStack tItem_3 = ItemUtils.simpleMetaStack("Mekanism:SpeedUpgrade", 0, 1); //MiscItems - String tAdvancedAlloy = "alloyAdvanced"; - String tCircuitAdvanced = "circuitAdvanced"; - ItemStack tMekBatterySimple = ItemUtils.simpleMetaStack("Mekanism:EnergyTablet", 0, 1); + final String tAdvancedAlloy = "alloyAdvanced"; + final String tCircuitAdvanced = "circuitAdvanced"; + final ItemStack tMekBatterySimple = ItemUtils.simpleMetaStack("Mekanism:EnergyTablet", 0, 1); //Items addNewRecipe( - tAdvancedAlloy, "plateTitanium", tAdvancedAlloy, - "dustIron", tAdvancedAlloy, "dustGold", - tAdvancedAlloy, "plateTitanium", tAdvancedAlloy, + tAdvancedAlloy, "plateTitanium", tAdvancedAlloy, + "dustIron", tAdvancedAlloy, "dustGold", + tAdvancedAlloy, "plateTitanium", tAdvancedAlloy, tItem_1); addNewRecipe( - tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, - "plateStainlessSteel", "plankWood", "plateStainlessSteel", - tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, + tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, + "plateStainlessSteel", "plankWood", "plateStainlessSteel", + tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, tItem_2); addNewRecipe( - null, "blockGlass", null, - tAdvancedAlloy, "plateTungsten", tAdvancedAlloy, - null, "blockGlass", null, + null, "blockGlass", null, + tAdvancedAlloy, "plateTungsten", tAdvancedAlloy, + null, "blockGlass", null, tItem_3); //Power Storage addNewRecipe( - tAdvancedAlloy, tMekBatterySimple, tAdvancedAlloy, - "plateAluminium", tBasicEnergyCube, "plateAluminium", - tAdvancedAlloy, tMekBatterySimple, tAdvancedAlloy, + tAdvancedAlloy, tMekBatterySimple, tAdvancedAlloy, + "plateAluminium", tBasicEnergyCube, "plateAluminium", + tAdvancedAlloy, tMekBatterySimple, tAdvancedAlloy, tAdvancedEnergyCube); //Blocks addNewRecipe( - "plateSteel", "craftingFurnace", "plateSteel", - "plateRedstone", "platePlatinum", "plateRedstone", - "plateSteel", "craftingFurnace", "plateSteel", + "plateSteel", "craftingFurnace", "plateSteel", + "plateRedstone", "platePlatinum", "plateRedstone", + "plateSteel", "craftingFurnace", "plateSteel", tMachineBlock_8); addNewRecipe( - tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, - "plateTitanium", ItemUtils.simpleMetaStack("Mekanism:MachineBlock", 0, 1), "plateTitanium", - tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, + tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, + "plateTitanium", ItemUtils.simpleMetaStack("Mekanism:MachineBlock", 0, 1), "plateTitanium", + tAdvancedAlloy, "circuitAdvanced", tAdvancedAlloy, tMachineBlock_9); addNewRecipe( - null, ItemUtils.getSimpleStack(Items.bucket), null, - tAdvancedAlloy, tSteelCasing, tAdvancedAlloy, - "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel", + null, ItemUtils.getSimpleStack(Items.bucket), null, + tAdvancedAlloy, tSteelCasing, tAdvancedAlloy, + "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel", tMachineBlock_12); //Machines addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_0_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_0_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, tMachineBlock_0); addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_1_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_1_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, tMachineBlock_1); addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_2_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_2_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, tMachineBlock_2); addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_3_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_3_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, tMachineBlock_3); addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_4_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_4_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, tMachineBlock_4); addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_5_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_5_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, tMachineBlock_5); addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_6_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_6_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, tMachineBlock_6); addNewRecipe( - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - "plateStainlessSteel", tMachineBlock_7_Basic, "plateStainlessSteel", - tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, - tMachineBlock_7); + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + "plateStainlessSteel", tMachineBlock_7_Basic, "plateStainlessSteel", + tAdvancedAlloy, tCircuitAdvanced, tAdvancedAlloy, + tMachineBlock_7); //Gas Tanks addNewRecipe( @@ -222,7 +222,7 @@ public class HANDLER_Mekanism { "alloyUltimate", "plateTungsten", "alloyUltimate", "plateTungsten", tEliteGasTank, "plateTungsten", "alloyUltimate", "plateTungsten", "alloyUltimate", - tMasterGasTank); + tMasterGasTank); } } @@ -234,34 +234,34 @@ public class HANDLER_Mekanism { /*if (removeRecipe(OutputItem)){ return RecipeUtils.recipeBuilder( - InputItem1, InputItem2, InputItem3, - InputItem4, InputItem5, InputItem6, - InputItem7, InputItem8, InputItem9, + InputItem1, InputItem2, InputItem3, + InputItem4, InputItem5, InputItem6, + InputItem7, InputItem8, InputItem9, OutputItem); }*/ removeRecipe(OutputItem); return RecipeUtils.recipeBuilder( - InputItem1, InputItem2, InputItem3, - InputItem4, InputItem5, InputItem6, - InputItem7, InputItem8, InputItem9, + InputItem1, InputItem2, InputItem3, + InputItem4, InputItem5, InputItem6, + InputItem7, InputItem8, InputItem9, OutputItem); } - private static boolean removeRecipe(ItemStack item){ + private static boolean removeRecipe(final ItemStack item){ Class<?> mekUtils; boolean removed = false; try { mekUtils = Class.forName("mekanism.common.util.RecipeUtils"); if (mekUtils != null){ - Method mRemoveRecipe = mekUtils.getDeclaredMethod("removeRecipes", ItemStack.class); + final Method mRemoveRecipe = mekUtils.getDeclaredMethod("removeRecipes", ItemStack.class); if (mRemoveRecipe != null){ removed = (boolean) mRemoveRecipe.invoke(null, item); if (!removed) { removed = (boolean) mRemoveRecipe.invoke(mekUtils, item); } } - } + } } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { Utils.LOG_INFO("[Mek] Failed to use the built-in recipe remover from Mekanism."); } |