mojira.dev
MC-91883

Item pickup animation plays in hotbar when 1-9 hotkeying out of limited slots fails/has no apparent effect

I'm not even going to attempt putting this into words, so here's exact steps to reproduce:

1. /gamemode survival
2. /clear
3. /item replace entity @p armor.head with minecraft:carved_pumpkin
4. /item replace entity @p hotbar.0 with minecraft:carved_pumpkin 32
5. Open your inventory, move your mouse over the pumpkin in the helmet slot
6. Hit 1 on your keyboard and observe the item pickup animation playing on the stack of 32 pumpkins in your hotbar (the hotbar that's always rendered, not the one in the inventory GUI)

The hotkey action doesn't actually fail - it does exactly what it's supposed to do: Switch the item stacks in the two slots. However, stack size limitation for the helmet slot dictates that only one item may move there, so only one of the 32 pumpkins is moved there, resulting in 31 pumpkins. Then the single pumpkin that was originally in the head slot is moved into the inventory: a slot for it is looked for because the slot we are hotkeying in is still occupied with 31 pumpkins - the game finds the slot with 31 pumpkins in it and puts the pumpkin there, resulting in an "increased" stack size of 32. Increased stack size triggers item pickup animation.

Linked issues

Attachments

Comments 13

Can confirm for 1.9.

Can confirm for 17w17b

Confirmed for 17w18b

Can confirm for 19w35a.

Confirmed in 1.16.1 and 20w30a.

3 more comments

Can confirm in 21w06a.

Can confirm in 21w07a.

Can confirm in 1.16.5 and 21w08b.

Here are the updated commands for the third and fourth reproductions steps:

/item replace entity @p armor.head with minecraft:carved_pumpkin
/item replace entity @p hotbar.0 with minecraft:carved_pumpkin 32

[Mod] redstonehelper

(Unassigned)

Confirmed

(Unassigned)

Minecraft 15w44b, Minecraft 1.9, Minecraft 16w43a, Minecraft 1.11.2, Minecraft 17w06a, ..., 21w07a, 21w08b, 1.21, 1.21.3, 24w46a

Retrieved