code: private ItemStack transferSlotOutOfInventory(MalisisInventory inventory, MalisisSlot slot)
  	{
  		ItemStack itemStack = slot.getItemStack();
  		if (itemStack.isEmpty() || !inventory.state.is(PLAYER_EXTRACT) || !slot.state.is(PLAYER_INSERT))
  			return itemStack;
  
  		//comes from PlayerInventory
  		if (inventory == getPlayerInventory())
  		{
  			for (MalisisInventory inv : getInventories())
  			{
  				if (inv.state.is(PLAYER_INSERT))
  				{
  					itemStack = inv.transferInto(itemStack);
  					//placed the full itemStack into the target inventory
  					if (itemStack.isEmpty())
  						break;
  				}
  			}
  		}
  		//transfer into PlayerInventory
  		else if (getPlayerInventory().state.is(PLAYER_INSERT))
  			itemStack = getPlayerInventory().transferInto(itemStack);
  		return itemStack;
  	}
docs: Transfers slot out of the its inventory. Destination is player inventory or other inventories depending on slot position.<br>
  
  @param inventory the inventory
  @param slot the slot
  @return the itemStack left that could be transferred (or EMPTY)