-2
/execute @p ~ ~ ~ detect ~ ~-1 ~ gold_block -1 tp @A[x=-12.002,y=157,z=-48.982,r=2] ~ ~10 ~

This command works in a separate location using different coordinates, but when I use these coordinates, it fails to detect any players. This is the original command that I changed:

/execute @a ~ ~ ~ detect ~ ~-1 ~ iron_block -1 tp @a[x=12,y=153,z=-65,r=5] ~-5 ~-5 ~-5
1

You cannot have decimal coordinates in a selector, round them off to the nearest integer:

/execute @p ~ ~ ~ detect ~ ~-1 ~ gold_block -1 tp @a[x=-12,y=157,z=-49,r=2] ~ ~10 ~

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.