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

set_enchantments function removes enchantments component from books

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w37a
    • 1.21.1, 24w36a
    • None
    • Confirmed
    • Data Packs, Loot tables
    • Important
    • Platform

      Steps to reproduce:

      1. Create/open a world with the attached data pack applied: MC-276433.zip
      2. Run /loot give @s loot test:test
      3. While holding the enchanted book, run /data get entity @s SelectedItem.components."!minecraft:enchantments"

      Observed result:
      The command outputs:

      <username> has the following entity data: {}

      Expected result:
      The command outputs:

      Found no elements matching SelectedItem.components."!minecraft:enchantments"

      Steps to reproduce (vanilla):

      1. Go to a trial chamber
      2. Open ominous vaults until you get an enchanted book. Keep opening ominous vaults until you get a wind burst enchanted book.
      3. Disenchant the book you just obtained from the ominous vault using a grindstone
      4. Try to enchant the book you just disenchanted in an enchantment table
      5. Try to stack the book with other normal books

      Observed result:
      The book that was obtained and disenchanted from the trial chambers will not stack with other books and cannot be enchanted. After checking with advanced tooltips, this book only has 8 components, compared to normal book items with 9 components. After examining this glitched item in an nbt editor, the book had a minecraft:enchantments component removed. This is what was causing the book to not stack with other normal book items and not be enchantable by normal means.

      Expected result:
      The book that was obtained and disenchanted from the trial chambers should stack with other books and should be enchanted.

      Notes:
      This does not happen with other enchanted items, nor does it happen when name is set to minecraft:enchanted_book instead of minecraft:book.

            gegy1000 [Mojang] Gegy
            RampyPampy RampyPampy
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: