mirror of
https://github.com/songoda/EpicHoppers.git
synced 2024-11-26 04:05:48 +01:00
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:
parent
b4256c49cf
commit
f37b03bf14
@ -47,6 +47,7 @@ public class ModuleAutoCrafting extends Module {
|
|||||||
synchronized (hopperCache) { //TODO: Check if this is required
|
synchronized (hopperCache) { //TODO: Check if this is required
|
||||||
ItemStack[] items = hopperCache.cachedInventory;
|
ItemStack[] items = hopperCache.cachedInventory;
|
||||||
|
|
||||||
|
recipeLoop:
|
||||||
for (SimpleRecipe recipe : getRecipes(toCraft).recipes) {
|
for (SimpleRecipe recipe : getRecipes(toCraft).recipes) {
|
||||||
// key=indexForItemsArray, value=amountAfterCrafting
|
// key=indexForItemsArray, value=amountAfterCrafting
|
||||||
Map<Integer, Integer> slotsToAlter = new HashMap<>();
|
Map<Integer, Integer> slotsToAlter = new HashMap<>();
|
||||||
@ -85,7 +86,8 @@ public class ModuleAutoCrafting extends Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Not enough ingredients for this recipe
|
// Not enough ingredients for this recipe
|
||||||
if (amount != 0) continue;
|
if (amount != 0) continue recipeLoop;
|
||||||
|
}
|
||||||
|
|
||||||
boolean freeSlotAfterRemovingIngredients =
|
boolean freeSlotAfterRemovingIngredients =
|
||||||
slotsToAlter.values().stream().anyMatch(iAmount -> iAmount <= 0) ||
|
slotsToAlter.values().stream().anyMatch(iAmount -> iAmount <= 0) ||
|
||||||
@ -164,7 +166,6 @@ public class ModuleAutoCrafting extends Module {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getGUIButton(Hopper hopper) {
|
public ItemStack getGUIButton(Hopper hopper) {
|
||||||
|
Loading…
Reference in New Issue
Block a user