2

/execute from closest entity form player

Wombatlord 11/18/17 6:30 pm
320
11/19/2017 9:22 am
I am making lucky blocks in Minecraft. All of it works except if you place multiple lucky blocks at once it opens them all at the exact same time and all of them are then the exact outcome.
I want to make it so it only opens the block closest to the player
This is an example of the current command
/execute @e[type=armor_stand,name=Chance] ~ ~ ~ /setblock ~ ~-1 ~ minecraft:dirt
Would i do it like
/execute @e[type=armor_stand,name=Chance,r-2] ~ ~ ~ /setblock ~ ~-1 ~ minecraft:dirt
??
Posted by
Wombatlord
Level 13 : Journeyman System
5

  Have something to say?

JoinSign in

2

Pepijn
11/19/2017 9:22 am
Level 58 : Grandmaster Cyborg
execute @e[type=armor_stand,name=Chance,c=1] ~ ~ ~ setblock ~ ~-1 ~ minecraft:dirt

The "c=1" picks the closest one.
1
Woodchuck Games
11/18/2017 7:11 pm
Level 1 : New Miner
You could set a radius [r=1]
/execute @p ~ ~ ~ /kill @e[type=armor_stand,name=Chance,r=3]

I couldnt figure out how to setblock only how to kill or anything that affects the entity, I hope this helps!
1

Welcome