Minecraft executing on a random enitity not working

Minecraft executing on a random enitity not working - Pensive Man Sitting Behind His Desk Using Laptop

I am trying to set a stone block underneath a random armor stand, that is called disco stand. There are nine.

I put in this command:

/execute @r[name=DiscoStand] ~ ~ ~ /setblock ~ ~-1 ~ stone

... but it doesn't work. Any ideas, anyone?



Best Answer

@r, by default, only selects players. To get it to select another entity, use the type argument:

/execute @r[name=DiscoStand,type=ArmorStand] ~ ~ ~ /setblock ~ ~-1 ~ stone



Pictures about "Minecraft executing on a random enitity not working"

Minecraft executing on a random enitity not working - White Metal High-rise Viewing Deck Building
Minecraft executing on a random enitity not working - Free stock photo of adult, architect, boss
Minecraft executing on a random enitity not working - Person Holding Brown Leather Book





Minecraft Execute Command [1.19] Tutorial




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Kampus Production, Pixabay, Mikhail Nilov, Pixabay