I want to dectect if a player got empty slot 9 if true give an arrow.
I use the following command on a repeating command block :
/execute unless entity @p[nbt={Inventory:[{id:"minecraft:arrow",Slot:9b,Count:1b,tag:{display:{Name:"
{\"text\":\"arrow\"}"}}}]}] run item replace entity @p container.9 minecraft:arrow{display:{Name:"
{\"text\":\"arrow\"}"}}
The command work, but there is a bug, when i SHIFT+ Right Clic on the arrow to place in active slot form 0-8, the arrow is placed on slot but there is no new arrow placed on the slot 9 (at the 2nd time, the first works). I have to place new item on slot 9 to refresh and an new arrow is placed on slot 9.
But when i Right clic on slot 9 arrow to place it on an other slot, there is a new arrow placed on the 9 slot. So i think this is a bug.
I tried to remove tags but it's the same problem. I'm on a solo creative world.
Edit : command update to 1.17
- duplicates
-
MC-239935 Client-side desyncs can still occur when using the "/item" or "/give" commands repeatedly
- Open