mojira.dev
MC-125721

command block error

command block command no longer functions :

block conditions set to repeat/unconditional/always active

(input) /testfor @p[r=3]

(output) [19:17:51] Unknown command at position 0: <--[HERE]

worked previously.

Comments 5

The /testfor command was already removed in 1.13 snapshots.

Why would they remove it? To encourage people to not update? Is there a workaround? Will :

/execute if entity @p[distance=3]

function as a workaround? All I want to do is send a signal to the next command block in the chain to execute it's function (in this case remove a wall - and once the player is out of range - the comparator signals the other command block to replace the wall with setblock air and stone respectively). Basically it's a hidden door - but I use them everywhere on my build.

If /execute can do something similar that's fine but I'm not hitting the syntax and order of operations to save my life.

How? To clarify, I previously said I was having no luck coming up with the proper syntax etc to make it work. I want to generate a steady on-pulse since it's hooked up to a comparator for an if-then / else statement physically. Executing one command 'might' work but then I need another for the inverse relationship - either in the same block or an adjacent block. Ideally I'd like the pulse and no argument since I use the pulse to create both the action and a separate sound generation command for audio user-feedback.

I've tried the command I used as an example and it didn't work. I'm sure I'm on the right track but I'm lost in the weeds.

/execute if replaces testfor, testforblock, testforblocks and execute detect. The wiki page on 1.13 may help you understand better.

Montgomery Gabrys

(Unassigned)

Unconfirmed

Minecraft 18w07c

Retrieved