mojira.dev
MC-134633

CustomName tag within a command within a command doesn't work.

When you have a command block that places a second command block that contains the CustomName tag, it does not execute properly...

This command:

summon pig ~ ~1 ~ {CustomName:"\"Piggy\""}

works perfectly.

But when put into the next level up of commands:

setblock ~ ~2 ~ command_block{Command:"summon pig ~ ~1 ~ {CustomName:\"\\"Piggy\\"\"}"}

it does not work.

It (and other commands like it) work perfectly when CustomName is omitted; but with it, they do not work.

I believe the causality has something to do with the new GUI detecting the backslashes as normal characters rather than pre-quotation markers; but I didn't write the code, so who am I to say?

NOTE: I originally discovered this bug in 1.13-pre1, I just didn't expect it to find its way into the final release. It was probably around a lot longer than 1.13-pre1, but this was when I discovered it.

Thank you for your time.

Comments 1

You must escape the backslashes as well as the quotes. Hence, after one backlash, the next layer has three (followed by 7, 15, 31, 63, etc)

Part Toon

(Unassigned)

Unconfirmed

Minecraft 1.13

Retrieved