aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/goodgenerator/util/MyRecipeAdder.java
diff options
context:
space:
mode:
authorMadMan310 <66886359+MadMan310@users.noreply.github.com>2022-11-29 01:50:58 -0800
committerGitHub <noreply@github.com>2022-11-29 10:50:58 +0100
commitf985e28ae553428945f3ce3841ac036c98266128 (patch)
tree278c857c13493a8d0fdaebfb9a3d9cb90d07a774 /src/main/java/goodgenerator/util/MyRecipeAdder.java
parent766af258761d0cc88d44169d06ae47198218078e (diff)
downloadGT5-Unofficial-f985e28ae553428945f3ce3841ac036c98266128.tar.gz
GT5-Unofficial-f985e28ae553428945f3ce3841ac036c98266128.tar.bz2
GT5-Unofficial-f985e28ae553428945f3ce3841ac036c98266128.zip
Component Assembly Line (#102)
* Initial Commit * Added recipe generator for components LV-IV * Added recipe generator for components LuV and beyond This one took a LONG time to make work... * Added structure and recipe processing * Added Recipes for Controller and Casings * Cleanup * Assline gives proper amount same as assembler * tooltip fix * add support for BW glass and warded glass * Added proper NEI handler * spotless * Spotless apply for branch componentAssemblyLine for #102 (#103) * Update build-and-test.yml * fix missing hatch element (#92) * fix missing hatch element * spotlessApply (#93) Co-authored-by: Yang Xizhi <60341015+GlodBlock@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix bunch of yottank issues (#94) * yot tank/hatch fix * dep * Add better naq fuel recipes to combat fusion spam (#91) * Add higher tier naq fuel recipes * Fix Hypogen (hopefully) * Spotless >:( * Slightly change tooltip on the Precise Assembler (#95) 0.03 mm changed to 7nm * fix 0 stack of nuclear rod (#98) * naq fuel change (#96) * naq fuel change * Spotless apply for branch naqfuel for #96 (#97) * Slightly change tooltip on the Precise Assembler (#95) 0.03 mm changed to 7nm * spotlessApply Co-authored-by: MadMan310 <66886359+MadMan310@users.noreply.github.com> Co-authored-by: Yang Xizhi <60341015+GlodBlock@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: MadMan310 <66886359+MadMan310@users.noreply.github.com> * Naq Fuel 1,2,3 Changes (#99) * Naq Emulsion line changes * Mk1 recipe change * Fuel value changes * Mk2 fuel recipe changes * Radiation proof plate recipe changes * Fix sludge dust centrifuge amounts * Remove Hafnium recipe for now * Spotless * thorium balance change (#76) * Add implementation for tank info getter (#101) * Add void excess option to yotta fluid tank (#100) * Add void excess option to yotta fluid tank * derp * Added own localization of void excess toggle messages * Update build.gradle * update bc * spotlessApply Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: Yang Xizhi <60341015+GlodBlock@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: GDCloud <93287602+GDCloudstrike@users.noreply.github.com> Co-authored-by: MadMan310 <66886359+MadMan310@users.noreply.github.com> Co-authored-by: xSkewer <43712386+xSkewer@users.noreply.github.com> Co-authored-by: Maxim <maxim235@gmx.de> Co-authored-by: GitHub GTNH Actions <> * cleanup handler * Overhauled recipe generator, added circuit wraps, buffed output efficiency * Structure re-tiering * Gravi -> Nuclear for UHV components (due to overflowing) * spotless * added new casings * removed some debug info and added dep * Fixed magnetic samarium fluid and other autogenerations * fixed recipe tiering * Removed Nuclear Star, to be replaced by the GT5U version * spotless * fixed recipe handling Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: Yang Xizhi <60341015+GlodBlock@users.noreply.github.com> Co-authored-by: GDCloud <93287602+GDCloudstrike@users.noreply.github.com> Co-authored-by: xSkewer <43712386+xSkewer@users.noreply.github.com> Co-authored-by: Maxim <maxim235@gmx.de>
Diffstat (limited to 'src/main/java/goodgenerator/util/MyRecipeAdder.java')
-rw-r--r--src/main/java/goodgenerator/util/MyRecipeAdder.java111
1 files changed, 111 insertions, 0 deletions
diff --git a/src/main/java/goodgenerator/util/MyRecipeAdder.java b/src/main/java/goodgenerator/util/MyRecipeAdder.java
index 3e2c5371a3..58e0540340 100644
--- a/src/main/java/goodgenerator/util/MyRecipeAdder.java
+++ b/src/main/java/goodgenerator/util/MyRecipeAdder.java
@@ -1,8 +1,11 @@
package goodgenerator.util;
+import static gregtech.api.enums.GT_Values.NI;
+
import codechicken.nei.PositionedStack;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gregtech.nei.GT_NEI_DefaultHandler;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -467,6 +470,7 @@ public class MyRecipeAdder {
}
}
+ @SuppressWarnings("deprecation")
public static class PreciseAssemblerRecipe extends GT_Recipe {
public PreciseAssemblerRecipe(
ItemStack[] input1, FluidStack[] input2, ItemStack output, int EUt, int ticks, int tier) {
@@ -511,4 +515,111 @@ public class MyRecipeAdder {
PA.addRecipe(
false, aItemInputs, new ItemStack[] {aOutput}, null, null, aFluidInputs, null, aDuration, aEUt, aTier);
}
+
+ public static class ComponentAssemblyLineMapper extends GT_Recipe.GT_Recipe_Map {
+
+ public ComponentAssemblyLineMapper(
+ Collection<GT_Recipe> aRecipeList,
+ String aUnlocalizedName,
+ String aLocalName,
+ String aNEIName,
+ String aNEIGUIPath,
+ int aUsualInputCount,
+ int aUsualOutputCount,
+ int aMinimalInputItems,
+ int aMinimalInputFluids,
+ int aAmperage,
+ String aNEISpecialValuePre,
+ int aNEISpecialValueMultiplier,
+ String aNEISpecialValuePost,
+ boolean aShowVoltageAmperageInNEI,
+ boolean aNEIAllowed) {
+
+ super(
+ aRecipeList,
+ aUnlocalizedName,
+ aLocalName,
+ aNEIName,
+ aNEIGUIPath,
+ aUsualInputCount,
+ aUsualOutputCount,
+ aMinimalInputItems,
+ aMinimalInputFluids,
+ aAmperage,
+ aNEISpecialValuePre,
+ aNEISpecialValueMultiplier,
+ aNEISpecialValuePost,
+ aShowVoltageAmperageInNEI,
+ aNEIAllowed,
+ true);
+ }
+
+ @Override
+ public ArrayList<PositionedStack> getInputPositionedStacks(GT_Recipe recipe) {
+ ArrayList<PositionedStack> inputStacks = new ArrayList<>();
+
+ if (recipe.mInputs != null) {
+ for (int j = 0; j < recipe.mInputs.length; j++) {
+ if (recipe.mInputs[j] == NI) continue;
+ inputStacks.add(new GT_NEI_DefaultHandler.FixedPositionedStack(
+ recipe.mInputs[j].copy(), 12 + 18 * (j % 3), 5 + 18 * (j / 3)));
+ }
+ }
+ if (recipe.mFluidInputs != null) {
+ for (int j = 0; j < recipe.mFluidInputs.length; j++) {
+
+ inputStacks.add(new GT_NEI_DefaultHandler.FixedPositionedStack(
+ GT_Utility.getFluidDisplayStack(recipe.mFluidInputs[j], true),
+ 84 + 18 * (j % 4),
+ 27 + 18 * (j / 4)));
+ }
+ }
+ return inputStacks;
+ }
+
+ @Override
+ public ArrayList<PositionedStack> getOutputPositionedStacks(GT_Recipe recipe) {
+ ArrayList<PositionedStack> outputStacks = new ArrayList<>();
+ if (recipe.mOutputs != null) {
+ outputStacks.add(new GT_NEI_DefaultHandler.FixedPositionedStack(recipe.mOutputs[0].copy(), 138, 5));
+ }
+ return outputStacks;
+ }
+ }
+
+ public final ComponentAssemblyLineMapper COMPASSLINE_RECIPES = new ComponentAssemblyLineMapper(
+ new HashSet<>(110),
+ "gg.recipe.componentassemblyline",
+ "Component Assembly Line",
+ null,
+ "goodgenerator:textures/gui/ComponentAssline",
+ 9,
+ 1,
+ 0,
+ 0,
+ 1,
+ "Casing Tier: ",
+ 1,
+ "",
+ false,
+ false);
+
+ public GT_Recipe addComponentAssemblyLineRecipe(
+ ItemStack[] ItemInputArray,
+ FluidStack[] FluidInputArray,
+ ItemStack OutputItem,
+ int aDuration,
+ int aEUt,
+ int casingLevel) {
+ return COMPASSLINE_RECIPES.addRecipe(
+ false,
+ ItemInputArray,
+ new ItemStack[] {OutputItem},
+ null,
+ FluidInputArray,
+ null,
+ aDuration,
+ aEUt,
+ casingLevel);
+ }
}