mojira.dev
MC-116825

NBT setblock with command_block data

Since the new NBT data was changed I could use:
setblock ~ ~1 ~ command_block 0 replace {Command:"/say hi"}

But not when using it in a sign like this:
setblock ~ ~1 ~ standing_sign 12 replace {"Text1":"[{\"text\":\"test\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/setblock ~ ~1 ~ command_block 0 replace {Command:"/say hi"}\"}}]"}

It will see that there is a " and stop the command. Changing it to \" does not change this.

And I can't think of any fix for it. Someone else having problems with this?

Linked issues

Comments 2

You need to escape the quotes, backslashes = 2 * previous layer + 1
Previous layer = 1
2*1+1 = 3 backslashes.

I don't know why this was changed.. Because it was so simple to use and look back if there was something wrong. But I am SO glad it works now!

Thank you so much!

Christian Prater

(Unassigned)

Unconfirmed

Minecraft 17w17a

Retrieved