There is a way!
I was searching for a way to do this and I found a creative solution.
You will need an advancement, recipe, and a function.
- The recipe should not be shapeless, and the recipe should give a knowledge book.
- The advancement should look like:
"recipe": "RECIPE NAME"
"function": "FUNCTION NAME"
- And the function should look like:
recipe take @s (RECIPE NAME)
advancement revoke @s only (ADVANCEMENT NAME)
(GIVE COMMAND FOR ITEM)
clear @s minecraft:knowledge_book
This has been super useful to me in the past, and it's the only way I know where you can use the vanilla crafting table for custom nbt recipes.
Note: There is no way to require custom nbt crafting materials unless you use a custom crafting table