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:
Darkere
2022-01-22 16:15:19 +01:00
committed by raoulvdberge
parent aa1777d5dc
commit e53ad61d59
2 changed files with 2 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Fixed multiple bugs related to transferring recipes into the Crafting Grid.
- Processing patterns now use the order of items/fluids specified in the pattern
by [@necauqua](https://github.com/necauqua) and [@Darkere](https://github.com/Darkere).
- Fixed autocrafting task getting stuck if two tasks fulfilled each others requirements.
## [v1.10.0-beta.4] - 2021-12-28

View File

@@ -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