mojira.dev
MC-254567

Inserting item that is repeatedly replaced by command block into 'Destroy Item' slot prevents it from appearing again

If you create repeating command block that keeps replacing slot in player's inventory with item, then deleting this item through 'Destroy Item' slot sometimes makes it not appear again (Even though in player's data you can see that item in that slot).

This fixes on its own, when you rejoin world, die, or try inserting other item in that slot (in the last case, item you tried inserting gets permanently destroyed)

You can see all this in video I attached (sorry for low quality, but the size limit here is only 10 Mb...)

In case this wasn't obvious, at the first time sword re-appeared I middle-clicked (picking up grass block).

Command to reproduce bug (in repeating command block):
execute as @p run item replace entity @s hotbar.0 with minecraft:diamond_sword 1

Attachments

Comments 8

currently, the bug tracker doesn't accept bug reproduced with modified clients (i see optifines features in your video)

Oh, right, I used it, but I'm pretty sure that I can reproduce it without OptiFine as well.

EDIT: I realised that I even tested it without, because originally I found bug in 1.18.1 with OptiFine, but also checked if this works in 1.19 without any mods before posting.

Please post a screenshot/video of the issue occurring without mods, if possible.

Hm, okay, if that's necessary, I'll just record this in 1.19.

OK, there it is. Should I remove the first video?
Nvm, I already deleted it, but still have it on my pc just in case...

hey, sorry for the late response but i can comfirm this in 1.19

While it has been mentioned previously that this issue is related to MC-239935, I would suggest it to be resolved as a duplicate instead because it describes the same behavior. The server still thinks the player has the item, while the client does not.

Ogrodnik10

(Unassigned)

Confirmed

Platform

Normal

Networking

command, inventory

1.19, 1.19.2

Retrieved