Skip to content

Datapack recipe

Recipes let you define how items are crafted.

  1. Create a folder named recipe in you Datapack namespace

    • Directory<datapack>
      • pack.mcmeta
      • pack.png
      • Directorydata
        • Directoryminecraft
        • Directory<namespace>
          • Directoryrecipe
  2. Create a <recipe>.json file for your recipe

  3. Choose how you want to craft your item

    TypeNameDescription
    minecraft:blastingBlastingItems cooked in a Blast furnace
    minecraft:campfire_cookingCampfire cookingItems cooked on a Campfire
    minecraft:crafting_decorated_potDecorated potDecorated pot recipe
    minecraft:crafting_shapedCrafting shapedItems and their placement
    minecraft:crafting_shapelessCrafting shapelessOnly items recipe
    minecraft:crafting_special_*Crafting specialSpecial crafting methods
    minecraft:crafting_transmuteCrafting transmuteItems trasmuted into other items
    minecraft:smeltingSmeltingItems cooked in a Furnace
    minecraft:smithing_transformSmithingItems crafted in a Smithing table
    minecraft:smithing_trimSmithing trimItems trimmed in a Smithing table
    minecraft:smokingSmokingItems cooked in a Smoker
    minecraft:stonecuttingStonecuttingItems cut in a Stonecutter
  4. Done

...
baked_potato.json
{
"type": "minecraft:campfire_cooking",
"category": "food", // Optional. Defaults to `misc`. Category inside the recipe book
"cookingtime": 600, // Optional. Default to 100. Time in milliseconds the item has to cook
"experience": 0.35, // Experience given after cooking
"ingredient": "minecraft:potato", // Item to cook
"result": {
"id": "minecraft:baked_potato" // Result item after cooking
}
}
...
cake.json
{
"type": "minecraft:crafting_shaped",
"category": "misc", // Optional. Defaults to `misc`. Category inside the recipe book
"key": { // Key-value pairs to easily describe items inside the `pattern` field
"A": "minecraft:milk_bucket",
"B": "minecraft:sugar",
"C": "minecraft:wheat",
"E": "#minecraft:eggs"
},
"pattern": [ // Recipe pattern
"AAA",
"BEB",
"CCC"
],
"result": {
"count": 1, // Optional. Defaults to 1.
"id": "minecraft:cake"
}
}
flint_and_steel.json
{
"type": "minecraft:crafting_shapeless",
"category": "equipment", // Optional. Defaults to `misc`. Category inside the recipe book
"ingredients": [
"minecraft:iron_ingot",
"minecraft:flint"
],
"result": {
"count": 1, // Optional. Defaults to 1.
"id": "minecraft:flint_and_steel"
}
}
... ... ... ... ... ... ...