aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2024-07-21 16:36:34 +0200
committerGitHub <noreply@github.com>2024-07-21 21:36:34 +0700
commita8b46c11f5a02608101ef33ed39f103736ba5920 (patch)
tree6daf492e524dcae9f2f5a8cb1d87c057c21a6760 /src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
parent8b077c28bea7bcc046be1e4b8485d69b4c245a43 (diff)
downloadGT5-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/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java147
1 files changed, 78 insertions, 69 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
index f11b97cbda..ce17a8724c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
@@ -1,13 +1,18 @@
package gtPlusPlus.xmod.gregtech.loaders;
+import static gregtech.api.recipe.RecipeMaps.compressorRecipes;
+import static gregtech.api.recipe.RecipeMaps.cutterRecipes;
+import static gregtech.api.recipe.RecipeMaps.hammerRecipes;
+import static gregtech.api.recipe.RecipeMaps.latheRecipes;
+import static gregtech.api.recipe.RecipeMaps.vacuumFreezerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
import java.util.HashSet;
import java.util.Set;
import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_ModHandler;
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialGenerator;
import gtPlusPlus.core.util.minecraft.ItemUtils;
@@ -34,79 +39,83 @@ public class RecipeGen_MetalRecipe extends RecipeGen_Base {
Logger.WARNING("Generating Metal recipes for " + material.getLocalizedName());
if (ItemUtils.checkForInvalidItems(material.getIngot(1))
- && ItemUtils.checkForInvalidItems(material.getBlock(1)))
- if (GT_ModHandler.addCompressionRecipe(material.getIngot(9), material.getBlock(1))) {
- Logger.WARNING("Compress Block Recipe: " + material.getLocalizedName() + " - Success");
- } else {
- Logger.WARNING("Compress Block Recipe: " + material.getLocalizedName() + " - Failed");
- }
-
- if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRod(1)))
- if (GT_Values.RA.addLatheRecipe(
- material.getIngot(1),
- material.getRod(1),
- material.getSmallDust(2),
- (int) Math.max(material.getMass() / 8L, 1L),
- material.vVoltageMultiplier)) {
- Logger.WARNING("Lathe Rod Recipe: " + material.getLocalizedName() + " - Success");
- } else {
- Logger.WARNING("Lathe Rod Recipe: " + material.getLocalizedName() + " - Failed");
- }
-
- if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1)))
- if (GT_Values.RA.addCutterRecipe(
- material.getRod(1),
- material.getBolt(4),
- null,
- (int) Math.max(material.getMass() * 2L, 1L),
- material.vVoltageMultiplier)) {
- Logger.WARNING("Cut Bolt Recipe: " + material.getLocalizedName() + " - Success");
- } else {
- Logger.WARNING("Cut Bolt Recipe: " + material.getLocalizedName() + " - Failed");
- }
+ && ItemUtils.checkForInvalidItems(material.getBlock(1))) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(material.getIngot(9))
+ .itemOutputs(material.getBlock(1))
+ .duration(15 * SECONDS)
+ .eut(2)
+ .addTo(compressorRecipes);
+ Logger.WARNING("Compress Block Recipe: " + material.getLocalizedName() + " - Success");
+
+ }
+
+ if (ItemUtils.checkForInvalidItems(material.getIngot(1))
+ && ItemUtils.checkForInvalidItems(material.getRod(1))) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(material.getIngot(1))
+ .itemOutputs(material.getRod(1), material.getSmallDust(2))
+ .duration(Math.max(material.getMass() / 8L, 1L))
+ .eut(material.vVoltageMultiplier)
+ .addTo(latheRecipes);
+
+ Logger.WARNING("Lathe Rod Recipe: " + material.getLocalizedName() + " - Success");
+ }
+
+ if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1))) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(material.getRod(1))
+ .itemOutputs(material.getBolt(4))
+ .duration(Math.max(material.getMass() * 2L, 1L))
+ .eut(material.vVoltageMultiplier)
+ .addTo(cutterRecipes);
+
+ Logger.WARNING("Cut Bolt Recipe: " + material.getLocalizedName() + " - Success");
+ }
if (ItemUtils.checkForInvalidItems(material.getIngot(1))
- && ItemUtils.checkForInvalidItems(material.getHotIngot(1)))
- if (CORE.RA.addVacuumFreezerRecipe(
- material.getHotIngot(1),
- material.getIngot(1),
- (int) Math.max(material.getMass() * 3L, 1L),
- material.vVoltageMultiplier)) {
- Logger.WARNING("Cool Hot Ingot Recipe: " + material.getLocalizedName() + " - Success");
- } else {
- Logger.WARNING("Cool Hot Ingot Recipe: " + material.getLocalizedName() + " - Failed");
- }
+ && ItemUtils.checkForInvalidItems(material.getHotIngot(1))) {
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(material.getHotIngot(1))
+ .itemOutputs(material.getIngot(1))
+ .duration((int) Math.max(material.getMass() * 3L, 1L))
+ .eut(material.vVoltageMultiplier)
+ .addTo(vacuumFreezerRecipes);
+ Logger.WARNING("Cool Hot Ingot Recipe: " + material.getLocalizedName() + " - Success");
+ }
if (ItemUtils.checkForInvalidItems(material.getRod(1))
&& ItemUtils.checkForInvalidItems(material.getLongRod(1))) {
- if (GT_Values.RA.addForgeHammerRecipe(
- material.getRod(2),
- material.getLongRod(1),
- (int) Math.max(material.getMass(), 1L),
- 16)) {
- Logger.WARNING("Hammer Long Rod Recipe: " + material.getLocalizedName() + " - Success");
- } else {
- Logger.WARNING("Hammer Long Rod Recipe: " + material.getLocalizedName() + " - Failed");
- }
-
- GT_Values.RA.addCutterRecipe(
- material.getLongRod(1),
- material.getRod(2),
- null,
- (int) Math.max(material.getMass(), 1L),
- 4);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(material.getRod(2))
+ .itemOutputs(material.getLongRod(1))
+ .duration((int) Math.max(material.getMass(), 1L))
+ .eut(16)
+ .addTo(hammerRecipes);
+
+ Logger.WARNING("Hammer Long Rod Recipe: " + material.getLocalizedName() + " - Success");
+
+ GT_Values.RA.stdBuilder()
+ .itemInputs(material.getLongRod(1))
+ .itemOutputs(material.getRod(2))
+ .duration(Math.max(material.getMass(), 1L))
+ .eut(4)
+ .addTo(cutterRecipes);
+
}
- if (ItemUtils.checkForInvalidItems(material.getBolt(1)) && ItemUtils.checkForInvalidItems(material.getScrew(1)))
- if (GT_Values.RA.addLatheRecipe(
- material.getBolt(1),
- material.getScrew(1),
- null,
- (int) Math.max(material.getMass() / 8L, 1L),
- 4)) {
- Logger.WARNING("Lathe Screw Recipe: " + material.getLocalizedName() + " - Success");
- } else {
- Logger.WARNING("Lathe Screw Recipe: " + material.getLocalizedName() + " - Failed");
- }
+ if (ItemUtils.checkForInvalidItems(material.getBolt(1))
+ && ItemUtils.checkForInvalidItems(material.getScrew(1))) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(material.getBolt(1))
+ .itemOutputs(material.getScrew(1))
+ .duration(Math.max(material.getMass() / 8L, 1L))
+ .eut(4)
+ .addTo(latheRecipes);
+
+ Logger.WARNING("Lathe Screw Recipe: " + material.getLocalizedName() + " - Success");
+ }
}
}