2

I need to do test to see if a command block has succeeded but the command in the commandblock does not emit a comparator signal!

0

Command blocks are of Tile Entity type "Control". According to the wiki:

Control has these additional fields:

  • Command: The command to issue to the server.
  • SuccessCount: Represents the strength of the analog signal output by redstone comparators attached to this command block. Only updated when the command block is activated with a redstone signal.
  • LastOutput: The last line of output generated by the command block. Still stored even if the gamerule commandBlockOutput is false. Appears in the GUI of the block when right-clicked, and includes a timestamp of when the output was produced.
  • TrackOutput: 1 or 0 (true/false) - Unknown.

Since your command does not yield a redstone signal, the only way to detect the outcome of the command block via data tags is to read LastOutput.

| improve this answer | |

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.