mojira.dev
MCPE-238612

Player's position (x y z) is not detected by the /testfor command

If you try to activate something because of where you are, it won’t work

Take a command block, repeat mode, no redstone needed,

Write on it something like /testfor @a[x=0,y=0,z=0] or /give @a[x=0,y=0,z=0] apple…

Expected result: your commnd block will active only if you are at 0,0,0

Actual result: it’s always active

Attachments

Comments 4

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

In the video, the expexted result shows that it will active if the condition is there, but it’s working with the co ordinate condition

That is something I got confused about too, the x=, y=, and z= sectors don’t actually select the precise coordinate, they just change the location that is used a reference for other selectors to that coordinate (doing @e[x=0,y=0,z=0,r=5] would just select any entity within a radius of 4 from (0,0,0), wherever the entity or command block running the command is). You can look at this on the Minecraft wiki page on target selectors.

JuJuMcFR

(Unassigned)

Unconfirmed

Nintendo Switch

Switch 22.0.0 (i think, or the most recent)

26.13

Retrieved