diff --git a/src/main/java/appeng/fluids/helper/DualityFluidInterface.java b/src/main/java/appeng/fluids/helper/DualityFluidInterface.java index 4e76ddf1f..2599e8d20 100644 --- a/src/main/java/appeng/fluids/helper/DualityFluidInterface.java +++ b/src/main/java/appeng/fluids/helper/DualityFluidInterface.java @@ -386,7 +386,7 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable { changed = true; } - else + else if( this.gridProxy.getStorage().getInventory( AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ) ).getStorageList().findPrecise( work ) != null ) { final IAEFluidStack acquired = Platform.poweredExtraction( src, dest, work, this.interfaceRequestSource ); if( acquired != null ) diff --git a/src/main/java/appeng/helpers/DualityInterface.java b/src/main/java/appeng/helpers/DualityInterface.java index a0a692a00..83b37d240 100644 --- a/src/main/java/appeng/helpers/DualityInterface.java +++ b/src/main/java/appeng/helpers/DualityInterface.java @@ -856,19 +856,26 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn throw new GridAccessException(); } - final IAEItemStack acquired = Platform.poweredExtraction( src, this.destination, itemStack, this.interfaceRequestSource ); - if( acquired != null ) + IAEItemStack storedStack = this.gridProxy.getStorage().getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) ).getStorageList().findPrecise( itemStack ); + if( storedStack != null ) { - changed = true; - final ItemStack issue = adaptor.addItems( acquired.createItemStack() ); - if( !issue.isEmpty() ) + if( storedStack.getStackSize() > 0 ) { - throw new IllegalStateException( "bad attempt at managing inventory. ( addItems )" ); + final IAEItemStack acquired = Platform.poweredExtraction( src, this.destination, itemStack, this.interfaceRequestSource ); + if( acquired != null ) + { + changed = true; + final ItemStack issue = adaptor.addItems( acquired.createItemStack() ); + if( !issue.isEmpty() ) + { + throw new IllegalStateException( "bad attempt at managing inventory. ( addItems )" ); + } + } + } + else if( storedStack.isCraftable() ) + { + changed = this.handleCrafting( x, adaptor, itemStack ) || changed; } - } - else - { - changed = this.handleCrafting( x, adaptor, itemStack ) || changed; } } else if( itemStack.getStackSize() < 0 )