aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/util/GT_RecipeConstants.java
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2024-08-15 15:38:58 +0200
committerGitHub <noreply@github.com>2024-08-15 15:38:58 +0200
commit0f990a7cfd78c3ede4db09a893e1e6edff164a2a (patch)
tree5ab69d203be91a1c15313f61d9172f9bbdd4ba82 /src/main/java/gregtech/api/util/GT_RecipeConstants.java
parent33c8d91bbe289651270378316fdadab730aa386f (diff)
downloadGT5-Unofficial-0f990a7cfd78c3ede4db09a893e1e6edff164a2a.tar.gz
GT5-Unofficial-0f990a7cfd78c3ede4db09a893e1e6edff164a2a.tar.bz2
GT5-Unofficial-0f990a7cfd78c3ede4db09a893e1e6edff164a2a.zip
Cleanup (#2803)
* remove dead code * use proper materials for tiered circuits * remove yet another RA1 call * remove deprecated usage * small step toward Research station assline recipes migration * remove dead code * remove dead code * remove dead code * migrate BW recipes * remove some more RA1 code * remove bad search and replace + spotlessapply * yeet deprecated code and change how sieverts for recipes are computed * fix loading * fix bad replacements * spotless apply
Diffstat (limited to 'src/main/java/gregtech/api/util/GT_RecipeConstants.java')
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeConstants.java43
1 files changed, 32 insertions, 11 deletions
diff --git a/src/main/java/gregtech/api/util/GT_RecipeConstants.java b/src/main/java/gregtech/api/util/GT_RecipeConstants.java
index 72027cff51..22dc842941 100644
--- a/src/main/java/gregtech/api/util/GT_RecipeConstants.java
+++ b/src/main/java/gregtech/api/util/GT_RecipeConstants.java
@@ -1,5 +1,6 @@
package gregtech.api.util;
+import static gregtech.api.recipe.RecipeMaps.scannerFakeRecipes;
import static gregtech.api.util.GT_RecipeMapUtil.convertCellToFluid;
import java.util.ArrayList;
@@ -18,8 +19,10 @@ import com.elisis.gtnhlanth.common.item.PhotolithographicMask;
import com.elisis.gtnhlanth.common.register.LanthItemList;
import cpw.mods.fml.common.registry.GameRegistry;
+import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
+import gregtech.api.enums.TierEU;
import gregtech.api.interfaces.IRecipeMap;
import gregtech.api.recipe.RecipeCategories;
import gregtech.api.recipe.RecipeMaps;
@@ -185,6 +188,20 @@ public class GT_RecipeConstants {
.create(Integer.class, "lftr_output_power");
/**
+ * Research Station data.
+ */
+ public static final RecipeMetadataKey<Integer> RESEARCH_STATION_DATA = SimpleRecipeMetadataKey
+ .create(Integer.class, "research_station_data");
+
+ /**
+ * glass tier required for the biovat recipes.
+ */
+ public static final RecipeMetadataKey<Integer> SIEVERTS = SimpleRecipeMetadataKey.create(Integer.class, "sieverts");
+
+ public static final RecipeMetadataKey<Integer> DECAY_TICKS = SimpleRecipeMetadataKey
+ .create(Integer.class, "decay_ticks");
+
+ /**
* Add a arc furnace recipe. Adds to both normal arc furnace and plasma arc furnace.
* Will override the fluid input with oxygen/plasma for the respective recipe maps, so there is no point setting it.
*/
@@ -454,17 +471,18 @@ public class GT_RecipeConstants {
tPersistentHash = tPersistentHash * 31 + r.mDuration;
tPersistentHash = tPersistentHash * 31 + r.mEUt;
Collection<GT_Recipe> ret = new ArrayList<>(3);
- ret.add(
- RecipeMaps.scannerFakeRecipes.addFakeRecipe(
- false,
- new ItemStack[] { aResearchItem },
- new ItemStack[] { aOutput },
- new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Writes Research result") },
- null,
- null,
- aResearchTime,
- 30,
- -201)); // means it's scanned
+ ret.addAll(
+ GT_Values.RA.stdBuilder()
+ .itemInputs(aResearchItem)
+ .itemOutputs(aOutput)
+ .special(ItemList.Tool_DataStick.getWithName(1L, "Writes Research result"))
+ .duration(aResearchTime)
+ .eut(TierEU.RECIPE_LV)
+ .specialValue(-201) // means it's scanned
+ .noOptimize()
+ .ignoreCollision()
+ .fake()
+ .addTo(scannerFakeRecipes));
ret.add(
RecipeMaps.assemblylineVisualRecipes.addFakeRecipe(
@@ -575,6 +593,9 @@ public class GT_RecipeConstants {
GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(NKE_RANGE);
GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(PRECISE_ASSEMBLER_CASING_TIER);
GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(COAL_CASING_TIER);
+ GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(RESEARCH_STATION_DATA);
+ GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(SIEVERTS);
+ GT_RecipeMapUtil.SPECIAL_VALUE_ALIASES.add(DECAY_TICKS);
}
}