-
Bug
-
Resolution: Duplicate
-
None
-
1.18.2, 1.19 Release Candidate 2
-
None
-
Unconfirmed
-
(Unassigned)
If a player throws out an item using Q, until the hotbar slot changes again, a player_hurt_entity advancement trigger will detect the NBT data the thrown item possessed as though the player still has that item in their hand. This "ghost data" is persistent in that specific hotbar slot until the player relogs or an item is put into that slot.
To reproduce, load the attached datapack, and run this command:
/give @s stone{Test:1}
Hit any entity with the resulting item, and you'll see the advancement function say "Trigger!" and "Found!" in chat.
Press Q to throw away the item, then hit an entity with that same now-empty hotbar slot selected. You'll still get the advancement saying "Trigger!" in chat. (It will not say "Found", as that's run by an execute if data entity @s command that sees you don't have an item with the test data selected.)
- duplicates
-
MC-229882 Predicate still passes for certain stacks even after dropping them
- Resolved