mojira.dev
MC-98830

Can't select random named entity

I have several ArmorStands with same name, I want select ONE random of them.

I tryed @e[c=1,name=...] and @r[name=...] and have error in both cases.

Comments 7

Please provide the exact commands used

ok. First of all I summon ArmorStands with this comand:

/summon ArmorStand ~ ~ ~ {CustomName:LB_Filler,NoBasePlate:1,ShowArms:1,NoGravity:1,Small:1,Marker:1}

I use it in several different locations, so there are several different armor stands with same name.

Than I want to rename one of them, picked randomly or any other way, but only one of them.
I tryed 2 different aproaches:

/entitydata @e[name=LB_Filler,c=1] {CustomName:LB_Filler_Active}

and

/entitydata @r[name=LB_Filler] {CustomName:LB_Filler_Active}

in both cases I have error:
The entity UUID provided is in an invalid format.

@e[name=LB_Filler] works as invented but ranames all entities with same name
@r[type=ArmorStand] and @a[c=1,type=ArmorStand] selects random armor stand, but not only that named ones.

Try names without the _ that most likely breaks the selector

Underscores are valid characters for selectors. The @r selector will only target players unless the type parameter is specified:

/entitydata @r[type=!Player,name=LB_Filler] {CustomName:"LB_Filler_Active"}

@unknown right, I'm just blind 😛

@unknown, if you are blind, than I am damn stupid 🙂

Thank's for help and sorry for disturbing

@unknown doesn't matter, but try to look at any error within commands next time

Vladislav Aksjonov

(Unassigned)

Unconfirmed

Minecraft 1.9

Retrieved