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/api/util | |
| 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/api/util')
8 files changed, 290 insertions, 636 deletions
diff --git a/src/main/java/gregtech/api/util/FishPondFakeRecipe.java b/src/main/java/gregtech/api/util/FishPondFakeRecipe.java index dc579ebd9b..b5bfff9e29 100644 --- a/src/main/java/gregtech/api/util/FishPondFakeRecipe.java +++ b/src/main/java/gregtech/api/util/FishPondFakeRecipe.java @@ -1,16 +1,17 @@ package gregtech.api.util; +import static gregtech.api.util.GT_RecipeBuilder.SECONDS; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.fishPondRecipes; + import java.util.ArrayList; import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomFishable; import net.minecraftforge.common.FishingHooks; -import net.minecraftforge.fluids.FluidStack; +import gregtech.api.enums.GT_Values; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.recipe.GTPPRecipeMaps; -import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; @@ -49,7 +50,14 @@ public class FishPondFakeRecipe { ItemStack t = (ItemStack) ReflectionUtils .getField(WeightedRandomFishable.class, "field_150711_b") .get(u); - addNewFishPondLoot(mType, new ItemStack[] { t }, new int[] { 10000 }); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.getIntegratedCircuit(mType)) + .itemOutputs(t) + .duration(5 * SECONDS) + .eut(0) + .ignoreCollision() + .addTo(fishPondRecipes); + Logger.INFO("Fishing [" + mType + "]: " + ItemUtils.getArrayStackNames(new ItemStack[] { t })); } catch (IllegalArgumentException | IllegalAccessException e1) { Logger.INFO("Error generating Fish Pond Recipes. [2]"); e1.printStackTrace(); @@ -61,20 +69,4 @@ public class FishPondFakeRecipe { return true; } - - public static void addNewFishPondLoot(int circuit, ItemStack[] outputItems, int[] chances) { - GT_Recipe x = new GT_Recipe( - true, - new ItemStack[] { CI.getNumberedCircuit(circuit) }, - outputItems, - null, - chances, - new FluidStack[] { null }, - new FluidStack[] { null }, - 100, // 1 Tick - 0, // No Eu produced - 0); - Logger.INFO("Fishing [" + circuit + "]: " + ItemUtils.getArrayStackNames(outputItems)); - GTPPRecipeMaps.fishPondRecipes.addRecipe(x, false, false, false); - } } diff --git a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java index 427703e6f7..d383d643d7 100644 --- a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java +++ b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java @@ -1,9 +1,14 @@ package gregtech.api.util; +import static gregtech.api.recipe.RecipeMaps.centrifugeNonCellRecipes; +import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes; +import static gregtech.api.recipe.RecipeMaps.scannerFakeRecipes; +import static gregtech.api.util.GT_RecipeBuilder.SECONDS; +import static gregtech.api.util.GT_RecipeBuilder.TICKS; + import java.util.Map; import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; import forestry.api.recipes.ICentrifugeRecipe; import forestry.api.recipes.ISqueezerRecipe; @@ -17,112 +22,112 @@ public class GT_Forestry_Compat { public static void populateFakeNeiRecipes() { if (ItemList.FR_Bee_Drone.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Bee_Drone.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Bee_Drone.getWildcard(1L)) + .itemOutputs(ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Bee_Princess.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Bee_Princess.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Bee_Princess.getWildcard(1L)) + .itemOutputs(ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Bee_Queen.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Bee_Queen.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Bee_Queen.getWildcard(1L)) + .itemOutputs(ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Tree_Sapling.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Tree_Sapling.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Tree_Sapling.getWildcard(1L)) + .itemOutputs(ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Butterfly.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Butterfly.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Butterfly.getWildcard(1L)) + .itemOutputs(ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Larvae.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Larvae.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Larvae.getWildcard(1L)) + .itemOutputs(ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Serum.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Serum.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Serum.getWithName(1L, "Scanned Serum") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Serum.getWildcard(1L)) + .itemOutputs(ItemList.FR_Serum.getWithName(1L, "Scanned Serum")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_Caterpillar.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_Caterpillar.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_Caterpillar.getWildcard(1L)) + .itemOutputs(ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } if (ItemList.FR_PollenFertile.get(1L) != null) { - RecipeMaps.scannerFakeRecipes.addFakeRecipe( - false, - new ItemStack[] { ItemList.FR_PollenFertile.getWildcard(1L) }, - new ItemStack[] { ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen") }, - null, - new FluidStack[] { Materials.Honey.getFluid(100L) }, - null, - 500, - 2, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(ItemList.FR_PollenFertile.getWildcard(1L)) + .itemOutputs(ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen")) + .fluidInputs(Materials.Honey.getFluid(100L)) + .duration(25 * SECONDS) + .eut(2) + .noOptimize() + .ignoreCollision() + .fake() + .addTo(scannerFakeRecipes); } } @@ -139,28 +144,21 @@ public class GT_Forestry_Compat { .copy(); i++; } - RecipeMaps.centrifugeRecipes.addRecipe( - true, - new ItemStack[] { tRecipe.getInput() }, - tOutputs, - null, - tChances, - null, - null, - 128, - 5, - 0); - RecipeMaps.centrifugeNonCellRecipes.addRecipe( - true, - new ItemStack[] { tRecipe.getInput() }, - tOutputs, - null, - tChances, - null, - null, - 128, - 5, - 0); + GT_Values.RA.stdBuilder() + .itemInputs(tRecipe.getInput()) + .itemOutputs(tOutputs) + .outputChances(tChances) + .duration(6 * SECONDS + 8 * TICKS) + .eut(5) + .addTo(centrifugeRecipes); + + GT_Values.RA.stdBuilder() + .itemInputs(tRecipe.getInput()) + .itemOutputs(tOutputs) + .outputChances(tChances) + .duration(6 * SECONDS + 8 * TICKS) + .eut(5) + .addTo(centrifugeNonCellRecipes); } } catch (Throwable e) { if (GT_Values.D1) { @@ -172,18 +170,17 @@ public class GT_Forestry_Compat { public static void transferSqueezerRecipes() { try { for (ISqueezerRecipe tRecipe : RecipeManagers.squeezerManager.recipes()) { - if ((tRecipe.getResources().length == 1) && (tRecipe.getFluidOutput() != null)) { - RecipeMaps.fluidExtractionRecipes.addRecipe( - true, - new ItemStack[] { tRecipe.getResources()[0] }, - new ItemStack[] { tRecipe.getRemnants() }, - null, - new int[] { (int) (tRecipe.getRemnantsChance() * 10000) }, - null, - new FluidStack[] { tRecipe.getFluidOutput() }, - 32, - 8, - 0); + if ((tRecipe.getResources().length == 1) && (tRecipe.getFluidOutput() != null) + && (tRecipe.getResources()[0] != null) + && (tRecipe.getRemnants() != null)) { + GT_Values.RA.stdBuilder() + .itemInputs(tRecipe.getResources()[0]) + .itemOutputs(tRecipe.getRemnants()) + .outputChances((int) (tRecipe.getRemnantsChance() * 10000)) + .fluidOutputs(tRecipe.getFluidOutput()) + .duration(1 * SECONDS + 12 * TICKS) + .eut(8) + .addTo(RecipeMaps.fluidExtractionRecipes); } } } catch (Throwable e) { diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index 70dc2f30b0..8c43a5334b 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -10,7 +10,6 @@ import static gregtech.api.enums.GT_Values.RA; import static gregtech.api.enums.GT_Values.V; import static gregtech.api.enums.GT_Values.W; import static gregtech.api.recipe.RecipeMaps.alloySmelterRecipes; -import static gregtech.api.recipe.RecipeMaps.extractorRecipes; import static gregtech.api.recipe.RecipeMaps.oreWasherRecipes; import static gregtech.api.util.GT_RecipeBuilder.SECONDS; import static gregtech.api.util.GT_RecipeBuilder.TICKS; @@ -576,184 +575,6 @@ public class GT_ModHandler { } /** - * LiquidTransposer Recipe for both directions - */ - @Deprecated - public static boolean addLiquidTransposerRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, - ItemStack aFullContainer, int aMJ) { - return true; - } - - /** - * LiquidTransposer Recipe for filling Containers - */ - @Deprecated - public static boolean addLiquidTransposerFillRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, - ItemStack aFullContainer, int aMJ) { - return true; - } - - /** - * LiquidTransposer Recipe for emptying Containers - */ - @Deprecated - public static boolean addLiquidTransposerEmptyRecipe(ItemStack aFullContainer, FluidStack aLiquid, - ItemStack aEmptyContainer, int aMJ) { - return true; - } - - /** - * IC2-Extractor Recipe. Overloads old Recipes automatically - */ - @Deprecated - public static boolean addExtractionRecipe(ItemStack aInput, ItemStack aOutput) { - aOutput = GT_OreDictUnificator.get(true, aOutput); - if (aInput == null || aOutput == null) return false; - RA.stdBuilder() - .itemInputs(aInput) - .itemOutputs(aOutput) - .duration(15 * SECONDS) - .eut(2) - .addTo(extractorRecipes); - return true; - } - - /** - * RC-BlastFurnace Recipes - */ - @Deprecated - public static boolean addRCBlastFurnaceRecipe(ItemStack aInput, ItemStack aOutput, int aTime) { - return true; - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1) { - return addPulverisationRecipe(aInput, aOutput1, null, 0, false); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, false); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - int aChance) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, false); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, boolean aOverwrite) { - return addPulverisationRecipe(aInput, aOutput1, null, 0, aOverwrite); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - boolean aOverwrite) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, aOverwrite); - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance, - boolean aOverwrite) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, null, 0, aOverwrite); - } - - /** - * Adds Several Pulverizer-Type Recipes. - */ - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, - ItemStack aOutput3, int aChance3, boolean aOverwrite) { - aOutput1 = GT_OreDictUnificator.get(true, aOutput1); - aOutput2 = GT_OreDictUnificator.get(true, aOutput2); - if (GT_Utility.isStackInvalid(aInput) || GT_Utility.isStackInvalid(aOutput1)) return false; - - if (GT_Utility.getContainerItem(aInput, false) == null) { - RA.addPulveriserRecipe( - aInput, - new ItemStack[] { aOutput1, aOutput2, aOutput3 }, - new int[] { 10000, aChance2 <= 0 ? 1000 : 100 * aChance2, aChance3 <= 0 ? 1000 : 100 * aChance3 }, - 400, - 2); - } - return true; - } - - @Deprecated - public static boolean addPulverisationRecipe(ItemStack aInputItem, ItemStack[] aOutputArray, int[] aChanceArray, - int aEUt, int aRecipeDurationInTicks) { - - ItemStack[] aUnifiedOutputArray = new ItemStack[aOutputArray.length]; - int counter = 0; - - for (ItemStack item : aOutputArray) { - aUnifiedOutputArray[counter] = GT_OreDictUnificator.get(true, item); - counter++; - } - - RA.addPulveriserRecipe(aInputItem, aOutputArray, aChanceArray, aRecipeDurationInTicks, aEUt); - - return true; - } - - @Deprecated - public static boolean addImmersiveEngineeringRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, - int aChance2, ItemStack aOutput3, int aChance3) { - return true; - } - - @Deprecated - public static boolean addMagneticraftRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, - ItemStack aOutput3, int aChance3) { - return true; - } - - /** - * Adds a Recipe to the Sawmills of ThermalCraft - */ - @Deprecated - public static boolean addSawmillRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2) { - return true; - } - - /** - * Induction Smelter Recipes and Alloy Smelter Recipes - */ - @Deprecated - public static boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, - int aEUt, boolean aAllowSecondaryInputEmpty) { - if (aInput1 == null || (aInput2 == null && !aAllowSecondaryInputEmpty) || aOutput1 == null) return false; - aOutput1 = GT_OreDictUnificator.get(true, aOutput1); - RA.stdBuilder() - .itemInputs(aInput1, aInput2) - .itemOutputs(aOutput1) - .duration(aDuration) - .eut(aEUt) - .addTo(alloySmelterRecipes); - return true; - } - - /** - * Induction Smelter Recipes for TE - */ - public static boolean addInductionSmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, - ItemStack aOutput2, int aEnergy, int aChance) { - return true; - } - - /** - * Smelts Ores to Ingots - */ - public static boolean addOreToIngotSmeltingRecipe(ItemStack aInput, ItemStack aOutput) { - aOutput = GT_OreDictUnificator.get(true, aOutput); - if (aInput == null || aOutput == null) return false; - FurnaceRecipes.smelting() - .func_151394_a(aInput, GT_Utility.copyOrNull(aOutput), 0.0F); - return true; - } - - /** * Adds GT versions of the IC2 recipes from the supplied IC2RecipeList. */ public static void addIC2RecipesToGT(Map<IRecipeInput, RecipeOutput> aIC2RecipeList, RecipeMap<?> aGTRecipeMap, @@ -781,35 +602,27 @@ public class GT_ModHandler { .contains("ic2.itemPurifiedCrushed")))) continue; switch (aGTRecipeMap.unlocalizedName) { - case "gt.recipe.macerator", "gt.recipe.extractor", "gt.recipe.compressor" -> aGTRecipeMap - .addRecipe( - true, - new ItemStack[] { GT_Utility.copyAmount( + case "gt.recipe.macerator", "gt.recipe.extractor", "gt.recipe.compressor" -> GT_Values.RA + .stdBuilder() + .itemInputs( + GT_Utility.copyAmount( iRecipeInputRecipeOutputEntry.getKey() .getAmount(), - tStack) }, - iRecipeInputRecipeOutputEntry.getValue().items.toArray(new ItemStack[0]), - null, - null, - null, - null, - 300, - 2, - 0); - case "gt.recipe.thermalcentrifuge" -> aGTRecipeMap.addRecipe( - true, - new ItemStack[] { GT_Utility.copyAmount( - iRecipeInputRecipeOutputEntry.getKey() - .getAmount(), - tStack) }, - iRecipeInputRecipeOutputEntry.getValue().items.toArray(new ItemStack[0]), - null, - null, - null, - null, - 500, - 48, - 0); + tStack)) + .itemOutputs(iRecipeInputRecipeOutputEntry.getValue().items.toArray(new ItemStack[0])) + .duration(15 * SECONDS) + .eut(2) + .addTo(aGTRecipeMap); + case "gt.recipe.thermalcentrifuge" -> GT_Values.RA.stdBuilder() + .itemInputs( + GT_Utility.copyAmount( + iRecipeInputRecipeOutputEntry.getKey() + .getAmount(), + tStack)) + .itemOutputs(iRecipeInputRecipeOutputEntry.getValue().items.toArray(new ItemStack[0])) + .duration(25 * SECONDS) + .eut(48) + .addTo(aGTRecipeMap); } } catch (Exception e) { System.err.println(e); @@ -870,48 +683,10 @@ public class GT_ModHandler { return emptyRecipeMap; } - public static Map<IRecipeInput, RecipeOutput> getMassFabricatorList() { - try { - return ic2.api.recipe.Recipes.matterAmplifier.getRecipes(); - } catch (Throwable e) { - /* Do nothing */ - } - return emptyRecipeMap; - } - - /** - * IC2-ThermalCentrifuge Recipe. Overloads old Recipes automatically - */ - @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; - RA.addThermalCentrifugeRecipe( - aInput, - (ItemStack) aOutput[0], - aOutput.length >= 2 ? (ItemStack) aOutput[1] : null, - aOutput.length >= 3 ? (ItemStack) aOutput[2] : null, - aChances, - 500, - 48); - return true; - } - - @Deprecated - public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int aHeat, Object... aOutput) { - if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; - RA.addThermalCentrifugeRecipe( - aInput, - (ItemStack) aOutput[0], - aOutput.length >= 2 ? (ItemStack) aOutput[1] : null, - aOutput.length >= 3 ? (ItemStack) aOutput[2] : null, - 500, - 48); - return true; - } - /** * IC2-OreWasher Recipe. Overloads old Recipes automatically */ + @Deprecated 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; RA.stdBuilder() @@ -934,76 +709,6 @@ public class GT_ModHandler { return true; } - public static boolean addOreWasherRecipe(ItemStack aInput, int aWaterAmount, Object... aOutput) { - if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false; - RA.stdBuilder() - .itemInputs(aInput) - .itemOutputs((ItemStack) aOutput[0], (ItemStack) aOutput[1], (ItemStack) aOutput[2]) - .fluidInputs(GT_ModHandler.getWater(aWaterAmount)) - .duration(25 * SECONDS) - .eut(16) - .addTo(oreWasherRecipes); - - RA.stdBuilder() - .itemInputs(aInput) - .itemOutputs((ItemStack) aOutput[0], (ItemStack) aOutput[1], (ItemStack) aOutput[2]) - .fluidInputs(GT_ModHandler.getDistilledWater(aWaterAmount / 5)) - .duration(15 * SECONDS) - .eut(16) - .addTo(oreWasherRecipes); - return true; - } - - /** - * IC2-Compressor Recipe. Overloads old Recipes automatically - */ - @Deprecated - public static boolean addCompressionRecipe(ItemStack aInput, ItemStack aOutput) { - return addCompressionRecipe(aInput, aOutput, 300, 2); - } - - /** - * IC2-Compressor Recipe. Overloads old Recipes automatically - */ - @Deprecated - 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; - RA.addCompressorRecipe(aInput, aOutput, duration, EUPerTick); - return true; - } - - /** - * @param aValue Scrap = 5000, Scrapbox = 45000, Diamond Dust 125000 - */ - public static boolean addIC2MatterAmplifier(ItemStack aAmplifier, int aValue) { - if (aAmplifier == null || aValue <= 0) return false; - try { - NBTTagCompound tNBT = new NBTTagCompound(); - tNBT.setInteger("amplification", aValue); - GT_Utility - .callMethod(ic2.api.recipe.Recipes.matterAmplifier, "addRecipe", false, false, false, aAmplifier, tNBT); - } catch (Throwable e) { - /* Do nothing */ - } - return true; - } - - /** - * Rolling Machine Crafting Recipe - */ - public static boolean addRollingMachineRecipe(ItemStack aResult, Object[] aRecipe) { - aResult = GT_OreDictUnificator.get(true, aResult); - if (aResult == null || aRecipe == null || aResult.stackSize <= 0) return false; - try { - mods.railcraft.api.crafting.RailcraftCraftingManager.rollingMachine.getRecipeList() - .add(new ShapedOreRecipe(GT_Utility.copyOrNull(aResult), aRecipe)); - } catch (Throwable e) { - return addCraftingRecipe(GT_Utility.copyOrNull(aResult), aRecipe); - } - return true; - } - public static void stopBufferingCraftingRecipes() { sBufferCraftingRecipes = false; @@ -2498,54 +2203,4 @@ public class GT_ModHandler { */ public static long DONT_REMOVE_SHAPELESS = B[13]; } - - /** - * Copy of the original Helper Class of Thermal Expansion, just to make sure it works even when other Mods include - * TE-APIs - */ - public static class ThermalExpansion { - - public static void addFurnaceRecipe(int energy, ItemStack input, ItemStack output) {} - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput) {} - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, - ItemStack secondaryOutput) {} - - public static void addPulverizerRecipe(int energy, ItemStack input, ItemStack primaryOutput, - ItemStack secondaryOutput, int secondaryChance) {} - - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput) {} - - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, - ItemStack secondaryOutput) {} - - public static void addSawmillRecipe(int energy, ItemStack input, ItemStack primaryOutput, - ItemStack secondaryOutput, int secondaryChance) {} - - |
