add checks to 0 sized stacks

This commit is contained in:
PrototypeTrousers
2023-07-12 15:00:59 -03:00
parent 3c62ac79c3
commit f4303fc1ec
3 changed files with 15 additions and 10 deletions
@@ -132,23 +132,25 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
continue;
}
if( this.craftOnly() )
{
this.didSomething = this.craftingTracker.handleCrafting( slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(), this.getProxy().getGrid(), cg, this.mySrc ) || this.didSomething;
continue;
}
if (this.craftOnly()) {
this.didSomething = this.craftingTracker.handleCrafting(slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(), this.getProxy().getGrid(), cg, this.mySrc) || this.didSomething;
continue;
}
final long before = this.itemToSend;
if (this.getInstalledUpgrades(Upgrades.FUZZY) > 0) {
for (final IAEItemStack o : ImmutableList.copyOf(inv.getStorageList().findFuzzy(ais, fzMode))) {
this.pushItemIntoTarget(destination, energy, inv, o);
if (this.itemToSend <= 0) {
break;
if (o.getStackSize() > 0) {
this.pushItemIntoTarget(destination, energy, inv, o);
if (this.itemToSend <= 0) {
break;
}
}
}
} else {
if (inv.getStorageList().findPrecise(ais) != null) {
final IAEItemStack o = inv.getStorageList().findPrecise(ais);
if (o != null && o.getStackSize() > 0) {
this.pushItemIntoTarget(destination, energy, inv, ais);
}
}