aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/util/GT_Recipe.java
diff options
context:
space:
mode:
authorGlease <4586901+Glease@users.noreply.github.com>2022-12-24 04:12:36 +0800
committerGitHub <noreply@github.com>2022-12-23 21:12:36 +0100
commitd8a737faaba655253666b343c052ea2ce61221ca (patch)
tree781d5cd83a9bd204e096c83fcaeb5a61040e276c /src/main/java/gregtech/api/util/GT_Recipe.java
parentd0d00ccb75318793c0fcd0a05c60affb403bfa96 (diff)
downloadGT5-Unofficial-d8a737faaba655253666b343c052ea2ce61221ca.tar.gz
GT5-Unofficial-d8a737faaba655253666b343c052ea2ce61221ca.tar.bz2
GT5-Unofficial-d8a737faaba655253666b343c052ea2ce61221ca.zip
add NEI handler for ic2 fuel rods (#1580)
* add NEI handler for ic2 fuel rods Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * fix typo Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> * rename variable to cover up the original intention Signed-off-by: Glease <4586901+Glease@users.noreply.github.com> Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/api/util/GT_Recipe.java')
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index a4562acb3d..b13d164109 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -2479,6 +2479,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
.setUsualFluidOutputCount(0)
.setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT);
+ public static final GT_Recipe_Map_IC2NuclearFake sIC2NuclearFakeRecipe = new GT_Recipe_Map_IC2NuclearFake();
+
/**
* HashMap of Recipes based on their Items
*/
@@ -5397,6 +5399,64 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
}
}
+ public static class GT_Recipe_Map_IC2NuclearFake extends GT_Recipe_Map {
+ public GT_Recipe_Map_IC2NuclearFake() {
+ super(
+ new HashSet<>(10),
+ "gt.recipe.ic2nuke",
+ "Fission",
+ null,
+ RES_PATH_GUI + "basicmachines/Default",
+ 1,
+ 1,
+ 1,
+ 0,
+ 1,
+ E,
+ 1,
+ E,
+ true,
+ true);
+ setLogo(GT_UITextures.PICTURE_RADIATION_WARNING);
+ setLogoPos(152, 24);
+ setNEIBackgroundSize(172, 60);
+ setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT);
+ }
+
+ /**
+ * Add a breeder cell.
+ * @param input raw stack. should be undamaged.
+ * @param output breed output
+ * @param heatMultiplier bonus progress per neutron pulse per heat step
+ * @param heatStep divisor for hull heat
+ * @param reflector true if also acts as a neutron reflector, false otherwise.
+ * @param requiredPulses progress required to complete breeding
+ * @return added fake recipe
+ */
+ public GT_Recipe addBreederCell(
+ ItemStack input,
+ ItemStack output,
+ boolean reflector,
+ int heatStep,
+ int heatMultiplier,
+ int requiredPulses) {
+ return addFakeRecipe(
+ input,
+ output,
+ reflector ? "Neutron reflecting breeder cell" : "Heat neutral Breeder Cell",
+ String.format("Every %d reactor hull heat", heatStep),
+ String.format("increase speed by %d00%%", heatMultiplier),
+ String.format("Required pulses: %d", requiredPulses));
+ }
+
+ public GT_Recipe addFakeRecipe(ItemStack input, ItemStack output, String... neiDesc) {
+ GT_Recipe r = new GT_Recipe(
+ new ItemStack[] {input}, new ItemStack[] {output}, null, new int[] {10000}, null, null, 0, 0, 0);
+ r.setNeiDesc(neiDesc);
+ return addRecipe(r, true, true, false);
+ }
+ }
+
public static class GT_Recipe_Map_LargeChemicalReactor extends GT_Recipe_Map_LargeNEI {
private static final int TOTAL_INPUT_COUNT = 6;
private static final int OUTPUT_COUNT = 6;