stackInSlot = ((SlotCraft) slot).getCraftedStack();
playerStack = inventoryPlayer.getItemStack();
if( playerStack == null ) { // Full extraction from slot.
inventoryPlayer.setItemStack( stackInSlot );
slot.onPickupFromSlot( player, inventoryPlayer.getItemStack() );
} else {
int sum = stackInSlot.stackSize + playerStack.stackSize;
// Merge into player's hand.
if( Utils.equalsStacks( stackInSlot, playerStack ) && sum <= stackInSlot.getMaxStackSize() ) {