#Give an item with a tag, and detect an item with a tag
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
what version?
1.21
give item with tag => /give @s stick[minecraft:custom_data={IAmACustomTag:1b}]
detecting it => /execute if items entity @s weapon minecraft:stick[minecraft:custom_data~{IAmACustomTag:1b}]
if you want to detect multiple different items with that tag, use * instead of the item id
if you didn't know, weapon checks for both hands
so minecraft:*[minecraft:custom_data~{IAmACustomTag:1b}] ?
without the minecraft: at the start
weapon.mainhand
ok thank you