add checks to 0 sized stacks
This commit is contained in:
@@ -200,6 +200,9 @@ public class PacketJEIRecipe extends AppEngPacket {
|
||||
if (request.getItem().isDamageable() || Platform.isGTDamageableItem(request.getItem())) {
|
||||
Collection<IAEItemStack> outList = inv.getInventory(AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class)).getStorageList().findFuzzy(request, FuzzyMode.IGNORE_ALL);
|
||||
for (IAEItemStack is : outList) {
|
||||
if (is.getStackSize() == 0) {
|
||||
continue;
|
||||
}
|
||||
if (Platform.isGTDamageableItem(request.getItem())) {
|
||||
if (!(is.getDefinition().getMetadata() == request.getDefinition().getMetadata())) {
|
||||
continue;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class IMEAdaptor extends InventoryAdaptor {
|
||||
IAEItemStack out = null;
|
||||
|
||||
for (final IAEItemStack req : ImmutableList.copyOf(this.getList().findFuzzy(reqFilter, fuzzyMode))) {
|
||||
if (req != null) {
|
||||
if (req != null && req.getStackSize() > 0) {
|
||||
req.setStackSize(amount);
|
||||
out = this.target.extractItems(req, type, this.src);
|
||||
if (out != null) {
|
||||
|
||||
Reference in New Issue
Block a user