I was Trying to make Staffs With Commands (yeah how original !) but I have encountered this issue;
The commands :
Repeat type Command Block :
execute as @e[tag=Spell] run execute at @e[tag=Spell] if entity @e[type=!minecraft:player,type=!item,distance=..1,tag=!Spell] run tag @s add used
*Chain type Command Block : (*always active, Conditional)
kill @e[tag=used]
Now this is what happens:
I use the carrot on a stick that launches an invisible Armor Stand with particles and #Spell Tag
it goes on forever until gets close enough to an entity (1 block or less)
Armor Stand gets killed by the chain command block
The issue is :
All the Other Armor stands gets killed even though the command Says "tag @s add used"
The Video If you didn't understand what I meant bc my grammar is broken asf : Click Here
PS: I am not really good at commands so if there is a wrong part in the command please correct me
Your running as every spell at every spell, not just at them selves, as such, every spell also execute at the spell that hits the creeper and gets the used tag.
This is a mistake in your command, not a bug.
To fix it: