aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/loaders/oreprocessing
diff options
context:
space:
mode:
authorchochem <40274384+chochem@users.noreply.github.com>2023-05-17 18:38:56 +0100
committerGitHub <noreply@github.com>2023-05-17 19:38:56 +0200
commit4323ab8af257370237d8fd312e9e4024bccc67ab (patch)
tree46b51d9db218e6a5b18518f4d42bb0325e729d72 /src/main/java/gregtech/loaders/oreprocessing
parent8e59f92c37c7d035c9c914aff4dbedfb77f0fec9 (diff)
downloadGT5-Unofficial-4323ab8af257370237d8fd312e9e4024bccc67ab.tar.gz
GT5-Unofficial-4323ab8af257370237d8fd312e9e4024bccc67ab.tar.bz2
GT5-Unofficial-4323ab8af257370237d8fd312e9e4024bccc67ab.zip
More RA2 conversion for automatic gt recipes (#2000)
* fully convert all wiremill recipes and clean up unnecessary duplicate code * fully convert all polarizer recipes * fully convert all canner recipes * RA2 for oredict plank recipes * RA2 for oredict stoneCobble recipes * convert some assembler recipes to RA2 * fix * fix2 * remove recipes that were never in the game
Diffstat (limited to 'src/main/java/gregtech/loaders/oreprocessing')
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java203
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java39
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java66
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java94
4 files changed, 224 insertions, 178 deletions
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java
index e36eed66ab..78bfe32e3c 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java
@@ -1,5 +1,11 @@
package gregtech.loaders.oreprocessing;
+import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sAssemblerRecipes;
+import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sCutterRecipes;
+import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sLatheRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -22,89 +28,60 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName,
ItemStack aStack) {
if (aOreDictName.startsWith("plankWood")) {
- GT_Values.RA.addLatheRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L),
- null,
- 10,
- 8);
- GT_Values.RA.addCNCRecipe(
- GT_Utility.copyAmount(4L, aStack),
- GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Wood, 1L),
- 800,
- 1);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(8L, aStack),
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L),
- new ItemStack(Blocks.noteblock, 1),
- 200,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(8L, aStack),
- GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 1L),
- new ItemStack(Blocks.jukebox, 1),
- 400,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 1L),
- ItemList.Crate_Empty.get(1L),
- 200,
- 1);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.WroughtIron, 1L),
- ItemList.Crate_Empty.get(1L),
- 200,
- 1);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L),
- ItemList.Crate_Empty.get(1L),
- 200,
- 1);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- ItemList.Circuit_Integrated.getWithDamage(0L, 1L),
- new ItemStack(Blocks.wooden_button, 1),
- 100,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(2L, aStack),
- ItemList.Circuit_Integrated.getWithDamage(0L, 2L),
- new ItemStack(Blocks.wooden_pressure_plate, 1),
- 200,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(3L, aStack),
- ItemList.Circuit_Integrated.getWithDamage(0L, 3L),
- new ItemStack(Blocks.trapdoor, 1),
- 300,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(4L, aStack),
- ItemList.Circuit_Integrated.getWithDamage(0L, 4L),
- new ItemStack(Blocks.crafting_table, 1),
- 400,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(6L, aStack),
- ItemList.Circuit_Integrated.getWithDamage(0L, 6L),
- new ItemStack(Items.wooden_door, 1),
- 600,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(8L, aStack),
- ItemList.Circuit_Integrated.getWithDamage(0L, 8L),
- new ItemStack(Blocks.chest, 1),
- 800,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(6L, aStack),
- new ItemStack(Items.book, 3),
- new ItemStack(Blocks.bookshelf, 1),
- 400,
- 4);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(10 * TICKS)
+ .eut(8)
+ .addTo(sLatheRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_Utility.copyAmount(1L, aStack),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 1L))
+ .itemOutputs(ItemList.Crate_Empty.get(1L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(10 * SECONDS)
+ .eut(1)
+ .addTo(sAssemblerRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_Utility.copyAmount(1L, aStack),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.WroughtIron, 1L))
+ .itemOutputs(ItemList.Crate_Empty.get(1L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(10 * SECONDS)
+ .eut(1)
+ .addTo(sAssemblerRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_Utility.copyAmount(1L, aStack),
+ GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L))
+ .itemOutputs(ItemList.Crate_Empty.get(1L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(10 * SECONDS)
+ .eut(1)
+ .addTo(sAssemblerRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(8L, aStack), GT_Utility.getIntegratedCircuit(8))
+ .itemOutputs(new ItemStack(Blocks.chest, 1))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(40 * SECONDS)
+ .eut(4)
+ .addTo(sAssemblerRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(6L, aStack), new ItemStack(Items.book, 3))
+ .itemOutputs(new ItemStack(Blocks.bookshelf, 1))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(20 * SECONDS)
+ .eut(4)
+ .addTo(sAssemblerRecipes);
if (aStack.getItemDamage() == 32767) {
for (byte i = 0; i < 64; i = (byte) (i + 1)) {
@@ -112,12 +89,30 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist
// Get Recipe and Output, add recipe to delayed removal
ItemStack tOutput = GT_ModHandler.getRecipeOutput(tStack, tStack, tStack);
if ((tOutput != null) && (tOutput.stackSize >= 3)) {
- GT_Values.RA.addCutterRecipe(
- GT_Utility.copyAmount(1L, tStack),
- GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput),
- null,
- 25,
- 4);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, tStack))
+ .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput))
+ .fluidInputs(Materials.Water.getFluid(4))
+ .noFluidOutputs()
+ .duration(2 * 25 * TICKS)
+ .eut(4)
+ .addTo(sCutterRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, tStack))
+ .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput))
+ .fluidInputs(GT_ModHandler.getDistilledWater(3))
+ .noFluidOutputs()
+ .duration(2 * 25 * TICKS)
+ .eut(4)
+ .addTo(sCutterRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, tStack))
+ .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput))
+ .fluidInputs(Materials.Lubricant.getFluid(1))
+ .noFluidOutputs()
+ .duration(25 * TICKS)
+ .eut(4)
+ .addTo(sCutterRecipes);
GT_ModHandler.removeRecipeDelayed(tStack, tStack, tStack);
GT_ModHandler.addCraftingRecipe(
GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput),
@@ -131,12 +126,30 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist
? GT_ModHandler.getRecipeOutput(aStack, aStack, aStack)
: GT_ModHandler.getRecipeOutputNoOreDict(aStack, aStack, aStack);
if ((tOutput != null) && (tOutput.stackSize >= 3)) {
- GT_Values.RA.addCutterRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput),
- null,
- 25,
- 4);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput))
+ .fluidInputs(Materials.Water.getFluid(4))
+ .noFluidOutputs()
+ .duration(2 * 25)
+ .eut(4)
+ .addTo(sCutterRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput))
+ .fluidInputs(GT_ModHandler.getDistilledWater(3))
+ .noFluidOutputs()
+ .duration(2 * 25)
+ .eut(4)
+ .addTo(sCutterRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput))
+ .fluidInputs(Materials.Lubricant.getFluid(1))
+ .noFluidOutputs()
+ .duration(25)
+ .eut(4)
+ .addTo(sCutterRecipes);
GT_ModHandler.removeRecipeDelayed(aStack, aStack, aStack);
GT_ModHandler.addCraftingRecipe(
GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput),
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java
index 6b545f2d02..9b4d4eab9f 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingStoneCobble.java
@@ -1,14 +1,14 @@
package gregtech.loaders.oreprocessing;
+import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sAssemblerRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+
import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
public class ProcessingStoneCobble implements gregtech.api.interfaces.IOreRecipeRegistrator {
@@ -20,30 +20,13 @@ public class ProcessingStoneCobble implements gregtech.api.interfaces.IOreRecipe
@Override
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName,
ItemStack aStack) {
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 1L),
- new ItemStack(Blocks.lever, 1),
- 400,
- 1);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(8L, aStack),
- ItemList.Circuit_Integrated.getWithDamage(0L, 8L),
- new ItemStack(Blocks.furnace, 1),
- 400,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(7L, aStack),
- GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L),
- new ItemStack(Blocks.dropper, 1),
- 400,
- 4);
- GT_Values.RA.addAssemblerRecipe(
- GT_Utility.copyAmount(7L, aStack),
- new ItemStack(Items.bow, 1, 0),
- Materials.Redstone.getMolten(144L),
- new ItemStack(Blocks.dispenser, 1),
- 400,
- 4);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(8L, aStack), GT_Utility.getIntegratedCircuit(8))
+ .itemOutputs(new ItemStack(Blocks.furnace, 1))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(20 * SECONDS)
+ .eut(4)
+ .addTo(sAssemblerRecipes);
}
}
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java
index 464fc90cd6..dd16de83b7 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingToolHead.java
@@ -1,6 +1,8 @@
package gregtech.loaders.oreprocessing;
+import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sAssemblerRecipes;
import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sPressRecipes;
+import static gregtech.api.util.GT_RecipeBuilder.MINUTES;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
import static gregtech.api.util.GT_Utility.calculateRecipeEU;
@@ -1132,30 +1134,46 @@ public class ProcessingToolHead implements gregtech.api.interfaces.IOreRecipeReg
OrePrefixes.ingot.get(aMaterial) });
}
case turbineBlade -> {
- GT_Values.RA.addAssemblerRecipe(
- GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 4L),
- GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1L),
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(170, 1, aMaterial, aMaterial, null),
- 160,
- calculateRecipeEU(aMaterial, 100));
- GT_Values.RA.addAssemblerRecipe(
- GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 8L),
- GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1L),
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(172, 1, aMaterial, aMaterial, null),
- 320,
- calculateRecipeEU(aMaterial, 400));
- GT_Values.RA.addAssemblerRecipe(
- GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 12L),
- GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1L),
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(174, 1, aMaterial, aMaterial, null),
- 640,
- calculateRecipeEU(aMaterial, 1600));
- GT_Values.RA.addAssemblerRecipe(
- GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 16L),
- GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1L),
- GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(176, 1, aMaterial, aMaterial, null),
- 1280,
- calculateRecipeEU(aMaterial, 6400));
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 4L),
+ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1L))
+ .itemOutputs(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(170, 1, aMaterial, aMaterial, null))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(8 * SECONDS)
+ .eut(calculateRecipeEU(aMaterial, 100))
+ .addTo(sAssemblerRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 8L),
+ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1L))
+ .itemOutputs(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(172, 1, aMaterial, aMaterial, null))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(16 * SECONDS)
+ .eut(calculateRecipeEU(aMaterial, 400))
+ .addTo(sAssemblerRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 12L),
+ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1L))
+ .itemOutputs(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(174, 1, aMaterial, aMaterial, null))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(32 * SECONDS)
+ .eut(calculateRecipeEU(aMaterial, 1600))
+ .addTo(sAssemblerRecipes);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(
+ GT_OreDictUnificator.get(OrePrefixes.turbineBlade, aMaterial, 16L),
+ GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1L))
+ .itemOutputs(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(176, 1, aMaterial, aMaterial, null))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(1 * MINUTES + 4 * SECONDS)
+ .eut(calculateRecipeEU(aMaterial, 6400))
+ .addTo(sAssemblerRecipes);
if (aSpecialRecipeReq2) {
if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) {
GT_ModHandler.addCraftingRecipe(
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java
index c86387427f..9664016c22 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingTransforming.java
@@ -1,7 +1,9 @@
package gregtech.loaders.oreprocessing;
import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sChemicalBathRecipes;
+import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sPolarizerRecipes;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
+import static gregtech.api.util.GT_RecipeBuilder.TICKS;
import net.minecraft.item.ItemStack;
@@ -66,11 +68,16 @@ public class ProcessingTransforming implements IOreRecipeRegistrator {
// Polarizer recipes
{
- GT_Values.RA.addPolarizerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L),
- (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M),
- (int) TierEU.LV / 2);
+ if (GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L) != null) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(((int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M)) * TICKS)
+ .eut((int) TierEU.LV / 2)
+ .addTo(sPolarizerRecipes);
+ }
}
}
case "WroughtIron" -> {
@@ -92,11 +99,16 @@ public class ProcessingTransforming implements IOreRecipeRegistrator {
// Polarizer recipes
{
- GT_Values.RA.addPolarizerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L),
- (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M),
- (int) TierEU.LV / 2);
+ if (GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L) != null) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_OreDictUnificator.get(aPrefix, Materials.IronMagnetic, 1L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(((int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M)) * TICKS)
+ .eut((int) TierEU.LV / 2)
+ .addTo(sPolarizerRecipes);
+ }
}
}
case "Steel" -> {
@@ -116,42 +128,62 @@ public class ProcessingTransforming implements IOreRecipeRegistrator {
}
}
- // polarizer recipes
+ // Polarizer recipes
{
- GT_Values.RA.addPolarizerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(aPrefix, Materials.SteelMagnetic, 1L),
- (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M),
- (int) TierEU.LV / 2);
+ if (GT_OreDictUnificator.get(aPrefix, Materials.SteelMagnetic, 1L) != null) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_OreDictUnificator.get(aPrefix, Materials.SteelMagnetic, 1L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(((int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M)) * TICKS)
+ .eut((int) TierEU.LV / 2)
+ .addTo(sPolarizerRecipes);
+ }
}
}
case "Neodymium" ->
// Polarizer recipes
{
- GT_Values.RA.addPolarizerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(aPrefix, Materials.NeodymiumMagnetic, 1L),
- (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M),
- (int) TierEU.HV / 2);
+ if (GT_OreDictUnificator.get(aPrefix, Materials.NeodymiumMagnetic, 1L) != null) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_OreDictUnificator.get(aPrefix, Materials.NeodymiumMagnetic, 1L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(((int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M)) * TICKS)
+ .eut((int) TierEU.HV / 2)
+ .addTo(sPolarizerRecipes);
+ }
}
case "Samarium" ->
// Polarizer recipes
{
- GT_Values.RA.addPolarizerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(aPrefix, Materials.SamariumMagnetic, 1L),
- (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M),
- (int) TierEU.IV / 2);
+ if (GT_OreDictUnificator.get(aPrefix, Materials.SamariumMagnetic, 1L) != null) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_OreDictUnificator.get(aPrefix, Materials.SamariumMagnetic, 1L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(((int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M)) * TICKS)
+ .eut((int) TierEU.IV / 2)
+ .addTo(sPolarizerRecipes);
+ }
}
case "TengamPurified" ->
// Polarizer recipes
{
- GT_Values.RA.addPolarizerRecipe(
- GT_Utility.copyAmount(1L, aStack),
- GT_OreDictUnificator.get(aPrefix, Materials.TengamAttuned, 1L),
- (int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M),
- (int) TierEU.RECIPE_UHV);
+ if (GT_OreDictUnificator.get(aPrefix, Materials.TengamAttuned, 1L) != null) {
+ GT_Values.RA.stdBuilder()
+ .itemInputs(GT_Utility.copyAmount(1L, aStack))
+ .itemOutputs(GT_OreDictUnificator.get(aPrefix, Materials.TengamAttuned, 1L))
+ .noFluidInputs()
+ .noFluidOutputs()
+ .duration(((int) Math.max(16L, aPrefix.mMaterialAmount * 128L / GT_Values.M)) * TICKS)
+ .eut((int) TierEU.RECIPE_UHV)
+ .addTo(sPolarizerRecipes);
+ }
}
default -> { /* NO-OP */ }