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

only enchanted_books with stored_enchantments component works in an anvil.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.21 Pre-Release 4
    • None
    • Confirmed
    • Enchantments

      Only enchanted books with a stored_enchantments component can be used to apply their enchantments in an anvil. Other items (e.g. flint) with a stored_enchantments component cannot be used to apply enchantments in an anvil.

      I would expect that this would be possible since the introduction of components allows items to be more modifiable with datapacks. (e.g. you can give yourself a flint that can be eaten, but not one that applies sharpness in an anvil?).

       

      /give @s minecraft:flint[minecraft:stored_enchantments={levels:{"minecraft:sharpness":3}}]

       

      Interestingly, as a side note, although it won't let you enchant the sword using said flint, it will consume the flint if you also try to rename the item at the same time (but still won't apply sharpness). This doesn't happen with items that lack the stored_enchantments component.

      Please see attached screenshots for details.

        1. 2024-06-10_13.10.55.png
          2024-06-10_13.10.55.png
          201 kB
        2. 2024-06-10_13.11.02.png
          2024-06-10_13.11.02.png
          203 kB
        3. 2024-06-10_13.11.14.png
          2024-06-10_13.11.14.png
          201 kB
        4. 2024-06-10_13.11.19.png
          2024-06-10_13.11.19.png
          199 kB

            Unassigned Unassigned
            S123996412 S123996412
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: