aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java
diff options
context:
space:
mode:
authorchochem <40274384+chochem@users.noreply.github.com>2023-05-29 22:19:38 +0100
committerGitHub <noreply@github.com>2023-05-29 23:19:38 +0200
commit556586c1871ca56da316472ffa6658d5033446d6 (patch)
tree0e0055ffdcc7bbcebade99716219eef706199e46 /src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java
parentae6a0ce551f6e2e2fde1fff77cd32daa7958ea8f (diff)
downloadGT5-Unofficial-556586c1871ca56da316472ffa6658d5033446d6.tar.gz
GT5-Unofficial-556586c1871ca56da316472ffa6658d5033446d6.tar.bz2
GT5-Unofficial-556586c1871ca56da316472ffa6658d5033446d6.zip
Final stretch for GT RA2 conversions (#2038)
* (un)boxing RA2 * fuel ra2 * blast RA2 * primitive blast RA2 * remaining cutter ra2 * fix
Diffstat (limited to 'src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java')
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java47
1 files changed, 33 insertions, 14 deletions
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java
index 1f33a3c7bc..61dacd421d 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java
@@ -4,6 +4,8 @@ import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes;
import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes;
import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sVacuumRecipes;
import static gregtech.api.util.GT_RecipeBuilder.TICKS;
+import static gregtech.api.util.GT_RecipeConstants.FUEL_TYPE;
+import static gregtech.api.util.GT_RecipeConstants.FUEL_VALUE;
import java.util.ArrayList;
@@ -19,6 +21,7 @@ import gregtech.api.objects.MaterialStack;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_RecipeBuilder;
+import gregtech.api.util.GT_RecipeConstants;
import gregtech.api.util.GT_Utility;
public class ProcessingCell implements IOreRecipeRegistrator {
@@ -40,13 +43,21 @@ public class ProcessingCell implements IOreRecipeRegistrator {
}
} else {
if (aMaterial.mFuelPower > 0) {
- GT_Values.RA.addFuel(
- GT_Utility.copyAmount(1L, aStack),
- GT_Utility.getFluidForFilledItem(aStack, true) == null
- ? GT_Utility.getContainerItem(aStack, true)
- : null,
- aMaterial.mFuelPower,
- aMaterial.mFuelType);
+ GT_RecipeBuilder recipeBuilder = GT_Values.RA.stdBuilder();
+ recipeBuilder.itemInputs(GT_Utility.copyAmount(1L, aStack));
+ if (GT_Utility.getFluidForFilledItem(aStack, true) == null
+ && GT_Utility.getContainerItem(aStack, true) != null) {
+ recipeBuilder.itemOutputs(GT_Utility.getContainerItem(aStack, true));
+ } else {
+ recipeBuilder.noItemOutputs();
+ }
+ recipeBuilder.noFluidInputs()
+ .noFluidOutputs()
+ .metadata(FUEL_VALUE, aMaterial.mFuelPower)
+ .metadata(FUEL_TYPE, aMaterial.mFuelType)
+ .duration(0)
+ .eut(0)
+ .addTo(GT_RecipeConstants.Fuel);
}
if ((aMaterial.mMaterialList.size() > 0) && ((aMaterial.mExtraData & 0x3) != 0)) {
int tAllAmount = 0;
@@ -174,13 +185,21 @@ public class ProcessingCell implements IOreRecipeRegistrator {
if (aMaterial == Materials.Empty) {
GT_ModHandler.removeRecipeByOutputDelayed(aStack);
} else {
- GT_Values.RA.addFuel(
- GT_Utility.copyAmount(1L, aStack),
- GT_Utility.getFluidForFilledItem(aStack, true) == null
- ? GT_Utility.getContainerItem(aStack, true)
- : null,
- (int) Math.max(1024L, 1024L * aMaterial.getMass()),
- 4);
+ GT_RecipeBuilder recipeBuilder = GT_Values.RA.stdBuilder();
+ recipeBuilder.itemInputs(GT_Utility.copyAmount(1L, aStack));
+ if (GT_Utility.getFluidForFilledItem(aStack, true) == null
+ && GT_Utility.getContainerItem(aStack, true) != null) {
+ recipeBuilder.itemOutputs(GT_Utility.getContainerItem(aStack, true));
+ } else {
+ recipeBuilder.noItemOutputs();
+ }
+ recipeBuilder.noFluidInputs()
+ .noFluidOutputs()
+ .metadata(FUEL_VALUE, (int) Math.max(1024L, 1024L * aMaterial.getMass()))
+ .metadata(FUEL_TYPE, 4)
+ .duration(0)
+ .eut(0)
+ .addTo(GT_RecipeConstants.Fuel);
if (GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L) != null) {
GT_Values.RA.stdBuilder()
.itemInputs(GT_Utility.copyAmount(1L, aStack))