Basically, I'm trying to make a "One command creation", which is, if you don't know, when you have an entire creation/project in one long command.
My creation makes a box, and then puts command blocks inside that box that will do stuff, all generating from a single command. One of the command blocks in that box has some quotes in it that it needs to be able to run, but the long command that makes the command block can't have those quotes for some reason. How can I get around this?
Here's the entire command (I believe some parts of it might be useful to this but I'm not sure):
summon falling_block ~ ~1 ~ {Time:1,BlockState:{Name:redstone_block},Passengers:[{id:armor_stand,Health:0,Passengers:[{id:falling_block,Time:1,BlockState:{Name:activator_rail},Passengers:[{id:command_block_minecart,Command:'gamerule commandBlockOutput false'},{id:command_block_minecart,Command:'data merge block ~ ~-2 ~ {auto:0}'},{id:command_block_minecart,Command:'fill ~3 ~-2 ~-2 ~9 ~3 ~2 white_concrete hollow'},{id:command_block_minecart,Command:'fill ~3 ~-1 ~-2 ~9 ~2 ~2 light_gray_stained_glass replace white_concrete'},{id:command_block_minecart,Command:'setblock ~4 ~-1 ~-1 repeating_command_block[facing=east]{Command:"tag @e[nbt={OnGround:1b,Item:{id:"minecraft:iron_block",Count:3b}}] add irondoor1"}'},{id:command_block_minecart,Command:'data merge block ~4 ~-1 ~-1 {auto:1b}'},{id:command_block_minecart,Command:'setblock ~ ~1 ~ command_block{auto:1,Command:"fill ~ ~ ~ ~ ~-2 ~ air"}'},{id:command_block_minecart,Command:'kill @e[type=command_block_minecart,distance=..1]'}]}]}]}
And here is the bit of it that makes the command block in question:
{id:command_block_minecart,Command:'setblock ~4 ~-1 ~-1 repeating_command_block[facing=east]{Command:"tag @e[nbt={OnGround:1b,Item:{id:"minecraft:iron_block",Count:3b}}] add irondoor1"}'}
Little explanation - It summons a redstone block with an activator rail on top, thus powering the activator rail. Then it spawns a command block in a minecart (CBM) which goes on a powered activator rail, thus activating the command in the CBM. That command sets a block inside my box to be a repeating command block with a command. The problem is in this command - specifically, at id:"minecraft:iron_block"
. The problem is that the repeating command block needs those quote marks, but the long command can't have those quotes or it doesn't work.
Apologies if anything was confusing. If anyone can solve this issue I'd greatly appreciate it, as this is only one of many times this has happened.
\\"
.