From 1338c7d1d6865ef8594eaaa685821014b6fa3fea Mon Sep 17 00:00:00 2001 From: miozune Date: Sat, 22 Jul 2023 23:22:34 +0900 Subject: Fix recipe check broken by fluid registry (#2161) --- src/main/java/gregtech/api/util/GT_Recipe.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech') diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index ba3b6ecb58..37a0dcd3c9 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -3067,7 +3067,7 @@ public class GT_Recipe implements Comparable { /** * HashMap of Recipes based on their Fluids */ - public final Map> mRecipeFluidMap = new /* Concurrent */ HashMap<>(); + public final Map> mRecipeFluidMap = new HashMap<>(); public final HashSet mRecipeFluidNameMap = new HashSet<>(); /** @@ -3859,8 +3859,10 @@ public class GT_Recipe implements Comparable { mRecipeList.add(aRecipe); for (FluidStack aFluid : aRecipe.mFluidInputs) { if (aFluid != null) { - Collection tList = mRecipeFluidMap - .computeIfAbsent(aFluid.getFluid(), k -> new HashSet<>(1)); + Collection tList = mRecipeFluidMap.computeIfAbsent( + aFluid.getFluid() + .getName(), + k -> new HashSet<>(1)); tList.add(aRecipe); mRecipeFluidNameMap.add( aFluid.getFluid() @@ -4053,7 +4055,9 @@ public class GT_Recipe implements Comparable { // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that // Map too. if (mMinimalInputItems == 0 && aFluids != null) for (FluidStack aFluid : aFluids) if (aFluid != null) { - Collection tRecipes = mRecipeFluidMap.get(aFluid.getFluid()); + Collection tRecipes = mRecipeFluidMap.get( + aFluid.getFluid() + .getName()); if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, aDontCheckStackSizes, aFluids, aInputs)) { if (!isSpecialSlotSensitive -- cgit