aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorkstvr32 <109012629+kstvr32@users.noreply.github.com>2024-11-29 13:48:06 -0500
committerGitHub <noreply@github.com>2024-11-29 12:48:06 -0600
commit5b82bb3f7608e1c91b9721c33723761efa7d5eb3 (patch)
tree403505362323e6b9effc95a4b1c4ce56e103d5c5 /src/main/java
parent1002b9646309c445de785f997090193bfd9f1b45 (diff)
downloadGT5-Unofficial-5b82bb3f7608e1c91b9721c33723761efa7d5eb3.tar.gz
GT5-Unofficial-5b82bb3f7608e1c91b9721c33723761efa7d5eb3.tar.bz2
GT5-Unofficial-5b82bb3f7608e1c91b9721c33723761efa7d5eb3.zip
Fix Laser Engraver NEI recipes (#3572)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMaps.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/recipe/RecipeMaps.java b/src/main/java/gregtech/api/recipe/RecipeMaps.java
index a24017b1e7..262b2921dd 100644
--- a/src/main/java/gregtech/api/recipe/RecipeMaps.java
+++ b/src/main/java/gregtech/api/recipe/RecipeMaps.java
@@ -319,9 +319,13 @@ public final class RecipeMaps {
(index, isFluid, isOutput,
isSpecial) -> !isFluid && !isOutput && index != 0 ? GTUITextures.OVERLAY_SLOT_LENS : null)
// Add a simple ordering so lower tier purified water is displayed first, otherwise it gets really confusing
+ // NEI Catalyst search requires recipes to be sorted by voltage tier. Therefore, we first sort by voltage tier,
+ // then by water tier, then the default comparator.
.neiRecipeComparator(
- (a, b) -> Comparator.comparing(PurifiedWaterHelpers::getWaterTierFromRecipe)
- .thenComparing(GTRecipe::compareTo)
+ (a, b) -> Comparator.<GTRecipe, Integer>comparing(recipe -> recipe.mEUt)
+ .thenComparing(
+ Comparator.comparing(PurifiedWaterHelpers::getWaterTierFromRecipe)
+ .thenComparing(GTRecipe::compareTo))
.compare(a, b))
.build();
public static final RecipeMap<RecipeMapBackend> mixerRecipes = RecipeMapBuilder.of("gt.recipe.mixer")