Skip to content

Commit

Permalink
Make IO ports not transfer the cell if in 'Move to output if work don…
Browse files Browse the repository at this point in the history
…e' and no work was done
  • Loading branch information
Sampsa committed Dec 21, 2024
1 parent aa73da4 commit 4c388dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/appeng/tile/storage/TileIOPort.java
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ public TickRateModulation tickingRequest(final IGridNode node, final int ticksSi
case 3 -> ItemsToMove *= 1024;
}

long maxMoved = ItemsToMove;

try {
final IMEInventory<IAEItemStack> itemNet = this.getProxy().getStorage().getItemInventory();
final IMEInventory<IAEFluidStack> fluidNet = this.getProxy().getStorage().getFluidInventory();
Expand Down Expand Up @@ -338,7 +340,12 @@ public TickRateModulation tickingRequest(final IGridNode node, final int ticksSi
}
}

if (ItemsToMove > 0 && this.shouldMove(itemInv, fluidInv) && !this.moveSlot(x)) {
final FullnessMode fm = (FullnessMode) this.manager.getSetting(Settings.FULLNESS_MODE);

// We didn't do any work
if (fm == FullnessMode.HALF && ItemsToMove == maxMoved) {

} else if (ItemsToMove > 0 && this.shouldMove(itemInv, fluidInv) && !this.moveSlot(x)) {
return TickRateModulation.IDLE;
}

Expand Down

0 comments on commit 4c388dd

Please sign in to comment.