Mojira Archive
MC-276433

set_enchantments function removes enchantments component from books

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.

Fixed

RampyPampy

[Mojang] Gegy

2024-09-06, 10:09 AM

2024-09-09, 09:01 AM

2024-09-09, 09:01 AM

2

1

Confirmed

Important

Platform

Data Packs, Loot tables

1.21.1, 24w36a

24w37a