Datapacks question: Craft Enchanted Items [duplicate]
How I have handled similar ideas:
- Set the recipe's "result" to a particular item that a player is not likely to ever have in their inventory (I usually use bat_spawn_egg).
- Create an advancement that a player achieves either by crafting your custom recipe or by acquiring a bat_spawn_egg into their inventory.
- Set the reward of the advancement to trigger a custom function.
- Have the custom function remove the bat_spawn_egg from the player's inventory and add the cursed item with the NBT data.