diff options
| author | boubou19 <miisterunknown@gmail.com> | 2024-07-21 16:36:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-21 21:36:34 +0700 |
| commit | a8b46c11f5a02608101ef33ed39f103736ba5920 (patch) | |
| tree | 6daf492e524dcae9f2f5a8cb1d87c057c21a6760 /src/main/java/gregtech/common | |
| parent | 8b077c28bea7bcc046be1e4b8485d69b4c245a43 (diff) | |
| download | GT5-Unofficial-a8b46c11f5a02608101ef33ed39f103736ba5920.tar.gz GT5-Unofficial-a8b46c11f5a02608101ef33ed39f103736ba5920.tar.bz2 GT5-Unofficial-a8b46c11f5a02608101ef33ed39f103736ba5920.zip | |
full RA1 removal (#2713)
* remove addExtractionRecipes
* remove addPulverisationRecipe
* remove thermalcraft fake compat
* deprecate addAlloySmelterRecipe
* remove fake compat
* remove RA1 fusion recipe usage
* remove RA1 centrifuge recipe usage
* remove RA1 compressor recipe usage
* remove RA1 electrolyzer recipe usage
* remove RA1 chemical reactor recipe usage
* deprecate GT based recipes adders
* obliterate RA1 entries in interfaces (1/?)
* remove RA1 blast furnace recipe usage
* remove RA1 canner recipe usage
* remove RA1 alloy smelter recipe usage
* remove RA1 circuit assembler recipe usage
* obliterate RA1 entries in interfaces (2/?)
* remove RA1 bender recipe usage
* clean class
* remove RA1 cutter recipe usage
* remove RA1 fuels recipe usage
* remove RA1 implosion compressor recipe usage
* remove RA1 thermal centrifuge recipe usage
* clean GT_ModHandler
* obliterate RA1 entries in interfaces (3/?)
* remove RA1 packager recipe usage
* remove RA1 lathe recipe usage
* remove RA1 vacuum freezer recipe usage
* remove RA1 fluid heater recipe usage
* remove RA1 nano forge recipe usage
* remove RA1 autoclave recipe usage
* obliterate RA1 entries in interfaces (4/?)
* remove RA1 cracker recipe usage
* remove RA1 pyrolyse recipe usage
* remove RA1 pulveriser recipe usage
* remove RA1 fluid extractor recipe usage
* remove RA1 assembly line recipe usage
* remove RA1 alloy blast smelter recipe usage
* remove RA1 coke oven recipe usage
* obliterate RA1 entries in interfaces (5/?)
* remove RA1 dehydrator recipe usage
* remove deprecated usages
* obliterate RA1 entries in interfaces (6/?)
* remove RA1 assembler recipe usage
* obliterate RA1 entries in interfaces (7/?)
* remove RA1 mixer recipe usage
* remove RA1 forge hammer recipe usage
* remove RA1 wiremill recipe usage
* remove RA1 extruder recipe usage
* remove RA1 fluid soldifier recipe usage
* remove RA1 chemical bath recipe usage
* remove RA1 electromagnetic separator recipe usage
* remove RA1 sifter recipe usage
* remove distillery recipe usage
* remove distillation tower usage
* remove extractor usage
* obliterate RA1 entries in interfaces (8/?)
* remove QFT usage
* cleaning
* remove packager usage
* remove fluid heater usage
* remove vacuum freezer usage
* remove distillery usage
* fix QFT chances arrays
* remove fission fuel usage
* remove cyclotron usage
* remove molecular transformer usage
* remove chemplant usage
* remove coldtrap and reactor processing unit usage
* obliterate RA1 entries in interfaces (9/?)
* spotlessApply
* fixes
* remove addRecipe calls
* migrate forge of gods recipes
* yeet special value calls (1 / 2)
* yeet special value calls (2 / 2)
* migrate GG Fuel recipes
* migrate all GG maps except EHE
* CORE.RA is no more
* clear GT_RecipeAdder
* remove dead code
* clean RecipeMap a bit
* spotless apply
* fix output chances
* Update RecipeLoader.java
* fix
* remove buggy recipe
* migrate to enum for IDs
* sort enum
* move to enum
* fix recipes
* spotless apply
* fix recipe
* remove useless recipes
* spotless apply
* remove unused blocks
* fix GT++ recipe
* Update RecipeLoader.java
* Update RecipeLoader.java
* fix imports
* Spotless apply for branch remove_RA1_calls for #2713 (#2742)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* fix recipe
(cherry picked from commit a25d3b62997f080e064369e940eaf53a96a300e6)
* fix
(cherry picked from commit d9af01140f3ee77de2be18be70f04f8fbe4b547f)
* temporarily remove panic mode
* fix recipes
* Revert "temporarily remove panic mode"
This reverts commit 483cfcf74371b91e7d545f058f9d25ff4fcec95a.
* fix recipes
---------
Co-authored-by: Dream Master <dream-master@gmx.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/common')
3 files changed, 298 insertions, 3365 deletions
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index f0225fd241..8f48ec19bf 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -1,3242 +1,11 @@ package gregtech.common; -import static gregtech.GT_Mod.GT_FML_LOGGER; -import static gregtech.api.enums.Mods.GTPlusPlus; -import static gregtech.api.enums.Mods.Railcraft; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import java.util.Objects; - -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; - -import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.GT_Mod; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.internal.IGT_RecipeAdder; -import gregtech.api.objects.ItemData; -import gregtech.api.recipe.RecipeMaps; -import gregtech.api.util.GT_AssemblyLineUtils; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine; import gregtech.api.util.GT_RecipeBuilder; -import gregtech.api.util.GT_RecipeConstants; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.extensions.ArrayExt; -import ic2.core.init.MainConfig; -import ic2.core.util.ConfigUtil; -import mods.railcraft.common.blocks.aesthetics.cube.EnumCube; -import mods.railcraft.common.items.RailcraftToolItems; public class GT_RecipeAdder implements IGT_RecipeAdder { @Override - @Deprecated - public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, - int aEUt, int aStartEU) { - return false; - } - - @Deprecated - @Override // Really? - public boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, - int aEUt, int aStartEU) { - if (aInput1 == null || aInput2 == null || aOutput1 == null || aDuration < 1 || aEUt < 1 || aStartEU < 1) { - return false; - } - RecipeMaps.fusionRecipes.addRecipe( - null, - new FluidStack[] { aInput1, aInput2 }, - new FluidStack[] { aOutput1 }, - aDuration, - aEUt, - aStartEU); - return true; - } - - @Deprecated - @Override - public boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, - int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion) { - if (FluidInputArray.length == 0) return false; - - if (FluidOutputArray.length == 0) return false; - - RecipeMaps.fusionRecipes.addRecipe( - null, - FluidInputArray, - FluidOutputArray, - aFusionDurationInTicks, - aFusionEnergyPerTick, - aEnergyNeededForStartingFusion); - return true; - } - - @Deprecated - @Override - public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration) { - return addCentrifugeRecipe( - aInput1, - aInput2 < 0 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, - null, - null, - aOutput1, - aOutput2, - aOutput3, - aOutput4, - aOutput5, - aOutput6, - null, - aDuration, - 5); - } - - @Deprecated - @Override - public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { - return addCentrifugeRecipe( - aInput1, - aInput2 < 0 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, - null, - null, - aOutput1, - aOutput2, - aOutput3, - aOutput4, - aOutput5, - aOutput6, - null, - aDuration, - aEUt); - } - - @Deprecated - @Override - public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, - ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { - return addCentrifugeRecipe( - aInput1, - aInput2, - aFluidInput, - aFluidOutput, - aOutput1, - aOutput2, - aOutput3, - aOutput4, - aOutput5, - aOutput6, - aChances, - aDuration, - aEUt, - false); - } - - @Deprecated - @Override - public boolean addCentrifugeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, - ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt, boolean aCleanroom) { - if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { - return false; - } - if ((aInput1 != null) && (aDuration <= 0)) { - return false; - } - if ((aFluidInput != null) && (aDuration <= 0)) { - return false; - } - if (!GT_Mod.gregtechproxy.mEnableCleanroom) { - aCleanroom = false; - } - RecipeMaps.centrifugeRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, }, - null, - aChances, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - aCleanroom ? -100 : 0); - ItemStack[] itemInputs = { aInput1, aInput2 }; - ItemStack[] itemOutputs = { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }; - FluidStack[] fluidInputs = { aFluidInput, null, null }; - FluidStack[] fluidOutputs = { aFluidOutput, null, null, null, null, null, null }; - - byte iNumber = 0; - byte oNumber = 0; - - for (ItemStack item : itemInputs) { - if (item != null) { - if (GT_Utility.getFluidForFilledItem(aInput1, true) != null || GT_Utility.isCellEmpty(item)) { - fluidInputs[iNumber + 1] = GT_Utility.convertCellToFluid(item); - itemInputs[iNumber] = null; - } - } - iNumber++; - } - - for (ItemStack item : itemOutputs) { - if (item != null) { - if (GT_Utility.getFluidForFilledItem(item, true) != null || GT_Utility.isCellEmpty(item)) { - fluidOutputs[oNumber + 1] = GT_Utility.convertCellToFluid(item); - itemOutputs[oNumber] = null; - } - } - oNumber++; - } - - RecipeMaps.centrifugeNonCellRecipes.addRecipe( - false, - itemInputs, - itemOutputs, - null, - aChances, - fluidInputs, - fluidOutputs, - aDuration, - aEUt, - aCleanroom ? -100 : 0); - return true; - } - - @Deprecated - @Override - public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) { - if ((aInput1 == null) || (aOutput1 == null)) { - return false; - } - if (aDuration <= 0) { - return false; - } - RecipeMaps.compressorRecipes.addRecipe( - true, - new ItemStack[] { aInput1 }, - new ItemStack[] { aOutput1 }, - null, - null, - null, - aDuration, - aEUt, - 0); - return true; - } - - @Deprecated - @Override - public boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, - ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) { - return addElectrolyzerRecipe( - aInput1, - aInput2 < 0 ? null : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2) : null, - null, - null, - aOutput1, - aOutput2, - aOutput3, - aOutput4, - aOutput5, - aOutput6, - null, - aDuration, - aEUt); - } - - @Deprecated - @Override - public boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, - ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) { - if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) { - return false; - } - if ((aInput1 != null) && (aDuration <= 0)) { - return false; - } - if ((aFluidInput != null) && (aDuration <= 0)) { - return false; - } - RecipeMaps.electrolyzerRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }, - null, - aChances, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - 0); - ItemStack[] itemInputs = { aInput1, aInput2 }; - ItemStack[] itemOutputs = { aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6 }; - FluidStack[] fluidInputs = { aFluidInput, null, null }; - FluidStack[] fluidOutputs = { aFluidOutput, null, null, null, null, null, null }; - - byte iNumber = 0; - byte oNumber = 0; - - for (ItemStack item : itemInputs) { - if (item != null) { - if (GT_Utility.getFluidForFilledItem(item, true) != null || GT_Utility.isCellEmpty(item) - || GT_Utility.isAnyIntegratedCircuit(item)) { - fluidInputs[iNumber + 1] = GT_Utility.convertCellToFluid(item); - itemInputs[iNumber] = null; - } - } - iNumber++; - } - - for (ItemStack item : itemOutputs) { - if (item != null) { - if (GT_Utility.getFluidForFilledItem(item, true) != null || GT_Utility.isCellEmpty(item)) { - fluidOutputs[oNumber + 1] = GT_Utility.convertCellToFluid(item); - itemOutputs[oNumber] = null; - } - } - oNumber++; - } - - RecipeMaps.electrolyzerNonCellRecipes - .addRecipe(false, itemInputs, itemOutputs, null, aChances, fluidInputs, fluidOutputs, aDuration, aEUt, 0); - return true; - } - - @Deprecated - @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration) { - return addChemicalRecipe(aInput1, aInput2, null, null, aOutput, aDuration); - } - - @Deprecated - @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration, int aEUt) { - return addChemicalRecipe(aInput1, aInput2, null, null, aOutput, aDuration, aEUt); - } - - @Deprecated - @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, int aDuration) { - return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, 30); - } - - @Deprecated - @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration) { - return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, 30); - } - - @Deprecated - @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUTick) { - return addChemicalRecipe( - aInput1, - aInput2, - aFluidInput, - aFluidOutput, - aOutput, - GT_Values.NI, - aDuration, - aEUTick); - } - - @Deprecated - @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { - return addChemicalRecipe( - aInput1, - aInput2, - aFluidInput, - aFluidOutput, - aOutput, - aOutput2, - aDuration, - aEUtick, - false); - } - - @Deprecated - @Override - public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, - boolean aCleanroom) { - if (((aInput1 == null) && (aFluidInput == null)) - || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { - return false; - } - if ((aOutput != null || aOutput2 != null) && (aDuration <= 0)) { - return false; - } - if ((aFluidOutput != null) && (aDuration <= 0)) { - return false; - } - if (aEUtick <= 0) { - return false; - } - if (!GT_Mod.gregtechproxy.mEnableCleanroom) { - aCleanroom = false; - } - GT_RecipeBuilder builder = stdBuilder() - .itemInputs(ArrayExt.withoutNulls(new ItemStack[] { aInput1, aInput2 }, ItemStack[]::new)) - .itemOutputs(ArrayExt.withoutNulls(new ItemStack[] { aOutput, aOutput2 }, ItemStack[]::new)); - if (aFluidInput != null) builder.fluidInputs(aFluidInput); - if (aFluidOutput != null) builder.fluidOutputs(aFluidOutput); - builder.duration(aDuration) - .eut(aEUtick) - .metadata(GT_RecipeConstants.CLEANROOM, aCleanroom) - .addTo(GT_RecipeConstants.UniversalChemical); - return true; - } - - @Deprecated - @Override - public boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, - FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick) { - if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs)) { - return false; - } - if (aEUtick <= 0) { - return false; - } - RecipeMaps.multiblockChemicalReactorRecipes - .addRecipe(false, aInputs, aOutputs, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUtick, 0); - return true; - } - - @Deprecated - @Override - public boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, - FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) { - if (((aInput1 == null) && (aFluidInput == null)) - || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) { - return false; - } - if ((aOutput != null || aOutput2 != null) && (aDuration <= 0)) { - return false; - } - if ((aFluidOutput != null) && (aDuration <= 0)) { - return false; - } - if (aEUtick <= 0) { - return false; - } - RecipeMaps.chemicalReactorRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput, aOutput2 }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUtick, - 0); - return true; - } - - @Deprecated - @Override - public void addDefaultPolymerizationRecipes(Fluid aBasicMaterial, ItemStack aBasicMaterialCell, Fluid aPolymer) { - // Oxygen/Titaniumtetrafluoride -> +50% Output each - addChemicalRecipe( - ItemList.Cell_Air.get(1), - GT_Utility.getIntegratedCircuit(1), - new FluidStack(aBasicMaterial, 144), - new FluidStack(aPolymer, 144), - Materials.Empty.getCells(1), - 160); - addChemicalRecipe( - Materials.Oxygen.getCells(1), - GT_Utility.getIntegratedCircuit(1), - new FluidStack(aBasicMaterial, 144), - new FluidStack(aPolymer, 216), - Materials.Empty.getCells(1), - 160); - addChemicalRecipe( - aBasicMaterialCell, - GT_Utility.getIntegratedCircuit(1), - Materials.Air.getGas(14000), - new FluidStack(aPolymer, 1000), - Materials.Empty.getCells(1), - 1120); - addChemicalRecipe( - aBasicMaterialCell, - GT_Utility.getIntegratedCircuit(1), - Materials.Oxygen.getGas(7000), - new FluidStack(aPolymer, 1500), - Materials.Empty.getCells(1), - 1120); - addMultiblockChemicalRecipe( - new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, - new FluidStack[] { new FluidStack(aBasicMaterial, 2160), Materials.Air.getGas(7500), - Materials.Titaniumtetrachloride.getFluid(100) }, - new FluidStack[] { new FluidStack(aPolymer, 3240) }, - null, - 800, - 30); - addMultiblockChemicalRecipe( - new ItemStack[] { GT_Utility.getIntegratedCircuit(2) }, - new FluidStack[] { new FluidStack(aBasicMaterial, 2160), Materials.Oxygen.getGas(7500), - Materials.Titaniumtetrachloride.getFluid(100) }, - new FluidStack[] { new FluidStack(aPolymer, 4320) }, - null, - 800, - 30); - } - - @Deprecated - @Override - public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt, int aLevel) { - return addBlastRecipe(aInput1, aInput2, null, null, aOutput1, aOutput2, aDuration, aEUt, aLevel); - } - - @Override - @Deprecated - public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, - ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) { - if ((aInput1 == null) || (aOutput1 == null)) { - return false; - } - if (aDuration <= 0) { - return false; - } - RecipeMaps.blastFurnaceRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput1, aOutput2 }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - aLevel); - return true; - } - - @Deprecated - public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, - FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, - ItemStack aOutput4, int aDuration, int aEUt, int aLevel) { - if ((aInput1 == null) || (aOutput1 == null)) { - return false; - } - if (aDuration <= 0) { - return false; - } - RecipeMaps.blastFurnaceRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, aInput3, aInput4 }, - new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, - null, - null, - new FluidStack[] { aFluidInput }, - new FluidStack[] { aFluidOutput }, - aDuration, - aEUt, - aLevel); - return true; - } - - @Deprecated - @Override - public boolean addPlasmaForgeRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, - ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, int coil_heat_level) { - RecipeMaps.plasmaForgeRecipes.addRecipe( - false, - ItemInputArray, - OutputItemArray, - null, - null, - FluidInputArray, - FluidOutputArray, - aDuration, - aEUt, - coil_heat_level); - return true; - } - - @Override - @Deprecated - public boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, - ItemStack aOutput2, int aDuration) { - if ((aInput1 == null && aInput2 == null) || (aOutput1 == null && aOutput2 == null)) { - return false; - } - if (aCoalAmount <= 0) { - return false; - } - if (aDuration <= 0) { - return false; - } - Materials[] coals = new Materials[] { Materials.Coal, Materials.Charcoal }; - for (Materials coal : coals) { - RecipeMaps.primitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, coal.getGems(aCoalAmount) }, - new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount) }, - null, - null, - null, - null, - aDuration, - 0, - 0); - RecipeMaps.primitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, coal.getDust(aCoalAmount) }, - new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount) }, - null, - null, - null, - null, - aDuration, - 0, - 0); - } - if (Railcraft.isModLoaded()) { - RecipeMaps.primitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, RailcraftToolItems.getCoalCoke(aCoalAmount / 2) }, - new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount / 2) }, - null, - null, - null, - null, - aDuration * 2 / 3, - 0, - 0); - } - RecipeMaps.primitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, - GT_ModHandler.getModItem(GTPlusPlus.ID, "itemCactusCoke", (aCoalAmount * 2L)) }, - new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2) }, - null, - null, - null, - null, - aDuration * 2 / 3, - 0, - 0); - RecipeMaps.primitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, - GT_ModHandler.getModItem(GTPlusPlus.ID, "itemSugarCoke", (aCoalAmount * 2L)) }, - new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount * 2) }, - null, - null, - null, - null, - aDuration * 2 / 3, - 0, - 0); - if ((aInput1 == null || aInput1.stackSize <= 6) && (aInput2 == null || aInput2.stackSize <= 6) - && (aOutput1 == null || aOutput1.stackSize <= 6) - && (aOutput2 == null || aOutput2.stackSize <= 6)) { - aInput1 = aInput1 == null ? null : GT_Utility.copyAmount(aInput1.stackSize * 10, aInput1); - aInput2 = aInput2 == null ? null : GT_Utility.copyAmount(aInput2.stackSize * 10, aInput2); - aOutput1 = aOutput1 == null ? null : GT_Utility.copyAmount(aOutput1.stackSize * 10, aOutput1); - aOutput2 = aOutput2 == null ? null : GT_Utility.copyAmount(aOutput2.stackSize * 10, aOutput2); - for (Materials coal : coals) { - RecipeMaps.primitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, coal.getBlocks(aCoalAmount) }, - new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount) }, - null, - null, - null, - null, - aDuration * 10, - 0, - 0); - RecipeMaps.primitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, coal.getBlocks(aCoalAmount) }, - new ItemStack[] { aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount) }, - null, - null, - null, - null, - aDuration * 10, - 0, - 0); - } - if (Railcraft.isModLoaded()) { - RecipeMaps.primitiveBlastRecipes.addRecipe( - true, - new ItemStack[] { aInput1, aInput2, EnumCube.COKE_BLOCK.getItem(aCoalAmount / 2) }, - new ItemStack[] { aOutput1, aOutput2, Materials.Ash.getDust(aCoalAmount / 2) }, - null, - null, - null, - null, - aDuration * 20 / 3, - 0, - 0); - } - } - return true; - } - - @Override - @Deprecated - public boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt) { - if ((aInput1 == null) || (aOutput1 == null)) { - return false; - } - if (aDuration <= 0) { - return false; - } - RecipeMaps.cannerRecipes.addRecipe( - true, - aInput2 == null ? new ItemStack[] { aInput1 } : new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput1, aOutput2 }, - null, - null, - null, - null, - aDuration, - Math.max(aEUt, 1), - 0); - return true; - } - - @Override - @Deprecated - public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, - int aEUt) { - return addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt, false); - } - - @Override - @Deprecated - public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, - int aEUt, boolean hidden) { - if ((aInput1 == null) || (aOutput1 == null || Materials.Graphite.contains(aInput1))) { - return false; - } - if ((aInput2 == null) && ((OrePrefixes.ingot.contains(aInput1)) || (OrePrefixes.dust.contains(aInput1)) - || (OrePrefixes.gem.contains(aInput1)))) { - return false; - } - if (aDuration <= 0) { - return false; - } - GT_Recipe tRecipe = new GT_Recipe( - true, - aInput2 == null ? new ItemStack[] { aInput1 } : new ItemStack[] { aInput1, aInput2 }, - new ItemStack[] { aOutput1 }, - null, - null, - null, - null, - aDuration, - Math.max(aEUt, 1), - 0); - if (hidden) { - tRecipe.mHidden = true; - } - RecipeMaps.alloySmelterRecipes.addRecipe(tRecipe); - return true; - } - - @Override - @Deprecated - public boolean addLatheRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { - if ((aInput1 == null) || (aOutput1 == null)) { - return false; - } - if (aDuration <= 0) { - return false; - } - RecipeMaps.latheRecipes.addRecipe( - true, - new ItemStack[] { aInput1 }, - new ItemStack[] { aOutput1, aOutput2 }, - null, - null, - null, - null, - aDuration, - aEUt, - 0); - return true; - } - - @Override - @Deprecated - public boolean addCutterRecipe(ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt) { - if ((aInput == null) || (aLubricant == null) || (aOutput1 == null)) { - return false; - } - if (aDuration <= 0) { - return false; - } - RecipeMaps.cutterRecipes.addRecipe( - true, - new ItemStack[] { aInput }, - new ItemStack[] { aOutput1, aOutput2 }, - null, - new FluidStack[] { aLubricant }, - null, - aDuration, - aEUt, - 0); - return true; - } - - @Override - @Deprecated - public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, - boolean aCleanroom) { - return addCutterRecipe(aInput, null, aOutput1, aOutput2, aDuration, aEUt, aCleanroom); - } - - @Deprecated - public boolean addCutterRecipe(ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt) { - return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt, false); - } - - @Deprecated - public boolean addCutterRecipe(ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt, boolean aCleanroom) { - return addCutterRecipe( - aInput, - GT_Utility.getIntegratedCircuit(aCircuit), - aOutput1, - aOutput2, - aDuration, - aEUt, - aCleanroom); - } - - @Override - @Deprecated - public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { - return addCutterRecipe(aInput, aOutput1, aOutput2, aDuration, aEUt, false); - } - - @Override - @Deprecated - public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt) { - return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt, false); - } - - @Override - @Deprecated - public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, - int aDuration, int aEUt, boolean aCleanroom) { - return addCutterRecipe( - new ItemStack[] { aInput, aCircuit }, - new ItemStack[] { aOutput1, aOutput2 }, - aDuration, - aEUt, - aCleanroom ? -200 : 0); - } - - @Deprecated - public boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, - boolean aCleanroom) { - return addCutterRecipe(aInputs, aOutputs, aDuration, aEUt, aCleanroom ? -200 : 0); - } - - @Override - @Deprecated - public boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, int aSpecial) { - if ((aInputs == null) || (aOutputs == null) || aInputs.length == 0 || aOutputs.length == 0) { - return false; - } - if (Arrays.stream(aOutputs) - |
