Say I had a recipe that included diamonds. That's already possible, just put something like this in the code:
"key": {
"#": {
"item": "minecraft:diamond"
},
However, what if i wanted it to have a new item called an "Enchanted Diamond"? Of course, you can't add new items to the game with datapacks, so you'd instead have to add components to another item, for instance something useless like a poisonous potato. This is a problem, though, because whatever item I retexture, in this case a poisonous potato, will also be able to be used in the recipe. However, with my idea, you could make this problem disappear. Something like this could do the trick:
"key": {
"#": {
"item": "minecraft:diamond"
"components": {
"minecraft:custom_name": "Enchanted Diamond"
}
}
This would make it check if the diamond I put in the crafting table has the component that sets it's name to "Enchanted Diamond".
I think the ability to do this would give datapack creators the ability to do a lot more things regarding custom recipes, custom items, custom tools, etc.
Please sign in to leave a comment.
0 Comments