aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/recipe/RecipeMaps.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/recipe/RecipeMaps.java')
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMaps.java19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/main/java/gregtech/api/recipe/RecipeMaps.java b/src/main/java/gregtech/api/recipe/RecipeMaps.java
index 2c05eb0e08..2ced6fab57 100644
--- a/src/main/java/gregtech/api/recipe/RecipeMaps.java
+++ b/src/main/java/gregtech/api/recipe/RecipeMaps.java
@@ -290,21 +290,10 @@ public final class RecipeMaps {
(index, isFluid, isOutput,
isSpecial) -> !isFluid && !isOutput && index != 0 ? GT_UITextures.OVERLAY_SLOT_LENS : null)
// Add a simple ordering so lower tier purified water is displayed first, otherwise it gets really confusing
- .neiRecipeComparator((a, b) -> {
- // Find lens, if no lens was present we can use the default comparator
- if (a.mInputs.length > 1 && b.mInputs.length > 1) {
- ItemStack firstLens = a.mInputs[1];
- ItemStack secondLens = b.mInputs[1];
- // Find purified water/any fluid, if none was present simply use the lens to compare
- if (ItemStack.areItemStacksEqual(firstLens, secondLens) && a.mFluidInputs.length > 0
- && b.mFluidInputs.length > 0) {
- return Comparator
- .<GT_Recipe, Integer>comparing(r -> PurifiedWaterHelpers.getWaterTier(r.mFluidInputs[0]))
- .compare(a, b);
- }
- }
- return a.compareTo(b);
- })
+ .neiRecipeComparator(
+ (a, b) -> Comparator.comparing(PurifiedWaterHelpers::getWaterTierFromRecipe)
+ .thenComparing(GT_Recipe::compareTo)
+ .compare(a, b))
.build();
public static final RecipeMap<RecipeMapBackend> mixerRecipes = RecipeMapBuilder.of("gt.recipe.mixer")
.maxIO(9, 4, 1, 1)