Fixed a potential crash when picking up items.
This commit is contained in:
@@ -809,9 +809,14 @@ public abstract class AEBaseContainer extends Container
|
|||||||
long maxSize = ais.getItemStack().getMaxStackSize();
|
long maxSize = ais.getItemStack().getMaxStackSize();
|
||||||
ais.setStackSize( maxSize );
|
ais.setStackSize( maxSize );
|
||||||
ais = cellInv.extractItems( ais, Actionable.SIMULATE, mySrc );
|
ais = cellInv.extractItems( ais, Actionable.SIMULATE, mySrc );
|
||||||
long stackSize = Math.min( maxSize, ais.getStackSize() );
|
|
||||||
ais.setStackSize( (stackSize + 1) >> 1 );
|
if ( ais != null )
|
||||||
ais = Platform.poweredExtraction( powerSrc, cellInv, ais, mySrc );
|
{
|
||||||
|
long stackSize = Math.min( maxSize, ais.getStackSize() );
|
||||||
|
ais.setStackSize( (stackSize + 1) >> 1 );
|
||||||
|
ais = Platform.poweredExtraction( powerSrc, cellInv, ais, mySrc );
|
||||||
|
}
|
||||||
|
|
||||||
if ( ais != null )
|
if ( ais != null )
|
||||||
player.inventory.setItemStack( ais.getItemStack() );
|
player.inventory.setItemStack( ais.getItemStack() );
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user