I've been trying to use this command since I found out about it, but for some odd reason, it hasn't been working at all. The command blocks look something like this: But whenever I go to those certain coordinates, I am not teleported to those coordinates. Am I missing anything? (Just to clarify: I'm not in a multiplayer game. I'm at singleplayer.)
1 Answer
Curly brackets are for NBT data (player/item NBT reference, world/entity NBT reference). For example, you could use:
/testfor @a {OnGround:0b}
To check for players that aren't touching the ground.
What you are wanting to do (check for players within a radius of some coordinates) should be done with target selector arguments instead. These use square brackets, and would look something like:
/testfor @a[x=-651,y=66,z=-633,r=1]
As this is part of the selector, you could also get rid of the testfor and simply use:
/tp @a[x=-651,y=66,z=-633,r=1] -660 66 -632
You may also want to look into the 1.9 command blocks. A repeating blocks would be easier and more efficient than your fill clock, and same with conditional blocks instead of comparators.
-
Thank you so much! I was confused since whenever I tried using that in chat it said I use using the wrong kind of brackets, so I tried curly ones instead. I also had no idea you can instead use tp so thank you for that as well. I've also tried using the 1.9 command blocks but I never got it to work and I prefer the original ones instead.– ggtylerrCommented May 14, 2017 at 20:56
setblock
clocks anymore, and moreover, you shouldn't be usingsetblock
clocks. Repeating command blocks have replaced redstone clocks of all sorts. This type of command block setup is processor intensive, inefficient, and error prone. Learn the proper way to use command blocks in 1.9 and beyond, since you're in at least that version already.