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

The minecraft:set_written_book_pages item modifier is inconsistent with minecraft:set_name and minecraft:set_lore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w12a
    • 24w11a
    • None
    • Plausible
    • Loot tables
    • Important
    • Platform

      The minecraft:set_written_book_pages item modifier is inconsistent with minecraft:set_name and minecraft:set_lore, as the former requires the JSON to be wrapped in a string, while the other two accept text components as-is.

      Compare an example of one for minecraft:set_lore:

      {
        "function": "minecraft:set_lore",
        "lore": [
          {
            "text": "a text component"
          }
        ]
      }
      

      with one for minecraft:set_written_book_pages:

      {
        "function": "minecraft:set_written_book_pages",
        "pages": [
          "{\"text\": \"a text component\"}"
        ],
        "mode": "replace_all"
      }
      

       

      This also affects the item stack components themselves, in for example the minecraft:set_components item modifier:

      {
        "function": "minecraft:set_components",
        "components": {
          "minecraft:written_book_content": {
            "title": "A Book",
            "author": "Herobrine",
            "pages": [
              "{\"text\": \"a text component\"}"
            ]
          }
        }
      }
      

            slicedlime [Mojang] slicedlime
            ErrorCraft ErrorCraft
            Votes:
            5 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: