The bug
Using the F3 + I key bind on a lectern with a book and quill does not preserve new line characters. For example, typing:
hello
world
into a book and quill, placing it on a lectern, and using F3 + I obtains:
/setblock ~ ~ ~ minecraft:lectern[facing=south,has_book=true,powered=false]{Book:{id:"minecraft:writable_book",Count:1b,tag:{pages:["hello
world"]}},Page:0}
When used to generate a new lectern, this command produces a book and quill with the text:
helloworld
Attempting to manually insert the new-line character, \n, between "hello" and "world" results in the error: "Invalid Escape sequence '\n' in quoted string."
This issue does not occur with written books, and is likely related to a discrepancy between written and unwritten books: unlike written books, unwritten books do not appear to accept JSON-formated text.
For example:
/give @p minecraft:written_book{pages:['{"text":"hello\\nworld"}'],author:"None",title:"Test"}
results in:
hello
world
However,
/give @p minecraft:writable_book{pages:['{"text":"hello\\nworld"}']}
results in the literal text:
{"text":"hello\nworld"}
This portion of the issue also occurs when /setblock is used to summon lecterns.
How to reproduce
Enter the following text into book and quill:
Test Test
Without signing the book, place it onto a lectern
Right-click the lectern to read the book
→ ✔ The text is displayed correctlyExit the lectern GUI and press
F3 + I
while looking at the lecternDestroy the lectern
Run the command that was copied to your clipboard
Right-click the lectern again
→ ❌ The text in the book now reads: "TestTest
"
Linked issues
Comments 2
Thank you for your report!
However, this issue is a Duplicate of MC-119659.
It has been linked to this report. If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Confirmed in 1.16.1 and 20w27a.