From 3b834d6cebae287cd9bbeddd4f157338da6e1ea5 Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 16 Feb 2023 10:14:49 +0100 Subject: Fusion NEI support (#1742) * Added optional special value to Power and getter for power into IMTE * Added FusionPower to properly display available fusion recipes and OC * spotlessApply (#1743) Co-authored-by: GitHub GTNH Actions <> * Moved compare flag to recipe map * Missed a new constructor * Added user request * Addressed reviews * Typo * Update src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java Co-authored-by: miozune * Removed wrong bracket from git online commit --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: miozune --- src/main/java/gregtech/api/util/GT_Recipe.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/api/util') diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 524976adc9..824d97a382 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -1636,7 +1636,8 @@ public class GT_Recipe implements Comparable { " EU", true, true).setProgressBar(GT_UITextures.PROGRESSBAR_ARROW, ProgressBar.Direction.RIGHT) - .setUsualFluidInputCount(2).setNEISpecialInfoFormatter(FusionSpecialValueFormatter.INSTANCE); + .useComparatorForNEI(true).setUsualFluidInputCount(2) + .setNEISpecialInfoFormatter(FusionSpecialValueFormatter.INSTANCE); public static final GT_Recipe_Map sComplexFusionRecipes = new GT_Recipe_Map_ComplexFusion( new HashSet<>(50), "gt.recipe.complexfusionreactor", @@ -2616,6 +2617,12 @@ public class GT_Recipe implements Comparable { private INEISpecialInfoFormatter neiSpecialInfoFormatter; + /** + * Flag if a comparator should be used to search the recipe in NEI (which is defined in {@link Power}). Else + * only the voltage will be used to find recipes + */ + public boolean useComparatorForNEI; + /** * Initialises a new type of Recipe Handler. * @@ -2700,6 +2707,11 @@ public class GT_Recipe implements Comparable { return this; } + public GT_Recipe_Map useComparatorForNEI(boolean use) { + this.useComparatorForNEI = use; + return this; + } + public GT_Recipe_Map useModularUI(boolean use) { this.useModularUI = use; return this; -- cgit