mojira.dev
MC-122393

Functions don't understand JSON with line breaks

This function works as intended:

title @a {text: "Hello, World!"}

This function does not:

title @a {
  text: "Hello, World!"
}

Additionally, the failing function simply throws the error "Unknown function", which is cryptic and unhelpful – it would be much easier to debug problems of this type if there was a different error for "function not found" and "function did not parse correctly."

Comments 2

1 command per line, this is intentional.

Hrm, that makes it sort of hard to write complex JSON in commands. I guess I could write in some sort of intermediate format and then use a script to remove the line breaks? It would be nice to see support for standard JSON in the future.

Nicholas Lamicela

(Unassigned)

Unconfirmed

function, json

Minecraft 1.12.2

Retrieved