2

/execute from closest entity form player

Wombatlord's Avatar Wombatlord11/18/17 6:30 pm
2 emeralds 241 2
11/19/2017 9:22 am
Pepijn's Avatar Pepijn
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's Avatar
Wombatlord
Level 13 : Journeyman Engineer
4

Create an account or sign in to comment.

2

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

The "c=1" picks the closest one.
1
11/18/2017 7:11 pm
Level 1 : New Miner
Woodchuck Games
Woodchuck Games's Avatar
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!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome