diff options
Diffstat (limited to 'src/main/java/gregtech/api/util')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Recipe.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 315d70a522..d970175560 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -23,6 +23,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; import java.util.*; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; import static gregtech.api.enums.GT_Values.*; @@ -388,7 +389,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> { if (mInputs.length > 0 && aInputs == null) return false; - HashSet<Integer> isUsed = new HashSet<>(); + ConcurrentHashMap<Integer, Boolean> isUsed = new ConcurrentHashMap<>(); for (ItemStack tStack : mInputs) { ItemStack unified_tStack = GT_OreDictUnificator.get_nocopy(true, tStack); @@ -398,8 +399,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> { int it = 0; for (ItemStack aStack : aInputs) { it ++; - if (GT_OreDictUnificator.isInputStackEqual(aStack, unified_tStack) && !isUsed.contains(it)) { - isUsed.add(it); + if (GT_OreDictUnificator.isInputStackEqual(aStack, unified_tStack) && !isUsed.containsKey(it)) { + isUsed.put(it, true); if (GTppRecipeHelper) {//remove once the fix is out if (GT_Utility.areStacksEqual(aStack, Ic2Items.FluidCell.copy(), true) || GT_Utility.areStacksEqual(aStack, ItemList.Tool_DataStick.get(1L), true) || GT_Utility.areStacksEqual(aStack, ItemList.Tool_DataOrb.get(1L), true)) { if (!GT_Utility.areStacksEqual(aStack, tStack, false)) |