-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.12, Minecraft 1.12.2, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w12b, Minecraft 19w13b, Minecraft 1.14, Minecraft 1.14.3, 1.15.2, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a, 20w28a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Pre-release 2, 1.16.4 Release Candidate 1, 1.16.4, 20w46a, 20w48a, 20w51a, 21w03a, 1.16.5, 21w05a, 21w05b, 21w06a, 21w07a, 21w11a, 1.17 Pre-release 2, 1.17, 1.20.4, 24w10a, 1.21
-
Confirmed
-
Commands, Items
-
Low
-
Platform
The bug
Book & Quills can be created through commands or command blocks (through the /give commands or as the inventory of a chest in a /setblock command), however, not all book & quills that can be made in the game can be made through a command. A similar fix was previously done for signed, written books, and I'm looking for that fix to be applied to writable books / book & quills as well.
Specifically, previous bug MC-52919 (same title), fixed the written_book item so that it accepts tellraw formatted text, allowing newline characters ('\n') in the text of commands to be interpreted a line breaks in the text of the written book (a place where the user pressed enter). (1.12 has change how the text parser for command interprets \n inside quoted text, so now
n is needed, but otherwise the commands in the comments of MC-52919 work)
Unfortunately, this fix only was applied to the written_book item. The writable_book item, while supporting the same text features in game (as it is turning into the written_book item once signed), does not support the tellraw format in a command, and therefore it isn't possible to use a command to create a writable book that happens to have line breaks / new line characters in it's text, even though it is possible to make such an object in game with the standard book & quill interface.
Examples
- This command works as expected:
/give @a written_book{title:"Test",author:"test",pages:["{text:\"Line 1\\nLine 2\"}"]}
It produces a written book with the following text on the first page:
Line 1 Line 2
- This command does not work as expected:
/give @a writable_book{pages:["{text:\"Line 1\\nLine 2\"}"]}
This is expected to produce a book similar to the above, except not signed yet. Instead it produces a not signed book with the following text on page 1:
{text:"Line 1\nLine 2"}
As writable books and written books are similar objects in game (in fact writable books are turned into written books), I would expect that they would treat text similarly and both support newline characters in their text (as when creating the objects in game allows enter to be pressed to go to the start of the next line).