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

Cannot sort enchantments on an item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 24w09a
    • None
    • Community Consensus
    • Enchantments

      Steps to reproduce:

      1. Get two bows, two Power V enchanted books, two Mending enchanted books, and place an anvil.
      2. Add Power V to a bow, then add Mending to the bow.
      3. Add Mending to the other bow, then add Power V to the bow.
      4. Unload these items, either one of:
        • Place them in a chest, Press F3+I on the chest and run the command you get to place it.
        • Exit the world and rejoin it.
      5. View tooltips of these items.

      Result:

      • Noticed that both bow have Mending before Power V.

      Expected result:

      • Items retains their order of enchantments, persisting between game instances.

      Items created before 24w09a lose their order of enchantments once they are loaded in this version.

      This is caused by the new item stack component of enchantment is a key-value-pair dictionary compound, instead of a compounds list. As a result, players can no longer sort enchantments on their items by controlling the order of adding enchantments on an anvil. Additionally, spawning items with sorted enchantments with commands is not possible now.

      Enchantments on items still sorted by when they are added to the item, until the item is unloaded from memory. After the items is loaded, enchantments are always sorted by their namespaced ID.

            Unassigned Unassigned
            siiftun1857 siiftun1857
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: