I have a 1 tick clock, which leads to a command block with the command:
testfor @p[-262,3,113,1] {SelectedItem:{id:minecraft:stick}}
That works. It finds me under the right conditions.
Then I have a redstone comparator, leading to a redstone repeater (seemed to be needed), then another command block for the actual command to do.
If the (second) command is
tp @p -268 3 113
then it works.
If it is any of the following then it won't teleport (though the first command block is finding me)
tp @p[-262,3,113,1] -268 3 113
tp @p[x=-262,y=3,z=113,r=1] -268 3 113
tp @p[-262,3,113,1] {SelectedItem:{id:minecraft:stick}} -268 3 113
tp @p[x=-262,y=3,z=113,r=1] {SelectedItem:{id:minecraft:stick}} -268 3 113
Can anyone suggest an answer?
Edit:
I'm on Minecraft 1.8.8.
Here's the clock (off to the right is a switch to turn it on and off, off to the left is the command block circuit).
Here's the main circuit. The right hand command block is the first (the testfor). Behind it is a redstone repeater.
The left hand command block is the second (the tp).
Hope that helps.
@p
in the tp command to@a
?