Place recipe JSON files in data/<modid>/recipe/ directory.
Shaped Recipe (data/mymod/recipe/custom_shaped.json):
json Copy
{
"type" : "minecraft:crafting_shaped" ,
"pattern" : [ "ABA" , " C " , "ABA" ] ,
"key" : {
"A" : { "item" : "minecraft:iron_ingot" } ,
"B" : { "item" : "minecraft:diamond" } ,
"C" : { "item" : "mymod:simple_item" }
} ,
"result" : { "id" : "mymod:custom_sword" , "count" : 1 }
} Shapeless Recipe:
json Copy
{
"type" : "minecraft:crafting_shapeless" ,
"ingredients" : [ { "item" : "mymod:simple_item" } , { "item" : "minecraft:redstone" } ] ,
"result" : { "id" : "mymod:powered_item" , "count" : 2 }
} Smelting Recipe:
json Copy
{
"type" : "minecraft:smelting" ,
"ingredient" : { "item" : "mymod:raw_ore" } ,
"result" : { "id" : "mymod:ingot" , "count" : 1 } ,
"experience" : 0.7 ,
"cookingtime" : 200
} Smithing Transform Recipe (1.21+):
json Copy
{
"type" : "minecraft:smithing_transform" ,
"template" : { "item" : "minecraft:netherite_upgrade_smithing_template" } ,
"base" : { "item" : "mymod:diamond_tool" } ,
"addition" : { "item" : "minecraft:netherite_ingot" } ,
"result" : { "item" : "mymod:netherite_tool" }
} Tag ingredients:
json Copy
{
"type" : "minecraft:crafting_shapeless" ,
"ingredients" : [ { "tag" : "c:ingots/iron" } ] ,
"result" : { "id" : "mymod:iron_dust" , "count" : 1 }
}