-
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.