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
Linked issues
duplicates 1
Attachments
Comments 3

Duplicate of MC-239935.

Thank you for your report!
We're resolving and linking this ticket forward as a duplicate of MC-239935, as that ticket contains more detailed information and/or has already been triaged by Mojang.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.
Is this still an issue in 1.19.4?