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

Written Books Parse Tags Incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 16w33a
    • None
    • Windows 8.1, Java 1.8.0_101-b13
    • Unconfirmed

      Most JSON tags in Minecraft have (relatively) recently updated to using strict JSON--meaning the property names must/can be in quotes. However, if you try to /give someone a written_book with a strict-JSON tag, it shows the "Invalid Book Tag" message inside it. The same tag in loose JSON (i.e. without quotes around the property names) doesn't give that error.

      However, the books still don't work properly: if you /give someone a written_book with defined pages which are strings, it will only show the first word on each page and stop parsing at the first space. I haven't tested this with JSON strings yet, but simple strings definitely have this problem.

      To reproduce:

      Issue Part 1: Put this command in a command block:

      /give @p minecraft:written_book 1 0

      {"generation":1, "author":"IceMetalPunk", "title":"Ancient Scroll", "pages":["This is an old book.","Is it cool to you?"], "resolved":0b}

      When the book is opened, it says Invalid Book Tag.

      Issue Part 2: Put this command in a command block:

      /give @p minecraft:written_book 1 0

      {generation:1, author:"IceMetalPunk", title:"Ancient Scroll", pages:["This is an old book.","Is it cool to you?"], resolved:0b}

      Expected: First page should say "This is an old book.", second should say "Is it cool to you?"

      Actual result: First page says "This", second page says "Is".

            Unassigned Unassigned
            IceMetalPunk Daniel Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: