Fix AutoCrafter only requiring one ingredient

When reformatting the code one closing bracked was moved to the end where it did not belong. Resulting in not even continuing the right loop ,_,
This commit is contained in:
Christian Koop 2020-04-18 21:34:58 +02:00 committed by Brianna
parent b4256c49cf
commit f37b03bf14

View File

@ -47,6 +47,7 @@ public class ModuleAutoCrafting extends Module {
synchronized (hopperCache) { //TODO: Check if this is required
ItemStack[] items = hopperCache.cachedInventory;
recipeLoop:
for (SimpleRecipe recipe : getRecipes(toCraft).recipes) {
// key=indexForItemsArray, value=amountAfterCrafting
Map<Integer, Integer> slotsToAlter = new HashMap<>();
@ -85,7 +86,8 @@ public class ModuleAutoCrafting extends Module {
}
// Not enough ingredients for this recipe
if (amount != 0) continue;
if (amount != 0) continue recipeLoop;
}
boolean freeSlotAfterRemovingIngredients =
slotsToAlter.values().stream().anyMatch(iAmount -> iAmount <= 0) ||
@ -164,7 +166,6 @@ public class ModuleAutoCrafting extends Module {
}
}
}
}
@Override
public ItemStack getGUIButton(Hopper hopper) {