119120121122123124125126127128129
return stack; ItemStack remainder = InvTools.moveItemStack(stack, inventory); stack.stackSize = remainder == null ? 0 : remainder.stackSize; inventory.save(); return null; } private void switchMode(ItemStack itemstack) { BackpackMode mode = getMode(itemstack);
161162163164165166167168169170171
if (mode == BackpackMode.RECEIVE) tryChestReceive(player, backpackInventory, inventory); else tryChestTransfer(backpackInventory, inventory); backpackInventory.save(); return true; } return false;