Minecraft coordinate command?

pa
6

How can you bind a command to a specific coordinate in Minecraft?

So if you are exactly at this coordinate, a command is executed.

How does this work?

I thank you in advance for the info!

Li

With command block

Wo

So, I guess it works with command blocks. I assume you're in 1.13+ or something.

This would be if you just want to run the command block without a comparator (output) (continuous red tone power required).

/ execute as @a [x = hierX, y = hierY, z = hierZ, distance = .DISTANZ (RADIUS)] at @s run say Player x is here.

Now if you want an output (comparator):

/ execute if entity @a [x = hierX, y = hierY, z = hierZ, distance = .DISTANZ (RADIUS)]

Source: https://www.minecraftforum.net/...tanding-at

So

Very good answer

Wo

You help as much as possible ^^

pa

I forgot to write that I was playing on the Bedrock version of Minecraft.

My mistake. ^^ "

Wo

Unfortunately I don't know anything about that. Try to loop that in a command block (always do it) and look for a comparator output to another command block with your desired command that should be executed when the player is found. In the first CMDBlock the command:

/ testfor @a [x = X, y = Y, z = Z, r = R]

r is the test radius. Maybe you can. MFG c