also break loop if we do not yet have enough ingredients (#3001)
* also break loop if we do not yet have enough ingredients * clean up if statements
This commit is contained in:
@@ -132,9 +132,11 @@ public class ProcessingNode extends Node {
|
|||||||
if (canInsertFullAmount) {
|
if (canInsertFullAmount) {
|
||||||
canInsertFullAmount = IoUtil.insertIntoInventory(container.getConnectedFluidInventory(), extractedFluids.getStacks(), Action.SIMULATE);
|
canInsertFullAmount = IoUtil.insertIntoInventory(container.getConnectedFluidInventory(), extractedFluids.getStacks(), Action.SIMULATE);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasAllRequirements && !canInsertFullAmount) {
|
if (!canInsertFullAmount) {
|
||||||
if (allRejected) {
|
if (allRejected) {
|
||||||
this.state = ProcessingState.MACHINE_DOES_NOT_ACCEPT;
|
this.state = ProcessingState.MACHINE_DOES_NOT_ACCEPT;
|
||||||
}
|
}
|
||||||
@@ -144,7 +146,6 @@ public class ProcessingNode extends Node {
|
|||||||
allRejected = false;
|
allRejected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasAllRequirements && canInsertFullAmount) {
|
|
||||||
this.state = ProcessingState.READY;
|
this.state = ProcessingState.READY;
|
||||||
|
|
||||||
extractedItems = IoUtil.extractFromInternalItemStorage(requirements.getSingleItemRequirementSet(false), internalStorage, Action.PERFORM);
|
extractedItems = IoUtil.extractFromInternalItemStorage(requirements.getSingleItemRequirementSet(false), internalStorage, Action.PERFORM);
|
||||||
@@ -161,7 +162,6 @@ public class ProcessingNode extends Node {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (originalState != state) {
|
if (originalState != state) {
|
||||||
network.getCraftingManager().onTaskChanged();
|
network.getCraftingManager().onTaskChanged();
|
||||||
|
Reference in New Issue
Block a user