Using /item
to replace the item in a player's hotbar slot frequently creates ghost items. Right-clicking with a ghost item will still place a block, but it does not show up in the hotbar.
This did not happen in 1.16.5.
Steps to reproduce
Set up a repeating command block with the following command:
item replace entity @p hotbar.0 with dirt
Drop the dirt block
→ ❌ The slot will become empty, even though the/item
command should refill itPress Q again while selecting the first slot
→ ❌ You'll drop dirt, even though there's no dirt in that slotRight-click onto a block while selecting the first slot
→ ❌ A dirt block gets placed
Attachments
Quick demonstration:
Linked issues
is duplicated by 10
relates to 1
Attachments
Comments 5


Relates to/caused by MC-222423
Can confirm. This was not an issue in 1.16.5.
I haven't verified this, but I think the reason for this happening is that the server believes that it doesn't need to send an "update slot" packet to the client because from the server's POV, the slot didn't change. However, the client can't know that the /replaceitem
command is run, causing no slot update to take place. Hence the desync.
Happens in 1.18.1

@Nan I think that the issue you're describing is MC-239935
Relates to MC-29318