Minecraft Java Edition – Fix ‘Testfor’ Command Producing Error in 1.11 Snapshots

minecraft-commandsminecraft-java-edition

I've been making a map for 1.10 and it's going great, but 1.11 shows great mobs to use for it. However, most things have channged in command syntax. For example, /kill @e[type=ArmorStand,r=6] is now /kill @e[type=Armor_Stand,r=6]

What about /testfor? I can't find a way to testfor a player to stand on a block and give them an effect.
enter image description here

What's is going on in this image is that a redstone clock is running into this command /testfor @a[1117,20,507,r=1] (if I was to stand on them cords the comparator would turn on and power that command block), but it only works in 1.10… from 1.11 snapshots, I've seen some errors of it, like it now needs to have {} at the beginning and end of it. (e.g. /testfor @a{[1117,20,507,r=1]})

It's still not working, though, so does anyone know how to get it to work?

Best Answer

Due to changes in the way the 1.11 snapshots parse selector arguments, you now have to specify x=, y= and z= before your coordinates; the @a[#,#,#,#] shortcut no longer works unfortunately. For example:

/testfor @a[x=1117,y=20,z=507,r=1]