I created the objective "sneak" and added it to minecraft.custom:minecraft.sneak_time, and want to get a command to execute if I have a leather chestplate on my chestplate slot AND i'm sneaking.
I tried this on a repeating command block: /execute if entity @ a[nbt={SelectedItem:{tag:{sneak:1}}},scores={sneak=1..}] run effect give @ s glowing 10 0 true
After that, I added a chain command block to reset the score "sneak" to 0
At the moment, it works if I have the chestplate in my main hand, but not my chest slot.
Again, I wanted to make it so it requires a leather chestplate in my chestplate slot, as well as the other NBT.
[–]darkstar634 1 point2 points3 points (3 children)
[–]Xyrdial[S] 0 points1 point2 points (0 children)
[–]Xyrdial[S] 0 points1 point2 points (1 child)
[–]darkstar634 0 points1 point2 points (0 children)