Fix ME Export Buses oversending items

As a side effect, fixes them not sending anything at all with too many Acceleration Cards
Closes #441
This commit is contained in:
NotMyWing
2024-05-24 20:25:10 +11:00
parent 9f19e05592
commit 08a7aff600
@@ -151,7 +151,7 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
} else { } else {
final IAEItemStack o = inv.getStorageList().findPrecise(ais); final IAEItemStack o = inv.getStorageList().findPrecise(ais);
if (o != null && o.getStackSize() > 0) { if (o != null && o.getStackSize() > 0) {
this.pushItemIntoTarget(destination, energy, inv, ais); this.pushItemIntoTarget(destination, energy, inv, o);
} }
} }
@@ -281,7 +281,7 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
} }
} }
final long canFit = remaining.isEmpty() ? this.itemToSend : this.itemToSend - remaining.getCount(); final long canFit = Math.min(this.itemToSend, org.getStackSize() - remaining.getCount());
if (canFit > 0) { if (canFit > 0) {
IAEItemStack ais = org.copy(); IAEItemStack ais = org.copy();