-
Bug
-
Resolution: Duplicate
-
None
-
Minecraft 1.14.3, 1.16.1, 20w27a, 1.16.2
-
None
-
Confirmed
-
(Unassigned)
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 correctly - Exit the lectern GUI and press F3 + I while looking at the lectern
- Destroy the lectern
- Run the command that was copied to your clipboard
- Right-click the lectern again
→ The text in the book now reads: "TestTest"
- duplicates
-
MC-119659 Book and quill won't allow for new lines through commands
- Open