Skip to content

Commit

Permalink
Fix IO port early returning before processing queue (#646)
Browse files Browse the repository at this point in the history
Co-authored-by: Sampsa <[email protected]>
Co-authored-by: Maya <[email protected]>
  • Loading branch information
3 people authored Dec 30, 2024
1 parent 9b25fe5 commit a909882
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions src/main/java/appeng/tile/storage/TileIOPort.java
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,30 @@ public TickRateModulation tickingRequest(final IGridNode node, final int ticksSi

// If work is done, check if the cell should be moved and try to move it to the output
// If the cell failed to move, queue moving the cell before doing any further work on it
if (ItemsToMove > 0 && this.shouldMove(itemInv, fluidInv, ItemsToMove != maxMoved)) {
moveQueue[x] = !this.moveSlot(x) ? 1 : 0;
if (moveQueue[x] == 1) {
return TickRateModulation.IDLE;
if (ItemsToMove > 0) {
if (this.shouldMove(itemInv, fluidInv, ItemsToMove != maxMoved)) {
moveQueue[x] = !this.moveSlot(x) ? 1 : 0;
if (moveQueue[x] == 1) {
return TickRateModulation.IDLE;
}
} else {
// Try moving something else instead
if ((FullnessMode) this.manager.getSetting(Settings.FULLNESS_MODE)
!= FullnessMode.HALF) {
for (int y = x + 1; y < 6; y++) {
if (moveQueue[y] == 1) {
final ItemStack is2 = this.cells.getStackInSlot(x);
if (is != null) {
moveQueue[y] = !this.moveSlot(y) ? 1 : 0;
if (moveQueue[y] == 1) {
return TickRateModulation.IDLE;
} else {
break;
}
}
}
}
}
}
}

Expand Down

0 comments on commit a909882

Please sign in to comment.