mojira.dev
MC-219018

Ghost items can be created using /item (server doesn't update client inventory correctly)

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

  1. Set up a repeating command block with the following command:

    item replace entity @p hotbar.0 with dirt
  2. Drop the dirt block
    → ❌ The slot will become empty, even though the /item command should refill it

  3. Press Q again while selecting the first slot
    → ❌ You'll drop dirt, even though there's no dirt in that slot

  4. Right-click onto a block while selecting the first slot
    → ❌ A dirt block gets placed

Attachments

  • Quick demonstration:

[media]

Linked issues

Attachments

Comments 5

MMK21

Relates to MC-29318

MMK21

Relates to/caused by MC-222423

violine1101

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.

user-39c63

Happens in 1.18.1

MMK21

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

MMK21

boq

Confirmed

Normal

Commands, Networking

item

21w10a, 21w14a, 1.17 Release Candidate 1

1.17.1 Pre-release 1

Retrieved