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

Anvil limits book enchantment level to survival values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.18.1, 1.20.2, 1.20.6, 1.21 Pre-Release 3
    • None
    • Confirmed
    • Enchantments, Items
    • Normal
    • Gameplay

      The bug

      When enchanting a tool/armor piece with an enchanted book that has an enchantment level higher than the survival maximum enchantment level (for example, Fortune V), which can be done through the use of commands or data packs, the anvil caps the enchanted item at said maximum level.

      To reproduce

      1. Obtain a book with a high enchantment level value, such as Protection V or Fortune V. For example, drop an enchanted book item on the ground and run the following command:
        /data merge entity @e[type=item,limit=1,sort=nearest] {Item:{tag:{StoredEnchantments: [{lvl:5s, id:"minecraft:protection"}]}}}
        
      2. Give yourself a compatible tool/armor piece and place it in the first slot of the anvil.
      3. Place the enchanted book in the second slot of the anvil.
      4. The anvil caps the enchantment value at the maximum level.

      Original description

      Some datapacks such as Altar Enchanting allow for higher levels of enchantment than normal rules, such as Fortune V. However, combining items on an anvil has a glitch when two of the same enchantment are combined. If I combine a Fortune V pickaxe with a Efficiency V pickaxe, I get the expected result of a Fortune V+Efficiency V pickaxe. However, if I combine a Fortune V pickaxe with a Fortune III + Efficiency V pickaxe, I only get a Fortune III + Efficiency V pickaxe, no matter what slot is used. I'm not sure if this even a proper bug given it's beyond normal vanilla gameplay, but it certainly is important for datapacks and mods and datapack devs don't have the abilities to fix this. I'm guessing the game code currently caps the level to avoid combining two Fortune III picks into a Fortune IV pick, however I would expect intended Anvil behavior to preserve high-level enchants rather than downgrading them. 

            Unassigned Unassigned
            atyshka Alex Tyshka
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: