Fixed autocrafting task getting stuck if two tasks fulfilled each others requirements. Fixes #3217
A second task was able to finish a first task without the first tasks quantity reaching 0, in which case the state of the first task went from PROCESSED to READY and would never finish. Cherry picked from fdc1991c32cfc6ba4ef735641dbe8f593f745486
This commit is contained in:
@@ -73,7 +73,7 @@ public class ProcessingNode extends Node {
|
||||
@Override
|
||||
public void update(INetwork network, int ticks, NodeList nodes, IStorageDisk<ItemStack> internalStorage, IStorageDisk<FluidStack> internalFluidStorage, NodeListener listener) {
|
||||
if (getQuantity() <= 0) {
|
||||
if (state == ProcessingState.PROCESSED) {
|
||||
if (totalQuantity == quantityFinished) {
|
||||
listener.onAllDone(this);
|
||||
}
|
||||
return;
|
||||
@@ -243,10 +243,6 @@ public class ProcessingNode extends Node {
|
||||
}
|
||||
|
||||
this.quantityFinished = tempQuantityFinished;
|
||||
|
||||
if (this.quantityFinished == this.totalQuantity) {
|
||||
this.state = ProcessingState.PROCESSED;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user