// From main inventory/quickbar to the chest
if (from instanceof PlayerMainInventory || from instanceof PlayerQuickbar) {
for (InventoryConverter conv : this.getInventoryConverters()) {
Inventory inv = conv.getInventory();
if (inv instanceof ChestInventory) {
Grid grid = inv.grid(ChestInventory.LENGTH);
for (int row = grid.getHeight() - 1; row >= 0; row--) {
int startSlot = ChestInventory.LENGTH * row;
int endSlot = startSlot + ChestInventory.LENGTH - 1;
inv.add(startSlot, endSlot, stack);
from.set(slot, stack);