1

Execute command

DanMcb 9/22/19 3:30 pm
209
9/27/2019 4:26 am
Hey so i need some help with a execute command, im trying to get it so when a player walks on a certain block it does a bunch of commands, i need to do this multiple times so dont worry about the run command bit, so far i got Execute if entity @a[x=9,y=23,z=14] This does not work plz help
Posted by
DanMcb
Level 1 : New Miner
0

  Have something to say?

JoinSign in

5

ShelLuser
09/27/2019 4:26 am
Level 61 : High Grandmaster System
One or more block types? Because then it would make sense to set up a block tag and then check for that tag. As to running multiple commands: functions are your friend.
1
tomatotownn
09/22/2019 8:36 pm
Level 41 : Master Sailor
You could also run it with a command that targets them if they stand on a particular block, with a repeater that needs redstone, here:

/execute at @a if block ~ ~-1 ~ minecraft:[BLOCK] run [COMMAND]
1
HoboMaggot
09/23/2019 2:38 am
Level 55 : Grandmaster Blob
redstone in big maps and servers tend to fail. It is best not used when you have the power of commands anyways
1
Thonck
09/22/2019 4:52 pm
Level 21 : Expert System
You'll need the distance selector along with those coordinates. Leaving them without it will make the game unsure of where exactly to target. So here's what you should do:

/execute if entity @a[x=9,y=23,z=14,distance=..1]
2
HoboMaggot
09/23/2019 2:41 am
Level 55 : Grandmaster Blob
history
Note that the distance selector is very iffy.
distance=..1 means the exact position the block is in. So if the selector is x=23 and you're in x=23.5, it wont detect
distance=..2 is the optimal place as it detects anywhere inside that block.
distance=..3 is 1 block from the target block and so on
1

Welcome