check if step has started before anything else
This commit is contained in:
@@ -370,20 +370,22 @@ public class CraftingTask implements ICraftingTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (ICraftingStep step : leafSteps) {
|
for (ICraftingStep step : leafSteps) {
|
||||||
ICraftingPatternContainer container = step.getPattern().getContainer();
|
if (!step.hasStartedProcessing()) {
|
||||||
Integer timesUsed = usedContainers.get(container);
|
ICraftingPatternContainer container = step.getPattern().getContainer();
|
||||||
|
Integer timesUsed = usedContainers.get(container);
|
||||||
|
|
||||||
if (timesUsed == null) {
|
if (timesUsed == null) {
|
||||||
timesUsed = 0;
|
timesUsed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timesUsed++ <= container.getSpeedUpdateCount()) {
|
if (timesUsed++ <= container.getSpeedUpdateCount()) {
|
||||||
if (!step.getPattern().isProcessing() || !container.isBlocked()) {
|
if (!step.getPattern().isProcessing() || !container.isBlocked()) {
|
||||||
if (!step.hasStartedProcessing() && step.canStartProcessing(oreDictPrepped, networkFluids)) {
|
if (step.canStartProcessing(oreDictPrepped, networkFluids)){
|
||||||
step.setStartedProcessing();
|
step.setStartedProcessing();
|
||||||
step.execute(toInsertItems, toInsertFluids);
|
step.execute(toInsertItems, toInsertFluids);
|
||||||
usedContainers.put(container, timesUsed);
|
usedContainers.put(container, timesUsed);
|
||||||
network.markCraftingMonitorForUpdate();
|
network.markCraftingMonitorForUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user