#target all players that have an item in their offhand with custom_data

1 messages · Page 1 of 1 (latest)

languid sapphire
#

the item would be this
minecraft:amethyst_shard[minecraft:custom_data={ice_gem:1b}]

but how do I use it in a statement like this
execute at @s run effect give @e[nbt=!{Inventory:[{Slot:-106b,id:"minecraft:amethyst_shard"}]}] minecraft:slowness 1 3 true

jaunty kestrelBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1733692766:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

earnest schoonerBOT
#
execute at @s run effect give @e[nbt=!{Inventory:[{Slot:-106b,id:"minecraft:amethyst_shard",components:{"minecraft:custom_data":{ice_gem:1b}}}]}] minecraft:slowness 1 3 true
sudden drum
#

Although you should probably use execute if items

languid sapphire
#

okay yea I think that fixed it

grim junco
#

Even better: execute as @e unless items entity @s weapon.offhand amythest_shard[custom_data~{ice_gem:1b}]