How do I make an item that gives potion effects when held?
Mia Lopez
I want to have a clock where if it is held, you turn invisible. I know it has something to do with tags and whatnot, but I can't seem to wrap my head around it. Everything I try fails.
I am in Minecraft 1.15.2.
11 Answer
For only curtain clocks make you invisible:
Put into an active repeating command block:
/execute as @a[nbt={SelectedItem:{id:"minecraft:clock",Count:1b,tag:{makesYouInvisible:1b}}}] at @s run effect give @s minecraft:invisibility 2 0 trueTo give yourself the clock that will make you invisible:
/give @p minecraft:clock{makesYouInvisible:1b} 1For every clock make you invisible:
Put into an active repeating command block:
/execute as @a[nbt={SelectedItem:{id:"minecraft:clock"}}] at @s run effect give @s minecraft:invisibility 2 0 true 1