im trying to run a command that will check for a specific item in the hotbar
i thought this would work
/execute as @a [nbt={Inventory:[{Slot:[0b,1b,2b,3b,4b,5b,6b,7b,8b],id:"minecraft:red_glazed_terracotta",tag:{display:{Name:'{"text":"Fire Crystal","color":"dark_red","bold":true}'},Enchantments:[{id:"minecraft:unbreaking",lvl:1s}]}}]}] run effect give @s minecraft:strength 30 0 true
because its listing the slots and testing it but it wouldnt work so i tried
/execute as @a[nbt={Inventory:[{Slot:0b,id:"minecraft:red_glazed_terracotta",tag:{display:{Name:'{"text":"Fire Crystal","color":"dark_red","bold":true}'},Enchantments:[{id:"minecraft:unbreaking",lvl:1s}]}}]},nbt=!{Inventory:[{Slot:[9b,35b]}]}] run effect give @s minecraft:strength 30 0 true
because it wouldnt include slots 9-35 but that wouldnt work either so im stuck with this one that only checks the last slot
execute as @a[nbt={Inventory:[{Slot:8b, id:"minecraft:red_glazed_terracotta", tag:{display:{Name:'{"text":"Fire Crystal","color":"dark_red","bold":true}'},Enchantments:[{id:"minecraft:unbreaking",lvl:1s}]}}]}] run effect give @s minecraft:strength 30 0 true
ps. it kept saying "Expected a byte tag but got a list tag (rule: “nbtTypeCheck”)" in visual studio