aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/util
diff options
context:
space:
mode:
authorMaxim <maxim235@gmx.de>2023-02-16 10:14:49 +0100
committerGitHub <noreply@github.com>2023-02-16 10:14:49 +0100
commit3b834d6cebae287cd9bbeddd4f157338da6e1ea5 (patch)
tree84b429a27e1adf0674569160e40e4c916a1d93c3 /src/main/java/gregtech/api/util
parente1ba22d7de9388dffb0ea7d99add79b95f94aa6a (diff)
downloadGT5-Unofficial-3b834d6cebae287cd9bbeddd4f157338da6e1ea5.tar.gz
GT5-Unofficial-3b834d6cebae287cd9bbeddd4f157338da6e1ea5.tar.bz2
GT5-Unofficial-3b834d6cebae287cd9bbeddd4f157338da6e1ea5.zip
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 <miozune@gmail.com> * 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 <miozune@gmail.com>
Diffstat (limited to 'src/main/java/gregtech/api/util')
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java14
1 files changed, 13 insertions, 1 deletions
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<GT_Recipe> {
" 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",
@@ -2617,6 +2618,12 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
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.
*
* @param aRecipeList a List you specify as Recipe List. Usually just an ArrayList with a
@@ -2700,6 +2707,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
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;