I used this command

/setblock <x> <y> <z> repeating_command_block {TileEntityData:{Command:"/setblock <x> <y> <z> repeating_command_block {TileEntityData:{Command:"effect @a clear"}}"}}

It works fine, but the command block says "Needs Redstone", so I want to change that in "Always Active" how to do that?

  • I'm pretty sure thathis one won't work the way you want it to, since you didn't escape the strings in the strings.
    – Plagiatus
    Jan 30, 2017 at 20:12
  • 1
    Like @Plagiatus said, you need to escape the strings inside the string: /setblock <x> <y> <z> repeating_command_block {TileEntityData:{Command:"/setblock <x> <y> <z> repeating_command_block {TileEntityData:{Command:\"effect @a clear\"}}"}} Jan 30, 2017 at 22:57

1 Answer 1


You can set the auto NBT tag on the commandblock to 1. This will cause the "Always Active" option to automatically be selected.

Here's an example:

/setblock ~ ~ ~ repeating_command_block 0 replace {Command:"/say Hello",auto:1}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .