-1

I've got an older world that I've had for years and have brought with me through multiple versions. I haven't played since 1.10 or so, and today I imported the world into 1.13.1. The world is survival, but I used cheats to add command blocks where I needed them. Now the command blocks don't work.

The command block is clocked, and is being activated. I can set the block command to say "hi" and it will repeatedly say "hi" and output a redstone signal to its output comparator. But if I change the command back to what it originally was set to (testfor @p[r=2]), I get an error message in the previous output which says testfor @p[r=2]<--[HERE].

If I type the command into the console, I get an unknown command error. Furthermore, the command as written in the command block field is red, and testfor does not autocomplete.

  • Even in 1.10 it was discouraged to use testfor. – Fabian Röling Sep 16 '18 at 21:02
0

Ah, you have to use execute now:

/execute if entity @p[x=-798,y=4,z=0,distance=..1]

Then it will output to the comparator when those conditions are satisfied (i.e. there is a player in that position).

  • This question is still marked as unanswered. Please click the check mark to the left to accept this answer if you feel like you don't have any more questions regarding this. – Spitz Sep 22 '18 at 15:06

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.