From 27bbb51c837704e2ff380276858483b6e42d06da Mon Sep 17 00:00:00 2001 From: chochem <40274384+chochem@users.noreply.github.com> Date: Tue, 30 Apr 2024 08:09:47 +0100 Subject: GT recipe.cfg cleanup (#2579) * ichorium block fixes * alu ingot fix * iridium ore fix * gt vanilla assembling fixes * ic2 assembler recipe fix * forestry assembler recipe fixes * spotless * electrolyzer * more iridium ore fixes * another ichorium block fix * obsidian stick fix * remove unused railcraft obsidian recipes * remove disabled melon recipe * bring custom plasma fuel values to code * spotless * remove most recipe config uses * fully remove recipe.cfg * dont change recipemapbackend for now --- src/main/java/gregtech/GT_Mod.java | 21 +- src/main/java/gregtech/api/GregTech_API.java | 4 +- .../java/gregtech/api/enums/ConfigCategories.java | 4 +- .../java/gregtech/api/recipe/RecipeMapBackend.java | 3 +- src/main/java/gregtech/api/util/GT_BaseCrop.java | 14 +- src/main/java/gregtech/api/util/GT_ModHandler.java | 17 +- .../java/gregtech/api/util/GT_RecipeConstants.java | 8 +- .../gregtech/api/util/GT_RecipeRegistrator.java | 57 ++-- src/main/java/gregtech/common/GT_RecipeAdder.java | 227 +++++----------- .../java/gregtech/common/GT_ThaumcraftCompat.java | 12 +- .../common/items/GT_MetaGenerated_Item_02.java | 8 - .../common/items/GT_MetaGenerated_Tool_01.java | 51 ++-- .../gregtech/loaders/load/GT_ItemIterator.java | 29 +- .../loaders/oreprocessing/ProcessingBlock.java | 40 +-- .../loaders/oreprocessing/ProcessingCell.java | 247 ++++++++++++++++- .../loaders/oreprocessing/ProcessingDust.java | 5 +- .../loaders/oreprocessing/ProcessingGem.java | 35 +-- .../loaders/oreprocessing/ProcessingIngot.java | 21 +- .../loaders/oreprocessing/ProcessingLog.java | 20 +- .../loaders/oreprocessing/ProcessingNugget.java | 3 +- .../loaders/oreprocessing/ProcessingPlank.java | 7 - .../loaders/oreprocessing/ProcessingPlate.java | 134 ++++----- .../loaders/oreprocessing/ProcessingShaping.java | 5 +- .../loaders/oreprocessing/ProcessingStone.java | 19 -- .../loaders/postload/GT_CraftingRecipeLoader.java | 299 ++++++++------------- .../postload/GT_RecyclerBlacklistLoader.java | 152 +++++------ .../loaders/postload/recipes/AssemblerRecipes.java | 89 +----- .../loaders/postload/recipes/Pulverizer.java | 7 - .../java/gregtech/loaders/preload/GT_PreLoad.java | 6 - 29 files changed, 647 insertions(+), 897 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 90791c95f2..2569ff3b53 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -51,7 +51,6 @@ import gregtech.api.GregTech_API; import gregtech.api.enchants.Enchantment_EnderDamage; import gregtech.api.enchants.Enchantment_Hazmat; import gregtech.api.enchants.Enchantment_Radioactivity; -import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -439,14 +438,12 @@ public class GT_Mod implements IGT_Mod { null, null), new ItemData(Materials.Tin, 10886400L)); - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.storageblockcrafting, "tile.glowstone", false)) { - GT_ModHandler.removeRecipe( - new ItemStack(Items.glowstone_dust, 1), - new ItemStack(Items.glowstone_dust, 1), - null, - new ItemStack(Items.glowstone_dust, 1), - new ItemStack(Items.glowstone_dust, 1)); - } + GT_ModHandler.removeRecipe( + new ItemStack(Items.glowstone_dust, 1), + new ItemStack(Items.glowstone_dust, 1), + null, + new ItemStack(Items.glowstone_dust, 1), + new ItemStack(Items.glowstone_dust, 1)); GT_ModHandler.removeRecipeDelayed( new ItemStack(Blocks.wooden_slab, 1, 0), new ItemStack(Blocks.wooden_slab, 1, 1), @@ -484,9 +481,7 @@ public class GT_Mod implements IGT_Mod { .getDisplayName())); } new GT_CraftingRecipeLoader().run(); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2forgehammer", true)) { - GT_ModHandler.removeRecipeByOutput(ItemList.IC2_ForgeHammer.getWildcard(1L)); - } + GT_ModHandler.removeRecipeByOutput(ItemList.IC2_ForgeHammer.getWildcard(1L)); GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("machine", 1L)); GT_ModHandler.addCraftingRecipe( GT_ModHandler.getIC2Item("machine", 1L), @@ -517,8 +512,6 @@ public class GT_Mod implements IGT_Mod { new String[] { "blastfurnace", "blockcutter", "inductionFurnace", "generator", "windMill", "waterMill", "solarPanel", "centrifuge", "electrolyzer", "compressor", "electroFurnace", "extractor", "macerator", "recycler", "metalformer", "orewashingplant", "massFabricator", "replicator", }) - .filter( - tName -> GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + tName, true)) .map(tName -> GT_ModHandler.getIC2Item(tName, 1L)) .forEach(GT_ModHandler::removeRecipeByOutputDelayed); diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java index 47c99403ab..e80bc7345b 100644 --- a/src/main/java/gregtech/api/GregTech_API.java +++ b/src/main/java/gregtech/api/GregTech_API.java @@ -279,8 +279,8 @@ public class GregTech_API { /** * The Configuration Objects */ - public static GT_Config sRecipeFile = null, sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, - sUnification = null, sSpecialFile = null, sClientDataFile, sOPStuff = null; + public static GT_Config sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, sUnification = null, + sSpecialFile = null, sClientDataFile, sOPStuff = null; public static int TICKS_FOR_LAG_AVERAGING = 25, MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = 100; /** diff --git a/src/main/java/gregtech/api/enums/ConfigCategories.java b/src/main/java/gregtech/api/enums/ConfigCategories.java index a85d569d74..83deec4f58 100644 --- a/src/main/java/gregtech/api/enums/ConfigCategories.java +++ b/src/main/java/gregtech/api/enums/ConfigCategories.java @@ -20,14 +20,12 @@ public enum ConfigCategories { } public enum Recipes { - researches, harderrecipes, gregtechrecipes, disabledrecipes, recipereplacements, storageblockcrafting, - storageblockdecrafting, - crops + storageblockdecrafting } public enum Machines { diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java index cbc2e8b73f..a539067e93 100644 --- a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java +++ b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java @@ -174,8 +174,7 @@ public class RecipeMapBackend { if (properties.recipeConfigCategory != null) { assert properties.recipeConfigKeyConvertor != null; String configKey = properties.recipeConfigKeyConvertor.apply(recipe); - if (configKey != null && (recipe.mDuration = GregTech_API.sRecipeFile - .get(properties.recipeConfigCategory, configKey, recipe.mDuration)) <= 0) { + if (configKey != null && recipe.mDuration <= 0) { continue; } } diff --git a/src/main/java/gregtech/api/util/GT_BaseCrop.java b/src/main/java/gregtech/api/util/GT_BaseCrop.java index c379cec52a..d8608c85a0 100644 --- a/src/main/java/gregtech/api/util/GT_BaseCrop.java +++ b/src/main/java/gregtech/api/util/GT_BaseCrop.java @@ -115,12 +115,10 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { mStats[4] = aStatWeed; mAttributes = aAttributes; mBlock = aBlock; - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.crops, aCropName, true)) { - if (!Crops.instance.registerCrop(this, aID)) - throw new GT_ItsNotMyFaultException("Make sure the Crop ID is valid!"); - if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, this, 1, 1, 1, 1); - sCropList.add(this); - } + if (!Crops.instance.registerCrop(this, aID)) + throw new GT_ItsNotMyFaultException("Make sure the Crop ID is valid!"); + if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, this, 1, 1, 1, 1); + sCropList.add(this); } if (bIc2NeiLoaded) { try { @@ -226,7 +224,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { /** * Checks if the crop needs a block below it - * + * * @return True if the crop needs a block below it to grow to its max size */ public boolean needsBlockBelow() { @@ -263,7 +261,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { /** * An isolated function to check if an item stack is a block that should be below this crop - * + * * @param aItem a stack of the block placed under the crop * @return The result of the check */ diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index 0ada5df764..70dc2f30b0 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -58,7 +58,6 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -494,8 +493,6 @@ public class GT_ModHandler { if (aOutput == null || aChance <= 0) return false; aOutput.stackSize = 1; if (GT_Config.troll && !GT_Utility.areStacksEqual(aOutput, new ItemStack(Items.wooden_hoe, 1, 0))) return false; - aChance = (float) GregTech_API.sRecipeFile.get(ConfigCategories.Machines.scrapboxdrops, aOutput, aChance); - if (aChance <= 0) return false; try { GT_Utility.callMethod( GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), @@ -538,7 +535,6 @@ public class GT_ModHandler { public static boolean addSmeltingRecipe(ItemStack aInput, ItemStack aOutput) { aOutput = GT_OreDictUnificator.get(true, aOutput); if (aInput == null || aOutput == null) return false; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.smelting, aInput, true)) return false; FurnaceRecipes.smelting() .func_151394_a(aInput, GT_Utility.copyOrNull(aOutput), 0.0F); return true; @@ -562,10 +558,6 @@ public class GT_ModHandler { || (OrePrefixes.gem.contains(aInput)))) { return false; } - int duration = GregTech_API.sRecipeFile.get("alloysmelting", input2 == null ? aInput : aOutput, 130); - if (duration <= 0) { - return false; - } GT_RecipeBuilder recipeBuilder = GT_Values.RA.stdBuilder(); if (input2 == null) { recipeBuilder.itemInputs(aInput); @@ -573,7 +565,7 @@ public class GT_ModHandler { recipeBuilder.itemInputs(aInput, input2); } recipeBuilder.itemOutputs(aOutput) - .duration(duration * TICKS) + .duration(6 * SECONDS + 10 * TICKS) .eut(3) .recipeCategory(RecipeCategories.alloySmelterRecycling); if (hidden) { @@ -617,7 +609,6 @@ public class GT_ModHandler { public static boolean addExtractionRecipe(ItemStack aInput, ItemStack aOutput) { aOutput = GT_OreDictUnificator.get(true, aOutput); if (aInput == null || aOutput == null) return false; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.extractor, aInput, true)) return false; RA.stdBuilder() .itemInputs(aInput) .itemOutputs(aOutput) @@ -894,7 +885,6 @@ public class GT_ModHandler { @Deprecated public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int[] aChances, int aHeat, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false; RA.addThermalCentrifugeRecipe( aInput, (ItemStack) aOutput[0], @@ -909,7 +899,6 @@ public class GT_ModHandler { @Deprecated public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int aHeat, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false; RA.addThermalCentrifugeRecipe( aInput, (ItemStack) aOutput[0], @@ -925,7 +914,6 @@ public class GT_ModHandler { */ public static boolean addOreWasherRecipe(ItemStack aInput, int[] aChances, int aWaterAmount, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false; RA.stdBuilder() .itemInputs(aInput) .itemOutputs((ItemStack) aOutput[0], (ItemStack) aOutput[1], (ItemStack) aOutput[2]) @@ -948,7 +936,6 @@ public class GT_ModHandler { public static boolean addOreWasherRecipe(ItemStack aInput, int aWaterAmount, Object... aOutput) { if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false; RA.stdBuilder() .itemInputs(aInput) .itemOutputs((ItemStack) aOutput[0], (ItemStack) aOutput[1], (ItemStack) aOutput[2]) @@ -982,7 +969,6 @@ public class GT_ModHandler { public static boolean addCompressionRecipe(ItemStack aInput, ItemStack aOutput, int duration, int EUPerTick) { aOutput = GT_OreDictUnificator.get(true, aOutput); if (aInput == null || aOutput == null || GT_Utility.areStacksEqual(aInput, aOutput, true)) return false; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.compression, aInput, true)) return false; RA.addCompressorRecipe(aInput, aOutput, duration, EUPerTick); return true; } @@ -992,7 +978,6 @@ public class GT_ModHandler { */ public static boolean addIC2MatterAmplifier(ItemStack aAmplifier, int aValue) { if (aAmplifier == null || aValue <= 0) return false; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.massfabamplifier, aAmplifier, true)) return false; try { NBTTagCompound tNBT = new NBTTagCompound(); tNBT.setInteger("amplification", aValue); diff --git a/src/main/java/gregtech/api/util/GT_RecipeConstants.java b/src/main/java/gregtech/api/util/GT_RecipeConstants.java index 8e728030f2..d9d6c7d7d2 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeConstants.java +++ b/src/main/java/gregtech/api/util/GT_RecipeConstants.java @@ -14,7 +14,6 @@ import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.GregTech_API; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.interfaces.IRecipeMap; @@ -105,7 +104,7 @@ public class GT_RecipeConstants { if (!GT_Utility.isArrayOfLength(builder.getItemInputsBasic(), 1) || GT_Utility.isArrayEmptyOrNull(builder.getItemOutputs())) return Collections.emptyList(); int aDuration = builder.getDuration(); - if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", builder.getItemInputBasic(0), aDuration)) <= 0) { + if (aDuration <= 0) { return Collections.emptyList(); } builder.duration(aDuration); @@ -291,10 +290,7 @@ public class GT_RecipeConstants { if (!builder.isValid()) return Collections.emptyList(); Integer fuelType = builder.getMetadata(FUEL_TYPE); if (fuelType == null) return Collections.emptyList(); - builder.metadata( - FUEL_VALUE, - GregTech_API.sRecipeFile - .get("fuel_" + fuelType, builder.getItemInputBasic(0), builder.getMetadataOrDefault(FUEL_VALUE, 0))); + builder.metadata(FUEL_VALUE, builder.getMetadataOrDefault(FUEL_VALUE, 0)); return FuelType.get(fuelType) .getTarget() .doAdd(builder); diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java index e36e9c68af..f4490b59b0 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java +++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java @@ -54,7 +54,6 @@ import com.google.common.collect.SetMultimap; import cpw.mods.fml.relauncher.ReflectionHelper; import gregtech.GT_Mod; import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; @@ -183,19 +182,19 @@ public class GT_RecipeRegistrator { || GT_Utility.getFluidForFilledItem(aStack, false) != null || aData.mMaterial.mMaterial.mSubTags.contains(SubTag.NO_RECIPES)) return; registerReverseMacerating(GT_Utility.copyAmount(1, aStack), aData, aData.mPrefix == null); - registerReverseSmelting( - GT_Utility.copyAmount(1, aStack), - aData.mMaterial.mMaterial, - aData.mMaterial.mAmount, - true); if (!GT_Utility.areStacksEqual(GT_ModHandler.getIC2Item("iridiumOre", 1L), aStack)) { + registerReverseSmelting( + GT_Utility.copyAmount(1, aStack), + aData.mMaterial.mMaterial, + aData.mMaterial.mAmount, + true); registerReverseFluidSmelting( GT_Utility.copyAmount(1, aStack), aData.mMaterial.mMaterial, aData.mMaterial.mAmount, aData.getByProduct(0)); + registerReverseArcSmelting(GT_Utility.copyAmount(1, aStack), aData); } - registerReverseArcSmelting(GT_Utility.copyAmount(1, aStack), aData); } /** @@ -604,30 +603,26 @@ public class GT_RecipeRegistrator { if (aRecipeReplacing && aPlate != null && sShapesA[i] != null && sShapesA[i].length > 1) { assert aItemData != null; - if (GregTech_API.sRecipeFile.get( - ConfigCategories.Recipes.recipereplacements, - aItemData.mMaterial.mMaterial + "." + sShapesA[i][0], - true)) { - if (null != (tStack = GT_ModHandler.removeRecipe(tRecipe.shape))) { - switch (sShapesA[i].length) { - case 2 -> GT_ModHandler.addCraftingRecipe( - tStack, - GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { sShapesA[i][1], s_P.charAt(0), aPlate, s_R.charAt(0), - OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData }); - case 3 -> GT_ModHandler.addCraftingRecipe( - tStack, - GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { sShapesA[i][1], sShapesA[i][2], s_P.charAt(0), aPlate, - s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), - aItemData }); - default -> GT_ModHandler.addCraftingRecipe( - tStack, - GT_ModHandler.RecipeBits.BUFFERED, - new Object[] { sShapesA[i][1], sShapesA[i][2], sShapesA[i][3], - s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), - s_I.charAt(0), aItemData }); - } + + if (null != (tStack = GT_ModHandler.removeRecipe(tRecipe.shape))) { + switch (sShapesA[i].length) { + case 2 -> GT_ModHandler.addCraftingRecipe( + tStack, + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { sShapesA[i][1], s_P.charAt(0), aPlate, s_R.charAt(0), + OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData }); + case 3 -> GT_ModHandler.addCraftingRecipe( + tStack, + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { sShapesA[i][1], sShapesA[i][2], s_P.charAt(0), aPlate, + s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), + aItemData }); + default -> GT_ModHandler.addCraftingRecipe( + tStack, + GT_ModHandler.RecipeBits.BUFFERED, + new Object[] { sShapesA[i][1], sShapesA[i][2], sShapesA[i][3], s_P.charAt(0), + aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0), + aItemData }); } } } diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 4c682e9135..d236bbc4f2 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -19,7 +19,6 @@ import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.GT_Mod; -import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -57,13 +56,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aInput1 == null || aInput2 == null || aOutput1 == null || aDuration < 1 || aEUt < 1 || aStartEU < 1) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get( - "fusion", - aOutput1.getFluid() - .getName(), - aDuration)) <= 0) { - return false; - } RecipeMaps.fusionRecipes.addRecipe( null, new FluidStack[] { aInput1, aInput2 }, @@ -162,14 +154,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; } - if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("centrifuge", aInput1, aDuration)) <= 0)) { + if ((aInput1 != null) && (aDuration <= 0)) { return false; } - if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get( - "centrifuge", - aFluidInput.getFluid() - .getName(), - aDuration)) <= 0)) { + if ((aFluidInput != null) && (aDuration <= 0)) { return false; } if (!GT_Mod.gregtechproxy.mEnableCleanroom) { @@ -234,7 +222,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("compressor", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.compressorRecipes.addRecipe( @@ -278,15 +266,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; } - if ((aInput1 != null) - && ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aInput1, aDuration)) <= 0)) { + if ((aInput1 != null) && (aDuration <= 0)) { return false; } - if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get( - "electrolyzer", - aFluidInput.getFluid() - .getName(), - aDuration)) <= 0)) { + if ((aFluidInput != null) && (aDuration <= 0)) { return false; } RecipeMaps.electrolyzerRecipes.addRecipe( @@ -400,15 +383,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { return false; } - if ((aOutput != null || aOutput2 != null) - && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { + if ((aOutput != null || aOutput2 != null) && (aDuration <= 0)) { return false; } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get( - "chemicalreactor", - aFluidOutput.getFluid() - .getName(), - aDuration)) <= 0)) { + if ((aFluidOutput != null) && (aDuration <= 0)) { return false; } if (aEUtick <= 0) { @@ -452,15 +430,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { return false; } - if ((aOutput != null || aOutput2 != null) - && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) { + if ((aOutput != null || aOutput2 != null) && (aDuration <= 0)) { return false; } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get( - "chemicalreactor", - aFluidOutput.getFluid() - .getName(), - aDuration)) <= 0)) { + if ((aFluidOutput != null) && (aDuration <= 0)) { return false; } if (aEUtick <= 0) { @@ -544,7 +517,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("blastfurnace", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.blastFurnaceRecipes.addRecipe( @@ -568,7 +541,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("blastfurnace", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.blastFurnaceRecipes.addRecipe( @@ -613,7 +586,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aCoalAmount <= 0) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("primitiveblastfurnace", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } Materials[] coals = new Materials[] { Materials.Coal, Materials.Charcoal }; @@ -735,7 +708,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("canning", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.cannerRecipes.addRecipe( @@ -770,8 +743,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { || (OrePrefixes.gem.contains(aInput1)))) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("alloysmelting", aInput2 == null ? aInput1 : aOutput1, aDuration)) - <= 0) { + if (aDuration <= 0) { return false; } GT_Recipe tRecipe = new GT_Recipe( @@ -798,7 +770,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("lathe", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.latheRecipes.addRecipe( @@ -822,7 +794,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aLubricant == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("cutting", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.cutterRecipes.addRecipe( @@ -905,7 +877,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { .noneMatch(Objects::nonNull)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("cutting", aInputs[0], aDuration)) <= 0) { + if (aDuration <= 0) { return false; } if (!GT_Mod.gregtechproxy.mEnableCleanroom && aSpecial == -200) { @@ -1026,7 +998,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } @@ -1072,7 +1044,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } @@ -1103,7 +1075,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("wiremill", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.wiremillRecipes.addRecipe( @@ -1125,7 +1097,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("wiremill", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.wiremillRecipes.addRecipe( @@ -1147,7 +1119,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("polarizer", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.polarizerRecipes.addRecipe( @@ -1169,7 +1141,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("bender", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.benderRecipes.addRecipe( @@ -1192,7 +1164,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("bender", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } GT_Recipe tRecipe = new GT_Recipe( @@ -1215,7 +1187,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aShape == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("extruder", aOutput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.extruderRecipes.addRecipe( @@ -1237,7 +1209,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aShape == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("slicer", aOutput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.slicerRecipes.addRecipe( @@ -1261,7 +1233,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("orewasher", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.oreWasherRecipes.addRecipe( @@ -1285,7 +1257,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("orewasher", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.oreWasherRecipes.addRecipe( @@ -1308,7 +1280,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aInput2 = GregTech_API.sRecipeFile.get("implosion", aInput1, aInput2)) <= 0) { + if (aInput2 <= 0) { return false; } int tExplosives = Math.min(aInput2, 64); @@ -1395,7 +1367,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aInput == null || aOutputs == null || aOutputs.length < 1 || aOutputs.length > 11) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput.getUnlocalizedName(), aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.distillationTowerRecipes.addRecipe( @@ -1418,7 +1390,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aInput == null || aOutputs == null || aOutputs.length < 1 || aOutputs.length > 11) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput.getUnlocalizedName(), aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.distillationTowerRecipes.addRecipe( @@ -1450,7 +1422,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("vacuumfreezer", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.vacuumFreezerRecipes.addRecipe( @@ -1477,7 +1449,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("vacuumfreezer", aInput1, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } addVacuumFreezerRecipe(aInput1, aOutput1, aDuration, 120); @@ -1538,14 +1510,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aInput1 == null) { return false; } - new GT_Recipe( - aInput1, - aOutput1, - null, - null, - null, - GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), - aType); + new GT_Recipe(aInput1, aOutput1, null, null, null, aEU, aType); return true; } @@ -1578,9 +1543,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput1 == null) || (aOutput1 == null)) { return false; } - if (!GregTech_API.sRecipeFile.get("forgehammer", aOutput1, true)) { - return false; - } RecipeMaps.hammerRecipes.addRecipe( true, new ItemStack[] { aInput1 }, @@ -1619,9 +1581,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aContainedItem == null) || (aFullBox == null)) { return false; } - if (!GregTech_API.sRecipeFile.get("boxing", aFullBox, true)) { - return false; - } RecipeMaps.packagerRecipes.addRecipe( true, new ItemStack[] { aContainedItem, aEmptyBox }, @@ -1642,9 +1601,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aFullBox == null) || (aContainedItem == null)) { return false; } - if (!GregTech_API.sRecipeFile.get("unboxing", aFullBox, true)) { - return false; - } RecipeMaps.unpackagerRecipes.addRecipe( true, new ItemStack[] { aFullBox }, @@ -1665,9 +1621,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput1 == null)) { return false; } - if (!GregTech_API.sRecipeFile.get("thermalcentrifuge", aInput, true)) { - return false; - } RecipeMaps.thermalCentrifugeRecipes.addRecipe( true, new ItemStack[] { aInput }, @@ -1688,9 +1641,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput1 == null)) { return false; } - if (!GregTech_API.sRecipeFile.get("thermalcentrifuge", aInput, true)) { - return false; - } RecipeMaps.thermalCentrifugeRecipes.addRecipe( true, new ItemStack[] { aInput }, @@ -1711,9 +1661,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aAmplifierItem == null) || (aAmplifierAmountOutputted <= 0)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("amplifier", aAmplifierItem, aDuration)) <= 0) { - return false; - } RecipeMaps.amplifierRecipes.addRecipe( true, new ItemStack[] { aAmplifierItem }, @@ -1734,9 +1681,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aIngredient == null) || (aInput == null) || (aOutput == null)) { return false; } - if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) { - return false; - } GT_Recipe tRecipe = RecipeMaps.brewingRecipes.addRecipe( false, new ItemStack[] { aIngredient }, @@ -1766,9 +1710,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput == null)) { return false; } - if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) { - return false; - } GT_Recipe tRecipe = RecipeMaps.brewingRecipes.addRecipe( false, new ItemStack[] { aIngredient }, @@ -1792,11 +1733,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get( - "fermenting", - aOutput.getFluid() - .getUnlocalizedName(), - aDuration)) <= 0) { + if (aDuration <= 0) { return false; } GT_Recipe tRecipe = RecipeMaps.fermentingRecipes.addRecipe( @@ -1828,11 +1765,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get( - "distillery", - aOutput.getFluid() - .getUnlocalizedName(), - aDuration)) <= 0) { + if (aDuration <= 0) { return false; } // reduce the batch size if fluid amount is exceeding @@ -1941,7 +1874,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aInput.isFluidEqual(Materials.PhasedIron.getMolten(144))) { aInput = Materials.PulsatingIron.getMolten(aInput.amount); } - if ((aDuration = GregTech_API.sRecipeFile.get("fluidsolidifier", aOutput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.fluidSolidifierRecipes.addRecipe( @@ -1977,7 +1910,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aOutput.isFluidEqual(Materials.PhasedIron.getMolten(1))) { aOutput = Materials.PulsatingIron.getMolten(aOutput.amount); } - if ((aDuration = GregTech_API.sRecipeFile.get("fluidsmelter", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } GT_Recipe tRecipe = RecipeMaps.fluidExtractionRecipes.addRecipe( @@ -2010,7 +1943,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aOutput.isFluidEqual(Materials.PhasedIron.getMolten(1))) { aOutput = Materials.PulsatingIron.getMolten(aOutput.amount); } - if ((aDuration = GregTech_API.sRecipeFile.get("fluidextractor", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.fluidExtractionRecipes.addRecipe( @@ -2036,10 +1969,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aInput == null || aOutput == null) { return false; } - if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("fluidcanner", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.fluidCannerRecipes.addRecipe( @@ -2062,10 +1992,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aInput == null || aOutput == null) { return false; } - if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) { - return false; - } - if ((aDuration = GregTech_API.sRecipeFile.get("fluidcanner", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.fluidCannerRecipes.addRecipe( @@ -2088,7 +2015,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aBathingFluid == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("chemicalbath", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.chemicalBathRecipes.addRecipe( @@ -2112,7 +2039,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aBathingFluid == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("chemicalbath", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.chemicalBathRecipes.addRecipe( @@ -2136,7 +2063,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput1 == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("electromagneticseparator", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.electroMagneticSeparatorRecipes.addRecipe( @@ -2159,7 +2086,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("extractor", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.extractorRecipes.addRecipe( @@ -2182,7 +2109,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("printer", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.printerRecipes.addRecipe( @@ -2233,7 +2160,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aFluidIn == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } if (!GT_Mod.gregtechproxy.mEnableCleanroom) { @@ -2267,7 +2194,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aFluid == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } if (!GT_Mod.gregtechproxy.mEnableCleanroom) { @@ -2294,7 +2221,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aFluidIn == null) || (aOutputs == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } if (!GT_Mod.gregtechproxy.mEnableCleanroom) { @@ -2365,14 +2292,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aFluidOutput == null))) { return false; } - if ((aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aOutput, aDuration)) <= 0)) { + if ((aOutput != null) && (aDuration <= 0)) { return false; } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get( - "mixer", - aFluidOutput.getFluid() - .getName(), - aDuration)) <= 0)) { + if ((aFluidOutput != null) && (aDuration <= 0)) { return false; } RecipeMaps.mixerRecipes.addRecipe( @@ -2512,14 +2435,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { return false; } - if ((aOutput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("mixer", aOutput1, aDuration)) <= 0)) { + if ((aOutput1 != null) && (aDuration <= 0)) { return false; } - if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get( - "mixer", - aFluidOutput.getFluid() - .getName(), - aDuration)) <= 0)) { + if ((aFluidOutput != null) && (aDuration <= 0)) { return false; } RecipeMaps.mixerRecipes.addRecipe( @@ -2580,7 +2499,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aItemToEngrave == null) || (aLens == null) || (aEngravedItem == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("laserengraving", aEngravedItem, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } if (!GT_Mod.gregtechproxy.mEnableCleanroom) { @@ -2624,7 +2543,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aItemToImprint == null) || (aForm == null) || (aImprintedItem == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("press", aImprintedItem, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.formingPressRecipes.addRecipe( @@ -2658,11 +2577,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aItem == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get( - "fluidheater", - aOutput.getFluid() - .getUnlocalizedName(), - aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.fluidHeaterRecipes.addRecipe( @@ -2685,11 +2600,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get( - "fluidheater", - aOutput.getFluid() - .getUnlocalizedName(), - aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.fluidHeaterRecipes.addRecipe( @@ -2714,7 +2625,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } for (ItemStack tStack : aSiftedItems) { if (tStack != null) { - if ((aDuration = GregTech_API.sRecipeFile.get("sifter", aItemToSift, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.sifterRecipes.addRecipe( @@ -2769,7 +2680,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } for (ItemStack tStack : aOutputs) { if (tStack != null) { - if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } GT_Recipe sRecipe = RecipeMaps.arcFurnaceRecipes.addRecipe( @@ -2820,7 +2731,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } for (ItemStack tStack : aOutputs) { if (tStack != null) { - if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.arcFurnaceRecipes.addRecipe( @@ -2849,7 +2760,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } for (ItemStack tStack : aOutputs) { if (tStack != null) { - if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.plasmaArcFurnaceRecipes.addRecipe( @@ -2878,7 +2789,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } for (ItemStack tStack : aOutputs) { if (tStack != null) { - if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.plasmaArcFurnaceRecipes.addRecipe( @@ -2914,7 +2825,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { } for (ItemStack tStack : aOutputs) { if (tStack != null) { - if ((aDuration = GregTech_API.sRecipeFile.get("pulveriser", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } GT_Recipe tRecipe = RecipeMaps.maceratorRecipes.addRecipe( @@ -2944,7 +2855,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if (aInput == null) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("pyrolyse", aInput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.pyrolyseRecipes.addRecipe( @@ -2974,7 +2885,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInput == null && aInput2 == null) || (aOutput == null)) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("cracking", aInput.getUnlocalizedName(), aDuration)) <= 0) { + if (aDuration <= 0) { return false; } RecipeMaps.crackingRecipes.addRecipe( @@ -3002,7 +2913,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { || aInputs.length < 4) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } for (ItemStack tItem : aInputs) { @@ -3059,7 +2970,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { || aInputs.length < 4) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } ItemStack[] tInputs = new ItemStack[aInputs.length]; @@ -3178,7 +3089,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("circuitassembler", aOutput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } @@ -3217,7 +3128,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { if ((aInputs == null) || (aOutput == null) || aInputs.length > 6 || aInputs.length < 1) { return false; } - if ((aDuration = GregTech_API.sRecipeFile.get("circuitassembler", aOutput, aDuration)) <= 0) { + if (aDuration <= 0) { return false; } if (!GT_Mod.gregtechproxy.mEnableCleanroom) { diff --git a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java index 6804beb402..43c3dce569 100644 --- a/src/main/java/gregtech/common/GT_ThaumcraftCompat.java +++ b/src/main/java/gregtech/common/GT_ThaumcraftCompat.java @@ -1,6 +1,7 @@ package gregtech.common; import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -10,8 +11,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.ResourceLocation; -import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.TC_Aspects; import gregtech.api.interfaces.internal.IThaumcraftCompat; import gregtech.api.util.GT_LanguageManager; @@ -134,9 +133,6 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { public Object addResearch(String aResearch, String aName, String aText, String[] aParentResearches, String aCategory, ItemStack aIcon, int aComplexity, int aType, int aX, int aY, List aAspects, ItemStack[] aResearchTriggers, Object[] aPages) { - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.researches, aResearch, true)) { - return null; - } ResearchCategoryList tCategory = ResearchCategories.getResearchList(aCategory); if (tCategory == null) { return null; @@ -196,11 +192,7 @@ public class GT_ThaumcraftCompat implements IThaumcraftCompat { } if (aParentResearches != null) { ArrayList tParentResearches = new ArrayList<>(); - for (String tParent : aParentResearches) { - if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.researches, aResearch, true)) { - tParentResearches.add(tParent); - } - } + Collections.addAll(tParentResearches, aParentResearches); if (tParentResearches.size() > 0) { rResearch.setParents(tParentResearches.toArray(new String[0])); rResearch.setConcealed(); diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java index 786764a3b2..875c4e9861 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java @@ -2669,14 +2669,6 @@ public class GT_MetaGenerated_Item_02 extends GT_MetaGenerated_Item_X32 { .eut(2) .addTo(maceratorRecipes); - GT_Values.RA.stdBuilder() - .itemInputs(new ItemStack(Blocks.melon_block, 1, 0)) - .itemOutputs(new ItemStack(Items.melon, 8, 0), new ItemStack(Items.melon_seeds, 1)) - .outputChances(10000, 8000) - .duration(20 * SECONDS) - .eut(2) - .addTo(maceratorRecipes); - GT_Values.RA.stdBuilder() .itemInputs(new ItemStack(Blocks.pumpkin, 1, 0)) .itemOutputs(new ItemStack(Items.pumpkin_seeds, 4, 0)) diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java index 14af94d70e..309507f2a9 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java @@ -798,36 +798,27 @@ public class GT_MetaGenerated_Tool_01 extends GT_MetaGenerated_Tool { new Object[] { " S", " I ", "S f", 'I', OrePrefixes.ingot.get(Materials.IronWood), 'S', OrePrefixes.stick.get(Materials.IronWood) }); - if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Coal", true)) { - GT_ModHandler.addShapelessCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.coal, 1) }); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Clay", true)) { - GT_ModHandler.addShapelessCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Blocks.clay, 1) }); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Wheat", true)) { - GT_ModHandler.addShapelessCraftingRecipe( - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.wheat, 1) }); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Flint", true)) { - GT_ModHandler.addShapelessCraftingRecipe( - new ItemStack(Items.flint, 1), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Blocks.gravel, 1) }); - } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Tools.mortar, "Blaze", true)) { - GT_ModHandler.addShapelessCraftingRecipe( - new ItemStack(Items.blaze_powder, 2), - GT_ModHandler.RecipeBits.NOT_REMOVABLE, - new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.blaze_rod, 1) }); - } + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.coal, 1) }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Clay, 1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Blocks.clay, 1) }); + GT_ModHandler.addShapelessCraftingRecipe( + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wheat, 1L), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.wheat, 1) }); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Items.flint, 1), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Blocks.gravel, 1) }); + GT_ModHandler.addShapelessCraftingRecipe( + new ItemStack(Items.blaze_powder, 2), + GT_ModHandler.RecipeBits.NOT_REMOVABLE, + new Object[] { ToolDictNames.craftingToolMortar, new ItemStack(Items.blaze_rod, 1) }); + } } } diff --git a/src/main/java/gregtech/loaders/load/GT_ItemIterator.java b/src/main/java/gregtech/loaders/load/GT_ItemIterator.java index 9098144114..26534f5414 100644 --- a/src/main/java/gregtech/loaders/load/GT_ItemIterator.java +++ b/src/main/java/gregtech/loaders/load/GT_ItemIterator.java @@ -17,7 +17,6 @@ import net.minecraftforge.fluids.IFluidContainerItem; import buildcraft.api.tools.IToolWrench; import gregtech.api.GregTech_API; -import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -174,25 +173,17 @@ public class GT_ItemIterator implements Runnable { } if ((tItem instanceof IToolCrowbar)) { - if ((!tItem.isDamageable()) && (!GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { - if ((GregTech_API.sRecipeFile - .get(ConfigCategories.Recipes.disabledrecipes, "infiniteDurabilityRCCrowbars", false)) - && (GT_ModHandler.removeRecipeByOutput(new ItemStack(tItem, 1, WILDCARD)))) { - GT_Log.out.println("GT_Mod: Removed infinite RC Crowbar: " + tName); + if ((tItem.isDamageable()) || (GT_ModHandler.isElectricItem(new ItemStack(tItem, 1, 0)))) { + if (GregTech_API.registerCrowbar(new ItemStack(tItem, 1, WILDCARD))) { + GT_Log.out.println("GT_Mod: Registered valid RC Crowbar: " + tName); } - } else if (GregTech_API.registerCrowbar(new ItemStack(tItem, 1, WILDCARD))) { - GT_Log.out.println("GT_Mod: Registered valid RC Crowbar: " + tName); } } if ((tItem instanceof ITool