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

Cannot give written_book to player, it gets broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 24w10a
    • None
    • Unconfirmed
    • (Unassigned)

      Create a new written book the usual way, writing in a book. Suppose the book looks like this, from my inventory:

      {components: {"minecraft:written_book_content": {pages: [{text: '"Hi"'}], author: "BlueMeanial", title: {text: "Fred"}, resolved: 1b}}, count: 1, Slot: 0b, id: "minecraft:written_book"}

      I want to give a player a book just like this. So I say

      /give @s minecraft:written_book{"minecraft:written_book_content": {pages: [{text: '"Hi"'}], author: "BlueMeanial", title: {text: "Fred"}, resolved: 1b}}

      The book the user receives doesn't work. It looks like this:

      {components: {"minecraft:custom_data": {"minecraft:written_book_content": {pages: [{text: '"Hi"'}], author: "BlueMeanial", title: {text: "Fred"}, resolved: 1b}}}, count: 1, Slot: 1b, id: "minecraft:written_book"}

      Note the wrapping "minecraft:custom_data" node. Obviously the received book won't work.

            Unassigned Unassigned
            kcrca Ken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: