mojira.dev
MC-196343

execute / tag command glitch

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:

  1. I use the carrot on a stick that launches an invisible Armor Stand with particles and #Spell Tag

  2. it goes on forever until gets close enough to an entity (1 block or less)

  3. 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

Comments 2

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:

execute as @e[tag=Spell] run execute at @e[tag=Spell]
->
execute as @e[tag=Spell] at @s

@FVbico tysm I've been working on this for hours

The Quidney

(Unassigned)

Unconfirmed

(Unassigned)

20w30a

Retrieved