mojira.dev
MC-93164

Using a hotkey on items in inventory slots you can't insert items into (e.g. Crafting table output) only works if slot is empty

Using the 1-9 hotkeys to move an item to the 1-9 slots used to move the item there in any inventory (moving items that were already there to a different slot if needed), only not working if the player's inventory was full. However, as of the 15w44b snapshot, this no longer works; it will now only put the item in the slot if it is free.

Steps to reproduce:
1. Sort your inventory so you have any item in your first slot.
2. Enter an inventory, such as an Anvil, Crafting Table or Furnace.
3. Produce an item in their output slots (e.g. by crafting, smelting or combining).
4. Hover over the item and press the 1 key.

Video: https://imgur.com/GN2itSo

Expected Result:
The number 1 slot is replaced with the item from the inventory & the item originally in the 1 slot will enter the second slot.

Acquired Result:
The item stays in the inventory & the item currently in the first slot stays there.

Ways to Fix:
Revert to the behaviour of <1.8.8 & <15w44b, pretty sure Grum has been fixing a few bugs associated with hotkeys, stacking behaviour and inventories recently - so he must have made a change somewhere that produced this bug.


Other Steps to reproduce:

  • Place valid recipe contents in crafting grid

  • in 1.8.9

    • Pressing hotbarkey of slot with item same as crafted item will add the item to the hotbar

    • Pressing hotbarkey of slot with other item as crafted item will swap empty hotbar slot with occupied and place crafted item to the hotbar

    • Pressing hotbarkey of empty slot places item there

  • in 1.9-pre4

    • Pressing hotbarkey of slot with item same as crafted item will add the item to the hotbar (No longer works)

    • Pressing hotbarkey of slot with other item as crafted item will swap empty hotbar slot with occupied and place crafted item to the hotbar (No longer works)

    • Pressing hotbarkey of empty slot places item there (Still working)

Linked issues

Attachments

Comments 30

Works as intended. 1-9 keys exchange items, they do not move items. If two slots can't be exchanged (you can't put items into the crafting table output slot, for example), nothing happens. The fact that something happened before was a bug.

Before, it would put the item from the crafting grid in the slot and move the other item into the inventory. If the inventory was full it wouldn't work. I know a lot of people use this function and it doesn't really make sense for it to not work.

Right, reopening. The partial fix for MC-7222 (which is probably the cause of this issue) added some situations where you can 1-9 hotkey without the slots exchanging completely.

Ah thanks, hope both bugs get fixed.

You can update MC-7222 with this info and close my report if you want. Makes it easier to fix.

20 more comments

Can Confirm in 1.19.3 Release Candidate 3

Matthew Curran

muzikbike

(Unassigned)

Confirmed

Platform

Normal

Inventory

crafting, crafting_table, hotbar, inventory, inventory-management, item, mixed-bugs-hallway, numberkey, slot, swap

Minecraft 15w46a, Minecraft 15w47a, Minecraft 15w47b, Minecraft 15w47c, Minecraft 15w49a, ..., 1.19.2, 1.19.3 Release Candidate 3, 1.19.3, 1.21.3, 24w46a

Retrieved