Recipes

Every data-driven recipe type a Java Edition data pack can define β€” crafting, cooking, stonecutting and smithing β€” with full schemas, the ingredient and result formats, and copy-pasteable examples. Primary syntax targets 1.21+ (singular recipe/ folder).

Recipe file basics

Each recipe is one JSON file at data/<namespace>/recipe/<path>.json. The file path is the recipe ID: the crafting book and the /recipe command reference it as namespace:path. The type field selects the recipe kind. All recipes share the optional fields below; individual types add their own.

FieldTypeApplies toMeaning
typestring (required)allThe recipe serializer, e.g. minecraft:crafting_shaped.
groupstringmostRecipes sharing a group stack into one recipe-book slot.
categorystringcrafting / cookingRecipe-book tab. Crafting: building, redstone, equipment, misc. Cooking: food, blocks, misc.
show_notificationbooleancraftingWhether unlocking pops a toast. Default true.
⚠ Version differences
  • Since 1.21 (pack_format 48): the folder is singular β€” data/<ns>/recipe/. Before 1.21: it was plural recipes/.
  • Since 1.20.5 (pack_format 41): results and item NBT use the data-component system (see The result object). Before 1.20.5: results used {item, count, nbt} with an SNBT string.
  • Since 1.21.2 (24w33a): the ingredient format was simplified β€” the wrapper objects {"item": …} / {"tag": …} were removed (see Ingredient format).

The result object

The result is the item a recipe produces. Its shape is the single most important version split in this topic.

Eraresult shape
pre-1.20.5 (≀ pack_format 26, 1.20.4){"item": "minecraft:x", "count": 4, "nbt": "{...}"} β€” nbt is an SNBT string.
1.20.5+ (pack_format 41, snapshot 24w10a on) 1.20.5+{"id": "minecraft:x", "count": 4, "components": { … }} β€” note item β†’ id and nbt β†’ components.

count is optional (default 1). components is optional and uses the data-component map format (e.g. minecraft:custom_name, minecraft:lore, minecraft:enchantments). See Data components for the component catalogue.

⚠ Version differences
  • Since 1.20.5: result key is id; custom data lives under components.
  • Before 1.20.5: result key is item; custom data is an SNBT nbt string.

Ingredient format

An ingredient is one of three forms. Ingredients match item type only β€” they never inspect components, so you cannot require "a sword named X" as a crafting input.

