diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java index 2988df6b7f..50f5f4f685 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/RecipeFinderForParallel.java @@ -8,6 +8,7 @@ import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; import java.util.HashMap; +import java.util.Iterator; /** * Handle the parallel more efficient. @@ -90,14 +91,15 @@ public class RecipeFinderForParallel { /*OreDict Stuff*/ /*Wildcard Stuff*/ - for (int tItem : tCompressedItemRecipe.keySet()) { + for (Iterator<Integer> i = tCompressedItemRecipe.keySet().iterator(); i.hasNext();) { + int tItem = i.next(); if (tItem >> 16 == Short.MAX_VALUE) { for (ItemStack tInputItem : aItemStacks) { int InputID = GT_Utility.stackToInt(tInputItem); if ((InputID & 0xffff) == (tItem & 0xffff)) { if (tInputItem.stackSize >= tCompressedItemRecipe.get(tItem)) { tInputItem.stackSize -= tCompressedItemRecipe.get(tItem); - tCompressedItemRecipe.remove(tItem); + i.remove(); break; } else { @@ -118,7 +120,7 @@ public class RecipeFinderForParallel { input.stackSize -= d; } if (tTargetAmount == 0) { - tCompressedItemRecipe.remove(tItem); + i.remove(); break; } } |