mojira.dev
MC-258705

Selected items in inventory get dropped on dimension change

When a user has an item selected in their inventory during dimension change, the item will be dropped before the user teleports. This should not happen, because it leads to item loss.

This can be solved by:
1. saving the selected item in inventory on dimension change,
2. closing the inventory before the teleport (not recommended, because if the item is selected while the inventory is full, it will be dropped).

I noticed this bug even in earlier versions of Minecraft, but do not know exactly which versions are affected by it.

Video:
https://www.youtube.com/watch?v=ClU8dI2OyPI&feature=youtu.be

Linked issues

Comments 1

The best solution, I think, is just moving the player to the new dimension, open their inventory, and hold the item; keeping the item cursor selected, but not making a special "cursor held" slot only used for this instance.

Non-server steps to reproduce:

  1. Make an end portal

  2. Go high above it

  3. Drop to it, and before falling in,

  4. open your inventory and grab an item

Txslx

(Unassigned)

Confirmed

Platform

Normal

Player

1.19.3, 1.20.4, 1.21.1, 24w34a

Retrieved