/setblock cannot set a command block with a "string" tag in it's command
How to reproduce:
1. Execute a command with string tags like that:
/summon Ozelot ~ ~1 ~ {Riding:{id:"Creeper"}}
2. Put this command into /setblock command:
/setblock ~2 ~ ~ 137 0 destroy {Command:"<put your command here>"}
You will get a command like that:
/setblock ~2 ~ ~ 137 0 destroy {Command:"summon Ozelot ~ ~1 ~ {Riding:{id:"Creeper"}}"}
3. Try to execute the /setblock command. It will conflict because one string tag overlaps another one.
It'll be better if command like /setcommand exists; this command should set a command into a command block on spicified coords. It will be so useful for mapmakers.
Created Issue:
/setblock cannot set a command block with a "string" tag in it's command
How to reproduce:
{Command:"<put your command here>"}
1. Execute a command with string tags like that:
<code>/summon Ozelot ~ ~1 ~ {Riding:{id:"Creeper"}}</code>
2. Put this command into /setblock command:
<code>/setblock ~2 ~ ~ 137 0 destroy</code>
You will get a command like that:
<code>/setblock ~2 ~ ~ 137 0 destroy {Command:"summon Ozelot ~ ~1 ~ {Riding:{id:"Creeper"}}"}</code>
3. Try to execute the /setblock command. It will conflict because one string tag overlaps another one.It'll be better if command like /setcommand exists; this command should set a command into a command block on spicified coords. It will be so useful for mapmakers.
How to reproduce:
1. Execute a command with string tags like that:
<code>/summon Ozelot ~ ~1 ~ {Riding:{id:"Creeper"}}</code>
2. Put this command into /setblock command:
<code>/setblock ~2 ~ ~ 137 0 destroy
{Command:"<put your command here>"}</code>
You will get a command like that:
<code>/setblock ~2 ~ ~ 137 0 destroy {Command:"summon Ozelot ~ ~1 ~ {Riding:{id:"Creeper"}}"}</code>
3. Try to execute the /setblock command. It will conflict because one string tag overlaps another one.It'll be better if command like /setcommand exists; this command should set a command into a command block on spicified coords. It will be so useful for mapmakers.
How to reproduce:
1. Execute a command with string tags like that:/summon Ozelot ~ ~1 ~ {Riding:{id:"Creeper"}}2. Put this command into /setblock command:
/setblock ~2 ~ ~ 137 0 destroy {Command:"<put your command here>"}You will get a command like that:
/setblock ~2 ~ ~ 137 0 destroy {Command:"summon Ozelot ~ ~1 ~ {Riding:{id:"Creeper"}}"}3. Try to execute the /setblock command. It will conflict because one string tag overlaps another one.
It'll be better if command like /setcommand exists; this command should set a command into a command block on spicified coords. It will be so useful for mapmakers.
Intended. Use the escape character (\") when you want a quotation mark inside a string.
It works also like this:
/setblock ~2 ~ ~ 137 0 destroy {Command:"summon Ozelot ~ ~1 ~ {Riding:{id:Creeper}}"}The escape character will work and is preferred because it is JSON compatible as well. It should be:
/setblock ~2 ~ ~ 137 0 destroy {Command:"summon Ozelot ~ ~1 ~ {Riding:{id:\"Creeper\"}}"}Thanks.