FormExampleMatches
Item ID string"minecraft:stick"Exactly that item.
Tag reference (leading #)"#minecraft:planks"Any item in the tag.
List of item IDs (OR-match)["minecraft:oak_log", "minecraft:spruce_log"]Any listed item.
⚠ Version differences
  • Since 1.21.2 (24w33a): an ingredient is just an item ID, a #tag, or an array of IDs. The wrapper-object forms were removed.
  • Before 1.21.2: ingredients could also be written as {"item": "minecraft:x"} or {"tag": "minecraft:x"}.

Crafting recipes

crafting_shaped

Shaped crafting matches items in a specific grid layout.

FieldTypeMeaning
typestringminecraft:crafting_shaped
patternarray of strings1–3 rows, each 1–3 chars. A space is an empty slot. Patterns are shift-agnostic (auto-trimmed) but relative positions are preserved.
keyobjectMap of a single pattern character β†’ an ingredient (item, #tag, or list).
resultresult objectItem produced (see result).
category, group, show_notificationβ€”Optional shared fields.

data/<namespace>/recipe/cauldron.json

{
  "type": "minecraft:crafting_shaped",
  "category": "misc",
  "group": "optional_string",
  "show_notification": true,
  "pattern": ["XXX", "X X", "XXX"],
  "key": { "X": "minecraft:iron_ingot" },
  "result": { "id": "minecraft:cauldron", "count": 1 }
}

crafting_shapeless

Shapeless crafting matches a set of items in any arrangement.

FieldTypeMeaning
typestringminecraft:crafting_shapeless
ingredientsarray1–9 ingredients (order irrelevant).
resultresult objectItem produced.
category, groupβ€”Optional shared fields.

data/<namespace>/recipe/map_copy.json

{
  "type": "minecraft:crafting_shapeless",
  "category": "misc",
  "group": "optional_string",
  "ingredients": ["minecraft:paper", "minecraft:paper", "minecraft:paper"],
  "result": { "id": "minecraft:map", "count": 1 }
}

crafting_transmute 1.21.2+

Changes an item's type while preserving the input stack's components β€” e.g. re-colouring a shulker box while keeping its contents, or dyeing armour while keeping its trim. Added in 1.21.2 (24w38a); it replaced the hard-coded crafting_special_shulkerboxcoloring.

FieldTypeMeaning
typestringminecraft:crafting_transmute
inputingredientThe item whose components are carried over.
materialingredientThe item consumed to drive the transmute.
resultitem ID / result objectThe output item type (see version note below).
category, groupβ€”Optional shared fields.

data/<namespace>/recipe/dye_shulker_blue.json

{
  "type": "minecraft:crafting_transmute",
  "category": "misc",
  "group": "shulker_box_dye",
  "input": "minecraft:shulker_box",
  "material": "#minecraft:dyes",
  "result": "minecraft:blue_shulker_box"
}
⚠ Version differences
  • 1.21.2–1.21.4: result is a bare item-ID string.
  • Since 1.21.5 (25w02a): result also accepts count and components, like other recipes.
πŸ“Œ Note

crafting_transmute's exact snapshot pinning is well-established, but treat any result component behaviour before 1.21.5 as version-sensitive β€” verify against a recipe generator if you target older 1.21.x releases.

crafting_special_*

Special recipes are hard-coded logic that is not data-driven beyond the type. A file is just the type β€” the recipe is enabled by its presence and cannot be meaningfully customised.

data/<namespace>/recipe/firework_rocket.json

{ "type": "minecraft:crafting_special_firework_rocket" }
Known crafting_special_* IDHandles
crafting_special_armordyeDyeing leather armour.
crafting_special_bannerduplicateCopying a banner pattern.
crafting_special_bookcloningCloning a written book.
crafting_special_firework_rocketFirework rockets.
crafting_special_firework_starFirework stars.
crafting_special_firework_star_fadeAdding a fade to a firework star.
crafting_special_mapcloningCloning a filled map.
crafting_special_mapextendingExtending a map's zoom.
crafting_special_repairitemCombining two damaged items.
crafting_special_shielddecorationApplying a banner to a shield.
crafting_special_shulkerboxcoloringColouring shulker boxes. Removed 1.21.2, replaced by crafting_transmute.
crafting_special_suspiciousstewSuspicious stew from a flower.
crafting_special_tippedarrowTipping arrows with a lingering potion.
crafting_special_bundleBundle crafting (bundles era).

Cooking recipes

Four furnace-family types share an identical schema: minecraft:smelting (furnace), minecraft:blasting (blast furnace), minecraft:smoking (smoker), and minecraft:campfire_cooking (campfire).

FieldTypeMeaning
typestringOne of the four cooking types above.
ingredientingredientSingle ingredient (item, #tag, or list).
resultresult objectItem produced.
experiencedoubleXP awarded. Optional, default 0.
cookingtimeint (ticks)Optional. Vanilla defaults: smelting 200, blasting 100, smoking 100, campfire_cooking 100.
category, groupβ€”Optional. Cooking category: food, blocks, misc.

data/<namespace>/recipe/kelp_smelt.json

{
  "type": "minecraft:smelting",
  "category": "food",
  "group": "optional_string",
  "ingredient": "minecraft:kelp",
  "result": { "id": "minecraft:dried_kelp", "count": 1 },
  "experience": 0.1,
  "cookingtime": 200
}

Stonecutting

Stonecutter recipes convert one input into one output. No group/category semantics apply.

FieldTypeMeaning
typestringminecraft:stonecutting
ingredientingredientSingle input.
resultresult objectOutput; count defaults to 1.

data/<namespace>/recipe/stone_to_bricks.json

{
  "type": "minecraft:stonecutting",
  "ingredient": "minecraft:stone",
  "result": { "id": "minecraft:stone_bricks", "count": 4 }
}

Smithing recipes

smithing_transform

Transforms a base item into a new item (e.g. netherite upgrades). The base item's components are preserved in the result.

FieldTypeMeaning
typestringminecraft:smithing_transform
templateingredientSmithing template slot. Optional.
baseingredient (required)The item being upgraded; its components carry over.
additioningredientMaterial slot. Optional.
resultresult objectOutput; count defaults to 1.

data/<namespace>/recipe/netherite_chestplate.json

{
  "type": "minecraft:smithing_transform",
  "template": "minecraft:netherite_upgrade_smithing_template",
  "base": "minecraft:diamond_chestplate",
  "addition": "minecraft:netherite_ingot",
  "result": { "id": "minecraft:netherite_chestplate" }
}

smithing_trim

Applies an armour trim component to the base item. There is no result β€” the base item is modified in place.

FieldTypeMeaning
typestringminecraft:smithing_trim
templateingredientTrim template slot.
baseingredientThe trimmable armour item.
additioningredientTrim material.
patternstringTrim pattern ID (see version note).

data/<namespace>/recipe/coast_trim.json

{
  "type": "minecraft:smithing_trim",
  "template": "minecraft:coast_armor_trim_smithing_template",
  "base": "#minecraft:trimmable_armor",
  "addition": "#minecraft:trim_materials",
  "pattern": "minecraft:coast"
}
πŸ“Œ Note

The wiki reports the pattern string became required in 25w04a (1.21.5 development); before that the trim pattern was derived from the template ingredient. Treat the exact snapshot as version-sensitive β€” for stable 1.21–1.21.4 use the template-only form (omit pattern). Verify against a recipe generator before shipping.

Version-flagged types

The wiki's auto-generated Recipe page attributes two further data-driven crafting types to snapshots on the 26.x line (pack_format 88+, after 1.21.8) β€” not to 1.21.5 as some summaries claim.

TypeIntended purpose
crafting_dyeData-driven dyeing (target ingredient + dye ingredient β†’ result), intended to supersede hard-coded crafting_special_armordye.
brewingData-driven brewing recipe (input / reagent / output with potion_contents), moving brewing-stand recipes into data packs.
πŸ“Œ Note

crafting_dye and brewing do not exist as standard recipe types in 1.21–1.21.8. Their exact version pinning is unverified (sourced from an auto-generated page that mislabeled 26.x snapshots). Do not target them for a 1.21 baseline pack; confirm against a recipe generator or the wiki's data-version history before relying on them.

Tricks & best practices

🎩 Trick

Disable a vanilla recipe by placing a same-named file in the minecraft namespace of your pack (data/minecraft/recipe/<name>.json) to override it, or remove it at runtime with /recipe take @a minecraft:<name> from a load function.

🎩 Trick

Craft "custom items" without mods: put unique components (custom custom_data, custom_model_data, attributes) on a recipe result, then pair with a resource-pack model keyed on custom_model_data. See the example below.

data/<namespace>/recipe/custom_named_sword.json (1.20.5+ components in result)

{
  "type": "minecraft:crafting_shapeless",
  "category": "equipment",
  "ingredients": ["minecraft:netherite_sword", "minecraft:nether_star"],
  "result": {
    "id": "minecraft:netherite_sword",
    "count": 1,
    "components": {
      "minecraft:custom_name": "{\"text\":\"Starblade\",\"color\":\"gold\"}",
      "minecraft:enchantments": { "levels": { "minecraft:sharpness": 5 } },
      "minecraft:rarity": "epic"
    }
  }
}
πŸ’‘ Best practice
  • Tag-driven ingredients (#tag) make one recipe accept many inputs (e.g. any log).
  • group collapses many variants into one recipe-book slot to reduce clutter.
🚧 Workaround

Ingredients ignore components β€” you cannot require "a sword named X" as a crafting ingredient in vanilla. Use a crafting_transmute or crafting_special pattern, or detect the item with predicates plus /clear and /give in a function instead.

Sources