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

    | Type | Name | Description | | ------------------------------------------------------------- | ------------------ | ---------------------------------------------------------------------------- | | minecraft:blasting | Blasting | Items cooked in a Blast furnace | | minecraft:campfire_cooking | Campfire cooking | Items cooked on a Campfire | | minecraft:crafting_decorated_pot | Decorated pot | Decorated pot recipe | | minecraft:crafting_shaped | Crafting shaped | Items and their placement | | minecraft:crafting_shapeless | Crafting shapeless | Only items recipe | | minecraft:crafting_special_* | Crafting special | Special crafting methods | | minecraft:crafting_transmute | Crafting transmute | Items trasmuted into other items | | minecraft:smelting | Smelting | Items cooked in a Furnace | | minecraft:smithing_transform | Smithing | Items crafted in a Smithing table | | minecraft:smithing_trim | Smithing trim | Items trimmed in a Smithing table | | minecraft:smoking | Smoking | Items cooked in a Smoker | | minecraft:stonecutting | Stonecutting | Items 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"
}
}
... ... ... ... ... ... ...