\n and \u in written books do not work
\n in written books not creating new line, giving the error below.
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE] This is an example below, works in versions 17w15a and lower. {code}
/give @p written_book 1 0 {pages:["[\"\",
{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
This issue was reported in MC-116553 but not enough information was given.
Created Issue:
\n in written books not creating new line
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
/give @p written_book 1 0 {pages:["[\"\",
{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
/give @p written_book 1 0 {pages:["[\"\",
{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
/give @p written_book 1 0 {pages:["[\"\",
Unknown macro: {"text"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
/give @p written_book 1 0 {pages:["[\"\",
Unknown macro: {"text"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
This is an example below, works in versions below 17w15
/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
This is an example below, works in versions below 17w15a and lower
/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
This is an example below, works in versions
below17w15a and lower/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
\n in written books not creating new line, giving the error below.
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
This is an example below, works in versions 17w15a and lower.
/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
This issue was reported in
MC-116553but not enough information was given.
\n in written books not creating new line, giving the error below.
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE]
This is an example below, works in versions 17w15a and lower.
/give @p written_book 1 0 {pages:["[\"\",{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
This issue was reported in
MC-116553but not enough information was given.\n in written books not creating new line, giving the error below.
Data tag parsing failed: Invalid escape of 'n' at: {pages:["[\"\",{\"text\":\"one\n<--[HERE] This is an example below, works in versions 17w15a and lower. {code}
/give @p written_book 1 0 {pages:["[\"\",
{\"text\":\"one\ntwo\nthree\"}]"],title:Test,author:Test}
This issue was reported in
MC-116553but not enough information was given.
\n and \u in written books not creating new line
is duplicated by
\n and \u in written booksnot creating new line\n and \u in written books do not work
is duplicated by
is duplicated by
Probably intended and caused by the changes to the NBT parser. Escaping the backslashes in front of the "n" solves this.
Confirmed for 17w18a
I upvote this bug report because it's very annoying.
A workaround is to double escape the \n :
The following example work as intented:
/give @p written_book 1 0 {pages:["{\"text\":\"My\\nBook\"}"],title:"My Book",author:Me}A workaround is better than nothing, I can work with that for now. Its still a bit strange it changed like that.
Thanks for the information Marcono and Tronics.
See also
MC-117080.After looking at it again this should be indeed intended. The NBT string parser does not know escaping sequences like \n and it
did not knew them before either, it only acted weird with backslashes treating a single backslash like an escaped one:
/summon armor_stand ~ ~ ~ {CustomName:\} -> "\" /summon armor_stand ~ ~ ~ {CustomName:\\} -> "\"needs to be used.