Fixed a potential crash when picking up items.
This commit is contained in:
parent
1b207a17e9
commit
aa6d05af2e
1 changed files with 8 additions and 3 deletions
|
@ -809,9 +809,14 @@ public abstract class AEBaseContainer extends Container
|
|||
long maxSize = ais.getItemStack().getMaxStackSize();
|
||||
ais.setStackSize( maxSize );
|
||||
ais = cellInv.extractItems( ais, Actionable.SIMULATE, mySrc );
|
||||
|
||||
if ( ais != null )
|
||||
{
|
||||
long stackSize = Math.min( maxSize, ais.getStackSize() );
|
||||
ais.setStackSize( (stackSize + 1) >> 1 );
|
||||
ais = Platform.poweredExtraction( powerSrc, cellInv, ais, mySrc );
|
||||
}
|
||||
|
||||
if ( ais != null )
|
||||
player.inventory.setItemStack( ais.getItemStack() );
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue