So basically I am trying to make a one-command-creation, which is where you have an entire project inside one long command.
I already asked a question on here which explains how the one command works, so you can have a look at my previous question to see that.
My long command makes a box, in which tons of command blocks go, which in turn makes everything work. One of my command blocks in there has a specific bit that needs either single quotes ('example') or double quotes with escape codes ("example").
The problem is, the long command needs it to be double quotes, nothing else. If I use double quotes, the long command works but the command block in the box doesn't, and vice versa.
The last thing I have tried to do is put the escape codes (the backslashes), which, in theory, would make it work, but, in practice, the long command treats it as escape code for itself rather than for the command block.
So I'd appreciate if someone could tell me how I can use escape codes and make it use them in the command block (hopefully you know what I mean), or come up with a solution to the original problem, or just give me an entirelly different way to get around it.
Here's the entire command:
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 ~-1 ~2 ~8 ~6 ~-2 gray_stained_glass hollow'},{id:command_block_minecart,Command:'fill ~3 ~-1 ~2 ~8 ~-1 ~-2 smooth_stone_slab[type=top]'},{id:command_block_minecart,Command:'playsound block.piston.extend ambient @a'},{id:command_block_minecart,Command:'fill ~3 ~6 ~2 ~8 ~6 ~-2 smooth_stone_slab[type=bottom]'},{id:command_block_minecart,Command:'setblock ~4 ~ ~-1 repeating_command_block[facing=east]{Command:"tag @e[nbt={OnGround:1b,Item:{id:\\"iron_block\\",Count:4b}}] add irondoor1"}'},{id:command_block_minecart,Command:'data merge block ~4 ~ ~-1 {auto:1b}'},{id:command_block_minecart,Command:'setblock ~5 ~ ~-1 chain_command_block[facing=east]{Command:"tag @e[nbt={OnGround:1b,Item:{id:\\"sticky_piston\\",Count:2b}}] add irondoor2"}'},{id:command_block_minecart,Command:'data merge block ~5 ~ ~-1 {auto:1b}'},{id:command_block_minecart,Command:'setblock ~6 ~ ~-1 chain_command_block[facing=east]{Command:"execute at @e[tag=irondoor1] as @e[tag=irondoor2,distance=..1] run summon item ~ ~ ~ {Tags:[\\"itemkill1\\",\\"IronDoorSpawn\\"],PickupDelay:20,Item:{id:\\"minecraft:stray_spawn_egg\\",Count:1b,tag:{display:{Name:\\"{\\"text\\":\\"2 x 2 Iron Door\\"}\\"},HideFlags:1,EntityTag:{id:\\"minecraft:silverfish\\",NoAI:1b,NoGravity:1b,PersistenceRequired:1b,Silent:1b,Health:0}}}}"}'},{id:command_block_minecart,Command:'data merge block ~6 ~ ~-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]'}]}]}]}
but this part is all you need to work it out:
{id:command_block_minecart,Command:'setblock ~6 ~ ~-1 chain_command_block[facing=east]{Command:"execute at @e[tag=irondoor1] as @e[tag=irondoor2,distance=..1] run summon item ~ ~ ~ {Tags:[\\"itemkill1\\",\\"IronDoorSpawn\\"],PickupDelay:20,Item:{id:\\"minecraft:stray_spawn_egg\\",Count:1b,tag:{display:{Name:\\"{\\"text\\":\\"2 x 2 Iron Door\\"}\\"},HideFlags:1,EntityTag:{id:\\"minecraft:silverfish\\",NoAI:1b,NoGravity:1b,PersistenceRequired:1b,Silent:1b,Health:0}}}}"}'}
Thanks in advance.