-
Bug
-
Resolution: Duplicate
-
None
-
1.16.1
-
Unconfirmed
-
Creative
-
(Unassigned)
I have a custom advancement that detects if the player has a knowledge book with a specific
recipe (using the inventory_changed criteria)
"criteria": {
"book": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{ "item": "minecraft:knowledge_book", "nbt": "
{Recipes:[\"minecraft:bow\"]}"
}
]
}
}
},
this advancement triggers a function
"rewards":
{ "function": "aaa:got_bow_recipe" },
and inside the function are the following 2 commands:
recipe give @s minecraft:bow
clear @s minecraft:knowledge_book{Recipes:["minecraft:bow"]}
despite running a clear command, the item doesn't leave the players inventory, but also doesn't exist, until the player updates their inventory
Running the command /data get entity @s SelectedItem says that there's no selected item
Running a general /data get entity @s also says that the item isn't in the inventory
- duplicates
-
MC-187281 Function reward removing the item an advancement detected creates a ghost item
- Open