The bug
Items are not placed in reversed order (beginning with slot 9 of the hotbar and ending at the top left slot of the inventory) when they are shift clicked in some slots, instead they are placed starting at the top left slot.
Affected slots
Last updated for 1.11.2
Furnace:
Fuel
Item to smelt
Villager GUI:
Wanted items (both slots)
Player inventory:
Armor slots
Offhand
Crafting grid slots
Crafting table:
Crafting grid slots
How to reproduce
Place a furnace
Put an item into the item to smelt slot
Shift click the item
→ You will notice that the item moved to the top left slot of your inventory
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The affected methods of the containers overriding the method net.minecraft.inventory.Container.transferStackInSlot(EntityPlayer, int)
do not call the method net.minecraft.inventory.Container.mergeItemStack(ItemStack, int, int, boolean)
with true
as value for the reverseDirection
parameter.
as of 1.20.2:
Armour (player) will go to top left
Inventory (player) will either go to top left or first hotbar slot
offhand will go to top left
crafting (player) will go to last hotbar slot
crafting (table) will go to last hotbar slot
Items from chests and barrels will go to last hotbar slot
Items from droppers and dispensers will go to bottom right
all other blocks and villager trades (Loom, smithing table etc) will have the input go to the top left and output go to the top right