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

Loss of functionality with components minecraft:enchantments & minecraft:stored_enchantments

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 24w12a
    • None
    • Windows 10 - Java 17
    • Unconfirmed
    • (Unassigned)

      Please revise "minecraft:enchantments" and "minecraft:stored_enchantments" compounds. Before, the level and id values were seperated in a list which made it easy to check and modify them individually in a datapack. Now they are merged under the 'levels' field, which makes it impossible to change the level without knowing the id.

      EX. on an enchanted book, it's like this in the snapshot:

      {components: {"minecraft:stored_enchantments":{levels:{"minecraft:efficiency":5, "minecraft:silk_touch":1}}}}

      As far as this format is concerned, "minecraft:efficiency" is equivalent to the value 5 which is extremely difficult to work with. And because it's all sandwiched in the { } compound instead of a list, I can't get the id without knowing it, or what position it's at on an enchanted book.

      I recommend going back to its old format.

      {components:{"minecraft:stored_enchantments":[{id:"minecraft:efficiency", lvl: 5},{id:"minecraft:silk_touch",lvl:1}]}} 

       

      Point proven, when holding an enchanted book there is no equivalent of this command from 1.20.4 :

      /data get entity @s SelectedItem.tag.StoredEnchantments[0].id

            Unassigned Unassigned
            misterk7_- Khaan
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: