only try to extract if its already in the cache
This commit is contained in:
@@ -386,7 +386,7 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
|||||||
{
|
{
|
||||||
changed = true;
|
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 );
|
final IAEFluidStack acquired = Platform.poweredExtraction( src, dest, work, this.interfaceRequestSource );
|
||||||
if( acquired != null )
|
if( acquired != null )
|
||||||
|
|||||||
@@ -856,6 +856,11 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
throw new GridAccessException();
|
throw new GridAccessException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IAEItemStack storedStack = this.gridProxy.getStorage().getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) ).getStorageList().findPrecise( itemStack );
|
||||||
|
if( storedStack != null )
|
||||||
|
{
|
||||||
|
if( storedStack.getStackSize() > 0 )
|
||||||
|
{
|
||||||
final IAEItemStack acquired = Platform.poweredExtraction( src, this.destination, itemStack, this.interfaceRequestSource );
|
final IAEItemStack acquired = Platform.poweredExtraction( src, this.destination, itemStack, this.interfaceRequestSource );
|
||||||
if( acquired != null )
|
if( acquired != null )
|
||||||
{
|
{
|
||||||
@@ -866,11 +871,13 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
throw new IllegalStateException( "bad attempt at managing inventory. ( addItems )" );
|
throw new IllegalStateException( "bad attempt at managing inventory. ( addItems )" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
else if( storedStack.isCraftable() )
|
||||||
{
|
{
|
||||||
changed = this.handleCrafting( x, adaptor, itemStack ) || changed;
|
changed = this.handleCrafting( x, adaptor, itemStack ) || changed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if( itemStack.getStackSize() < 0 )
|
else if( itemStack.getStackSize() < 0 )
|
||||||
{
|
{
|
||||||
IAEItemStack toStore = itemStack.copy();
|
IAEItemStack toStore = itemStack.copy();
|
||||||
|
|||||||
Reference in New Issue
Block a user