Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-156163

F3 + I does not preserve new lines in unwritten books in lecterns

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.14.3
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed
    • Category:
      (Unassigned)

      Description

      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.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ThisSentenceIsFalse Billiam
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: