reset crafting step on error, #556

This commit is contained in:
way2muchnoise
2016-10-31 16:33:13 +01:00
parent 13d7f9918d
commit afd76b237e

View File

@@ -62,7 +62,15 @@ public class CraftingStepCraft extends CraftingStep {
network.extractItem(RSUtils.EMPTY_BUCKET, 1, compare); network.extractItem(RSUtils.EMPTY_BUCKET, 1, compare);
actualInputs.add(insertStack.copy()); actualInputs.add(insertStack.copy());
} else { } else {
actualInputs.add(network.extractItem(insertStack, insertStack.stackSize, compare)); ItemStack input = network.extractItem(insertStack, insertStack.stackSize, compare);
if (input != null) {
actualInputs.add(input);
} else {
// Abort task re-insert taken stacks and reset state
toInsertItems.addAll(actualInputs.getStacks());
startedProcessing = false;
return;
}
} }
} }