for (IAEStack s : myList)
{
long totalStackSize = s.getStackSize();
if ( totalStackSize > 0 )
{
IAEStack stack = dest.injectItems( s, Actionable.SIMULATE, mySrc );
long possible = 0;
if ( stack == null )
possible = totalStackSize;
else
possible = totalStackSize - stack.getStackSize();
if ( possible > 0 )
{
possible = Math.min( possible, itemsToMove );
s.setStackSize( possible );
IAEStack extracted = src.extractItems( s, Actionable.MODULATE, mySrc );
if ( extracted != null )
{
possible = extracted.getStackSize();
IAEStack failed = Platform.poweredInsert( energy, dest, extracted, mySrc );
if ( failed != null )
{
possible -= failed.getStackSize();
src.injectItems( failed, Actionable.MODULATE, mySrc );
}
if ( possible > 0 )
{