mojira.dev
MC-173480

Armor Stand cannot be targeted via a custom name

I am attempting to target a random armor stand by a particular name, and then setblocking a redstone block at that armor stand. This is my attempt at a Random Output generator. 

I've been getting said armor stand with a command block, by using:

/give @p minecraft:armor_stand{CustomName:"Random"} (with quotations, without them, neither works)

and then attempting to target it with this:

/execute at @e[name="Random",limit=1,sort=random] run setblock ~ ~ ~ minecraft:redstone_block replace

This does not work, for some reason. I suspect this is a bug rather than a deliberate gameplay element because this works with other entities, such as slimes. About the only entity I can't get this to work on is the armor stand, which is the only entity ideal for what I'm trying to do.

 

Environment

Windows 10, Java Edition, Acer laptop running on Intel Core i7

Linked issues

Comments 1

migrated

(Unassigned)

Unconfirmed

1.15.2, 20w09a

Retrieved