Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Recipe (Bedrock Edition): Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Remove broken links to missing pages
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
 
Line 5: Line 5:
== Obtaining ==
== Obtaining ==


Recipes can be obtained in various ways. Acquiring an item from the recipe causes the player to automatically discover it. Recipes can also be granted using the {{cmd|recipe}} command.
Recipes can be obtained in various ways. Acquiring an item from the recipe causes the player to automatically discover it. Recipes can also be granted using the {{MC/Cmd|recipe}} command.


Once a recipe has been discovered, it is added to the player's recipe book.
Once a recipe has been discovered, it is added to the player's recipe book.


== Usage ==
== Usage ==
{{main|Recipe book}}
{{MC/Main|Recipe book}}


Discovered recipes can be found in the player's recipe book. However, recipes do not need to be discovered for the player to be able to use them, unless the {{gmr|doLimitedCrafting}} game rule is enabled. The game rule {{gmr|recipesUnlock}} can be used to disable the unlocking of recipes, making them all accessible and visible.
Discovered recipes can be found in the player's recipe book. However, recipes do not need to be discovered for the player to be able to use them, unless the {{gmr|doLimitedCrafting}} game rule is enabled. The game rule {{gmr|recipesUnlock}} can be used to disable the unlocking of recipes, making them all accessible and visible.
Line 19: Line 19:


== JSON format ==
== JSON format ==
Vanilla recipes are stored as separate [[Minecraft:JSON]] files in the {{code|behavior_packs/vanilla/recipes}} or {{code|behavior_packs/<version> /recipes}} within the game files.
Vanilla recipes are stored as separate [[Minecraft:JSON]] files in the {{MC/Code|behavior_packs/vanilla/recipes}} or {{MC/Code|behavior_packs/<version> /recipes}} within the game files.


Vanilla recipes can be easily accessed in the {{code|behavior_pack/recipes}} folder on the [https://github.com/mojang/bedrock-samples official sample github] for addons.
Vanilla recipes can be easily accessed in the {{MC/Code|behavior_pack/recipes}} folder on the [https://github.com/mojang/bedrock-samples official sample github] for addons.


Custom recipe files are stored in the {{code|behavior_packs/<add-on name>/recipes}} in a [[Minecraft:add-on]], but it is allowed to add the recipe to a subfolder, allowing the creation of new recipes and the editing of vanilla recipes.
Custom recipe files are stored in the {{MC/Code|behavior_packs/<add-on name>/recipes}} in a [[Minecraft:add-on]], but it is allowed to add the recipe to a subfolder, allowing the creation of new recipes and the editing of vanilla recipes.


Recipe JSON files have different structures depending on their type. These types are listed below.
Recipe JSON files have different structures depending on their type. These types are listed below.
Line 33: Line 33:


<div class="treeview">
<div class="treeview">
* {{nbt|compound}}: The root tag.
* {{MC/Nbt|compound}}: The root tag.
** {{nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{cd|1.20.10}}.
** {{MC/Nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{MC/Cd|1.20.10}}.
** {{nbt|compound|minecraft:recipe_shaped}}: Used to define the recipe type.
** {{MC/Nbt|compound|minecraft:recipe_shaped}}: Used to define the recipe type.
*** {{nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
*** {{MC/Nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
**** {{nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
**** {{MC/Nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
*** {{nbt|string}}{{nbt|list|tags}}: Defines where the recipe can be used. This can be a {{code|crafting_table}} or a custom crafting table tag.
*** {{MC/Nbt|string}}{{MC/Nbt|list|tags}}: Defines where the recipe can be used. This can be a {{MC/Code|crafting_table}} or a custom crafting table tag.
*** {{nbt|string|group}}: Optional used only for information as it has no known use.
*** {{MC/Nbt|string|group}}: Optional used only for information as it has no known use.
*** {{nbt|list|pattern}}: A list of single-character keys used to describe a pattern for creating shapes. Each row in the creation grid is a sequence in this list containing 3 or fewer keys. All strings in this list must have the same number of keys. A space can be used to indicate empty space.
*** {{MC/Nbt|list|pattern}}: A list of single-character keys used to describe a pattern for creating shapes. Each row in the creation grid is a sequence in this list containing 3 or fewer keys. All strings in this list must have the same number of keys. A space can be used to indicate empty space.
*** {{nbt|compound|key}}: All keys used for this crafting recipe with shape.
*** {{MC/Nbt|compound|key}}: All keys used for this crafting recipe with shape.
**** {{nbt|compound|A key}}:
**** {{MC/Nbt|compound|A key}}:
***** {{nbt|string|item}}: Used to define an item or block with the id example {{code|minecraft:emerald_block}}.
***** {{MC/Nbt|string|item}}: Used to define an item or block with the id example {{MC/Code|minecraft:emerald_block}}.
***** {{nbt|string|data}}: Optional. Integer or [[Minecraft:Molang]] expression for dynamic variants.
***** {{MC/Nbt|string|data}}: Optional. Integer or [[Minecraft:Molang]] expression for dynamic variants.
***** {{nbt|string|tag}}: Used to define an [[Minecraft:Item tag (Bedrock Edition)|item tag]] example {{code|minecraft:planks}} also accepts custom tags.
***** {{MC/Nbt|string|tag}}: Used to define an [[Minecraft:Item tag (Bedrock Edition)|item tag]] example {{MC/Code|minecraft:planks}} also accepts custom tags.
*** {{nbt|list|unlock}}: Defines the items that unlock the recipe when caught.
*** {{MC/Nbt|list|unlock}}: Defines the items that unlock the recipe when caught.
**** {{nbt|compound}}:
**** {{MC/Nbt|compound}}:
**** {{nbt|string|item}}: Used to define an item or block that unlocks the recipe.
**** {{MC/Nbt|string|item}}: Used to define an item or block that unlocks the recipe.
**** {{nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{MC/Nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{nbt|string|tag}}: Used to set an item tag that unlocks the recipe, also accepts custom tags.
**** {{MC/Nbt|string|tag}}: Used to set an item tag that unlocks the recipe, also accepts custom tags.
**** {{nbt|string|context}}: Used to unlock recipes with context currently only known values are {{cd|AlwaysUnlocked}} and {{cd|PlayerInWater}}.
**** {{MC/Nbt|string|context}}: Used to unlock recipes with context currently only known values are {{MC/Cd|AlwaysUnlocked}} and {{MC/Cd|PlayerInWater}}.
*** {{nbt|compound|result}}: Defines the recipe result.
*** {{MC/Nbt|compound|result}}: Defines the recipe result.
**** {{nbt|string|item}}: Used to define an item or block that you will receive when crafting the recipe.
**** {{MC/Nbt|string|item}}: Used to define an item or block that you will receive when crafting the recipe.
**** {{nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{MC/Nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{nbt|int|count}}: Optional. Number of items manufactured example {{code|3}}.
**** {{MC/Nbt|int|count}}: Optional. Number of items manufactured example {{MC/Code|3}}.
*** {{nbt|int|priority}}: Optional, used to give priority if the same recipe exists in duplicate.
*** {{MC/Nbt|int|priority}}: Optional, used to give priority if the same recipe exists in duplicate.
</div>
</div>
'''Usage example json:'''
'''Usage example json:'''
Line 131: Line 131:


<div class="treeview">
<div class="treeview">
* {{nbt|compound}}: The root tag.
* {{MC/Nbt|compound}}: The root tag.
** {{nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{cd|1.20.10}}.
** {{MC/Nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{MC/Cd|1.20.10}}.
** {{nbt|compound|minecraft:recipe_shapeless}}: Used to set the type recipe shapeless.
** {{MC/Nbt|compound|minecraft:recipe_shapeless}}: Used to set the type recipe shapeless.
*** {{nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
*** {{MC/Nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
**** {{nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
**** {{MC/Nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
*** {{nbt|string}}{{nbt|list|tags}}: Defines where the recipe can be used. This can be {{code|crafting_table}} for the crafting table, {{code|stonecutter}} for the [[Minecraft:stonecutter]], or a custom crafting table tag.
*** {{MC/Nbt|string}}{{MC/Nbt|list|tags}}: Defines where the recipe can be used. This can be {{MC/Code|crafting_table}} for the crafting table, {{MC/Code|stonecutter}} for the [[Minecraft:stonecutter]], or a custom crafting table tag.
*** {{nbt|string|group}}: Optional used only for information as it has no known use.
*** {{MC/Nbt|string|group}}: Optional used only for information as it has no known use.
*** {{nbt|list|ingredients}}: All items used for this shapeless crafting recipe.
*** {{MC/Nbt|list|ingredients}}: All items used for this shapeless crafting recipe.
**** {{nbt|compound}}:
**** {{MC/Nbt|compound}}:
***** {{nbt|string|item}}: Used to define an item or block with the id example {{code|minecraft:emerald_block}}.
***** {{MC/Nbt|string|item}}: Used to define an item or block with the id example {{MC/Code|minecraft:emerald_block}}.
***** {{nbt|string|data}}: Optional. Integer or [[Minecraft:Molang]] expression for dynamic variants.
***** {{MC/Nbt|string|data}}: Optional. Integer or [[Minecraft:Molang]] expression for dynamic variants.
***** {{nbt|string|tag}}: Used to define an [[Minecraft:Item tag (Bedrock Edition)|item tag]] example {{code|minecraft:planks}} also accepts custom tags.
***** {{MC/Nbt|string|tag}}: Used to define an [[Minecraft:Item tag (Bedrock Edition)|item tag]] example {{MC/Code|minecraft:planks}} also accepts custom tags.
*** {{nbt|list|unlock}}: Defines the items that unlock the recipe when purchased.
*** {{MC/Nbt|list|unlock}}: Defines the items that unlock the recipe when purchased.
**** {{nbt|compound}}:
**** {{MC/Nbt|compound}}:
**** {{nbt|string|item}}: Used to define an item or block that unlocks the recipe.
**** {{MC/Nbt|string|item}}: Used to define an item or block that unlocks the recipe.
**** {{nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{MC/Nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{nbt|string|tag}}: Used to set an item tag that unlocks the recipe, also accepts custom tags.
**** {{MC/Nbt|string|tag}}: Used to set an item tag that unlocks the recipe, also accepts custom tags.
**** {{nbt|string|context}}: Used to unlock recipes with context currently only known values are {{cd|AlwaysUnlocked}} and {{cd|PlayerInWater}}.
**** {{MC/Nbt|string|context}}: Used to unlock recipes with context currently only known values are {{MC/Cd|AlwaysUnlocked}} and {{MC/Cd|PlayerInWater}}.
*** {{nbt|compound|result}}: Defines the result of the recipe.
*** {{MC/Nbt|compound|result}}: Defines the result of the recipe.
**** {{nbt|string|item}}: Used to define an item or block that you will receive when crafting the recipe.
**** {{MC/Nbt|string|item}}: Used to define an item or block that you will receive when crafting the recipe.
**** {{nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{MC/Nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{nbt|int|count}}: Optional. Number of items produced example {{code|3}}.
**** {{MC/Nbt|int|count}}: Optional. Number of items produced example {{MC/Code|3}}.
*** {{nbt|int|priority}}: Optional, used to give priority if the same recipe exists in duplicate.
*** {{MC/Nbt|int|priority}}: Optional, used to give priority if the same recipe exists in duplicate.
</div>
</div>
'''Crafting table example json:'''
'''Crafting table example json:'''
Line 245: Line 245:


<div class="treeview">
<div class="treeview">
* {{nbt|compound}}: The root tag.
* {{MC/Nbt|compound}}: The root tag.
** {{nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{cd|1.20.10}}.
** {{MC/Nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{MC/Cd|1.20.10}}.
** {{nbt|compound|minecraft:recipe_furnace}}: Used to set the type of smelting recipe.
** {{MC/Nbt|compound|minecraft:recipe_furnace}}: Used to set the type of smelting recipe.
*** {{nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
*** {{MC/Nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
**** {{nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
**** {{MC/Nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
*** {{nbt|string}}{{nbt|list|tags}}: Defines where the recipe can be used. It can be {{code|furnace}} for the standard furnace, {{code|blast_furnace}} for the blast furnace, {{code|smoker}} for the smoker, {{code|campfire}} for the campfire and {{code|soul_campfire}} for the soul campfire. Unlike it does not support custom tags.
*** {{MC/Nbt|string}}{{MC/Nbt|list|tags}}: Defines where the recipe can be used. It can be {{MC/Code|furnace}} for the standard furnace, {{MC/Code|blast_furnace}} for the blast furnace, {{MC/Code|smoker}} for the smoker, {{MC/Code|campfire}} for the campfire and {{MC/Code|soul_campfire}} for the soul campfire. Unlike it does not support custom tags.
*** {{nbt|string|group}}: Optional used only for information as it has no known use.
*** {{MC/Nbt|string|group}}: Optional used only for information as it has no known use.
*** {{nbt|compound|input}}: All items used for this smelting recipe.
*** {{MC/Nbt|compound|input}}: All items used for this smelting recipe.
**** {{nbt|string|item}}: Used to define an item or block with the id example {{code|minecraft:diamond_chestplate}}.
**** {{MC/Nbt|string|item}}: Used to define an item or block with the id example {{MC/Code|minecraft:diamond_chestplate}}.
**** {{nbt|string|data}}: Optional. Integer or [[Minecraft:Molang]] expression for dynamic variants.
**** {{MC/Nbt|string|data}}: Optional. Integer or [[Minecraft:Molang]] expression for dynamic variants.
**** {{nbt|string|tag}}: Used to define an [[Minecraft:Item tag (Bedrock Edition)|item tag]] example {{code|minecraft:planks}} also accepts custom tags.
**** {{MC/Nbt|string|tag}}: Used to define an [[Minecraft:Item tag (Bedrock Edition)|item tag]] example {{MC/Code|minecraft:planks}} also accepts custom tags.
*** {{nbt|list|unlock}}: Defines the items that unlock the recipe, but without use as there is no recipe book for smelting blocks.
*** {{MC/Nbt|list|unlock}}: Defines the items that unlock the recipe, but without use as there is no recipe book for smelting blocks.
**** {{nbt|compound}}:
**** {{MC/Nbt|compound}}:
**** {{nbt|string|item}}: Used to define an item or block that unlocks the recipe.
**** {{MC/Nbt|string|item}}: Used to define an item or block that unlocks the recipe.
**** {{nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{MC/Nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{nbt|string|tag}}: Used to set an item tag that unlocks the recipe, also accepts custom tags.
**** {{MC/Nbt|string|tag}}: Used to set an item tag that unlocks the recipe, also accepts custom tags.
**** {{nbt|string|context}}: Used to unlock recipes with context currently only known values are {{cd|AlwaysUnlocked}} and {{cd|PlayerInWater}}.
**** {{MC/Nbt|string|context}}: Used to unlock recipes with context currently only known values are {{MC/Cd|AlwaysUnlocked}} and {{MC/Cd|PlayerInWater}}.
*** {{nbt|compound|output}}: Defines the result of the recipe.
*** {{MC/Nbt|compound|output}}: Defines the result of the recipe.
**** {{nbt|string|item}}: Used to define an item or block that you will receive when crafting the recipe.
**** {{MC/Nbt|string|item}}: Used to define an item or block that you will receive when crafting the recipe.
**** {{nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{MC/Nbt|string|data}}: Optional. Integer or Molang expression for dynamic variants.
**** {{nbt|int|count}}: Optional. Number of items manufactured example {{code|3}}.
**** {{MC/Nbt|int|count}}: Optional. Number of items manufactured example {{MC/Code|3}}.
*** {{nbt|int|priority}}: Optional, used to give priority if the same recipe exists in duplicate.
*** {{MC/Nbt|int|priority}}: Optional, used to give priority if the same recipe exists in duplicate.
</div>
</div>
'''Usage example json:'''
'''Usage example json:'''
Line 309: Line 309:


<div class="treeview">
<div class="treeview">
* {{nbt|compound}}: The root tag.
* {{MC/Nbt|compound}}: The root tag.
** {{nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{cd|1.20.10}}.
** {{MC/Nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{MC/Cd|1.20.10}}.
** {{nbt|compound|minecraft:recipe_smithing_trim}}: Used to set the type of smithing recipe.
** {{MC/Nbt|compound|minecraft:recipe_smithing_trim}}: Used to set the type of smithing recipe.
*** {{nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
*** {{MC/Nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
**** {{nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
**** {{MC/Nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
*** {{nbt|string}}{{nbt|list|tags}}: Defines where the recipe can be used. It can be {{code|smithing_table}} it does not support custom tags.
*** {{MC/Nbt|string}}{{MC/Nbt|list|tags}}: Defines where the recipe can be used. It can be {{MC/Code|smithing_table}} it does not support custom tags.
*** {{nbt|compound|template}}: Used to define a template.
*** {{MC/Nbt|compound|template}}: Used to define a template.
**** {{nbt|string|tag}}: Used to set an [[Minecraft:Item tag (Bedrock Edition)|item tag]] using {{code|minecraft:trim_templates}} but has no effect on custom items with that tag.
**** {{MC/Nbt|string|tag}}: Used to set an [[Minecraft:Item tag (Bedrock Edition)|item tag]] using {{MC/Code|minecraft:trim_templates}} but has no effect on custom items with that tag.
*** {{nbt|compound|base}}: Defines the base items that will be used.
*** {{MC/Nbt|compound|base}}: Defines the base items that will be used.
**** {{nbt|string|tag}}: Used to set an item tag for the recipe being used {{code|minecraft:trimmable_armors}} Using this tag on a custom item allows the custom armor to be trimmed.
**** {{MC/Nbt|string|tag}}: Used to set an item tag for the recipe being used {{MC/Code|minecraft:trimmable_armors}} Using this tag on a custom item allows the custom armor to be trimmed.
*** {{nbt|compound|addition}}: Used to define a material.
*** {{MC/Nbt|compound|addition}}: Used to define a material.
**** {{nbt|string|tag}}: Used to set an item tag for the recipe being used {{code|minecraft:trim_materials}} using this tag on a custom item has no effect.
**** {{MC/Nbt|string|tag}}: Used to set an item tag for the recipe being used {{MC/Code|minecraft:trim_materials}} using this tag on a custom item has no effect.
</div>
</div>
'''Usage example json:'''
'''Usage example json:'''
Line 360: Line 360:


<div class="treeview">
<div class="treeview">
* {{nbt|compound}}: The root tag.
* {{MC/Nbt|compound}}: The root tag.
** {{nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{cd|1.20.10}}.
** {{MC/Nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{MC/Cd|1.20.10}}.
** {{nbt|compound|minecraft:recipe_smithing_transform}}: Used to set the type of smithing recipe.
** {{MC/Nbt|compound|minecraft:recipe_smithing_transform}}: Used to set the type of smithing recipe.
*** {{nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
*** {{MC/Nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
**** {{nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
**** {{MC/Nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
*** {{nbt|string}}{{nbt|list|tags}}: Defines where the recipe can be used. It can be {{code|smithing_table}} it does not support custom tags.
*** {{MC/Nbt|string}}{{MC/Nbt|list|tags}}: Defines where the recipe can be used. It can be {{MC/Code|smithing_table}} it does not support custom tags.
*** {{nbt|string|template}}: Used to define a netherite upgrade accepting custom items if they have the [[Minecraft:Item tag (Bedrock Edition)|item tag]] {{code|minecraft:transform_templates}}.
*** {{MC/Nbt|string|template}}: Used to define a netherite upgrade accepting custom items if they have the [[Minecraft:Item tag (Bedrock Edition)|item tag]] {{MC/Code|minecraft:transform_templates}}.
*** {{nbt|string|base}}: Defines the base items that will be used, the custom item needs to have the item tag {{code|minecraft:transformable_items}}.
*** {{MC/Nbt|string|base}}: Defines the base items that will be used, the custom item needs to have the item tag {{MC/Code|minecraft:transformable_items}}.
*** {{nbt|string|addition}}: Used to define a base material, custom items with the {{code|minecraft:transform_materials}} tag can be placed, however it does not work. The only truly valid item is the netherite ingot with the id {{code|minecraft:netherite_ingot}}.
*** {{MC/Nbt|string|addition}}: Used to define a base material, custom items with the {{MC/Code|minecraft:transform_materials}} tag can be placed, however it does not work. The only truly valid item is the netherite ingot with the id {{MC/Code|minecraft:netherite_ingot}}.
*** {{nbt|string|result}}: Used to set an item as a recipe result.
*** {{MC/Nbt|string|result}}: Used to set an item as a recipe result.
</div>
</div>
'''Usage example json:'''
'''Usage example json:'''
Line 402: Line 402:
Represents a [[Minecraft:brewing]] recipe on a brewing stand.
Represents a [[Minecraft:brewing]] recipe on a brewing stand.


Vanilla potions use this system {{code|minecraft:potion_type:<potion_effect>}} can be added {{cd|long_}} or {{cd|strong_}} for other types like {{cd|minecraft:potion_type:strong_poison}} also accepted is {{cd|minecraft:potion}}, {{cd|minecraft:splash_potion}} and {{cd|minecraft:lingering_potion}}.
Vanilla potions use this system {{MC/Code|minecraft:potion_type:<potion_effect>}} can be added {{MC/Cd|long_}} or {{MC/Cd|strong_}} for other types like {{MC/Cd|minecraft:potion_type:strong_poison}} also accepted is {{MC/Cd|minecraft:potion}}, {{MC/Cd|minecraft:splash_potion}} and {{MC/Cd|minecraft:lingering_potion}}.


<div class="treeview">
<div class="treeview">
* {{nbt|compound}}: The root tag.
* {{MC/Nbt|compound}}: The root tag.
** {{nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{cd|1.20.10}}.
** {{MC/Nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{MC/Cd|1.20.10}}.
** {{nbt|compound|minecraft:recipe_brewing_mix}}: Used to set the fermentation recipe type.
** {{MC/Nbt|compound|minecraft:recipe_brewing_mix}}: Used to set the fermentation recipe type.
*** {{nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
*** {{MC/Nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
**** {{nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
**** {{MC/Nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
*** {{nbt|string}}{{nbt|list|tags}}: Defines where the recipe can be used. {{code|brewing_stand}} does not support custom tags.
*** {{MC/Nbt|string}}{{MC/Nbt|list|tags}}: Defines where the recipe can be used. {{MC/Code|brewing_stand}} does not support custom tags.
*** {{nbt|string|input}}: Item used for this brew recipe, supports custom items and vanilla items in the format mentioned above.
*** {{MC/Nbt|string|input}}: Item used for this brew recipe, supports custom items and vanilla items in the format mentioned above.
*** {{nbt|string|reagent}}: Used to define an item or block that is used as an ingredient also supports custom items.
*** {{MC/Nbt|string|reagent}}: Used to define an item or block that is used as an ingredient also supports custom items.
*** {{nbt|string|output}}: Recipe result item, supports custom items and vanilla items in the format mentioned above.
*** {{MC/Nbt|string|output}}: Recipe result item, supports custom items and vanilla items in the format mentioned above.
</div>
</div>
'''Usage example json:'''
'''Usage example json:'''
Line 445: Line 445:
Represents a [[Minecraft:brewing]] recipe focused on changing one type into another in a brewing stand.
Represents a [[Minecraft:brewing]] recipe focused on changing one type into another in a brewing stand.


Vanilla potions use this system {{code|minecraft:potion_type:<potion_effect>}} can be added {{cd|long_}} or {{cd|strong_}} for other types like {{cd|minecraft:potion_type:strong_poison}} also accepted is {{cd|minecraft:potion}}, {{cd|minecraft:splash_potion}} and {{cd|minecraft:lingering_potion}}.
Vanilla potions use this system {{MC/Code|minecraft:potion_type:<potion_effect>}} can be added {{MC/Cd|long_}} or {{MC/Cd|strong_}} for other types like {{MC/Cd|minecraft:potion_type:strong_poison}} also accepted is {{MC/Cd|minecraft:potion}}, {{MC/Cd|minecraft:splash_potion}} and {{MC/Cd|minecraft:lingering_potion}}.


<div class="treeview">
<div class="treeview">
* {{nbt|compound}}: The root tag.
* {{MC/Nbt|compound}}: The root tag.
** {{nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{cd|1.20.10}}.
** {{MC/Nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{MC/Cd|1.20.10}}.
** {{nbt|compound|minecraft:recipe_brewing_container}}: Used to set the fermentation recipe type.
** {{MC/Nbt|compound|minecraft:recipe_brewing_container}}: Used to set the fermentation recipe type.
*** {{nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
*** {{MC/Nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
**** {{nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
**** {{MC/Nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
*** {{nbt|string}}{{nbt|list|tags}}: Defines where the recipe can be used. {{code|brewing_stand}} does not support custom tags.
*** {{MC/Nbt|string}}{{MC/Nbt|list|tags}}: Defines where the recipe can be used. {{MC/Code|brewing_stand}} does not support custom tags.
*** {{nbt|string|input}}: Item used for this brewing recipe, unlike the mix only supports vanilla potions items in the format mentioned above.
*** {{MC/Nbt|string|input}}: Item used for this brewing recipe, unlike the mix only supports vanilla potions items in the format mentioned above.
*** {{nbt|string|reagent}}: Used to define an item or block that is used as an ingredient also supports custom items.
*** {{MC/Nbt|string|reagent}}: Used to define an item or block that is used as an ingredient also supports custom items.
*** {{nbt|string|output}}: Recipe result item, supports custom items and vanilla items in the format mentioned above.  
*** {{MC/Nbt|string|output}}: Recipe result item, supports custom items and vanilla items in the format mentioned above.  
</div>
</div>
'''Usage example json:'''
'''Usage example json:'''
Line 486: Line 486:


=== recipe_material_reduction ===
=== recipe_material_reduction ===
{{education feature}}
{{MC/Education feature}}
Represents a [[Minecraft:Minecraft Education]] recipe in a material reducer.
Represents a [[Minecraft:Minecraft Education]] recipe in a material reducer.


<div class="treeview">
<div class="treeview">
* {{nbt|compound}}: The root tag.
* {{MC/Nbt|compound}}: The root tag.
** {{nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{cd|1.20.10}}.
** {{MC/Nbt|string|format_version}}: Used to set the version your recipe should work on e.g. {{MC/Cd|1.20.10}}.
** {{nbt|compound|minecraft:recipe_material_reduction}}: Used to set the recipe type of the material reducer.
** {{MC/Nbt|compound|minecraft:recipe_material_reduction}}: Used to set the recipe type of the material reducer.
*** {{nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
*** {{MC/Nbt|compound|description}}: Required in any type of recipe, it contains the identifier of a recipe.
**** {{nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
**** {{MC/Nbt|string|identifier}}: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
*** {{nbt|string|tags}}: Defines where the recipe can be used. {{code|material_reducer}} does not support custom tags.
*** {{MC/Nbt|string|tags}}: Defines where the recipe can be used. {{MC/Code|material_reducer}} does not support custom tags.
*** {{nbt|string|input}}: Item used for this recipe.
*** {{MC/Nbt|string|input}}: Item used for this recipe.
*** {{nbt|list|output}}: Defines the result of the recipe.
*** {{MC/Nbt|list|output}}: Defines the result of the recipe.
**** {{nbt|compound}}:
**** {{MC/Nbt|compound}}:
***** {{nbt|int|count}}: Optional. Number of items as result example {{code|3}}.
***** {{MC/Nbt|int|count}}: Optional. Number of items as result example {{MC/Code|3}}.
***** {{nbt|string|item}}: Used to define an item or block that you will receive when crafting the recipe.
***** {{MC/Nbt|string|item}}: Used to define an item or block that you will receive when crafting the recipe.
</div>
</div>
'''Usage example json:'''
'''Usage example json:'''
Line 532: Line 532:
== History ==
== History ==
{{HistoryTable
{{HistoryTable
|{{HistoryLine|bedrock}}
|{{MC/HistoryLine|bedrock}}
|{{HistoryLine||1.12.0|dev=beta 1.12.0.2|Introduced the recipe system for most crafting recipes.}}
|{{MC/HistoryLine||1.12.0|dev=beta 1.12.0.2|Introduced the recipe system for most crafting recipes.}}
|{{HistoryLine||1.19.40|dev=Preview 1.19.40.22|Added <code>tag</code> key to the recipe JSON format.}}
|{{MC/HistoryLine||1.19.40|dev=Preview 1.19.40.22|Added <code>tag</code> key to the recipe JSON format.}}
|{{HistoryLine||1.20.10|dev=Preview 1.20.10.20|Added <code>unlock</code> field to the recipe JSON format.}}
|{{MC/HistoryLine||1.20.10|dev=Preview 1.20.10.20|Added <code>unlock</code> field to the recipe JSON format.}}
}}
}}


== Issues ==
== Issues ==
{{Issue list}}
{{MC/Issue list}}


== External links ==
== External links ==
Line 545: Line 545:


== Navigation ==
== Navigation ==
{{Navbox Bedrock Edition}}
{{MC/Navbox Bedrock Edition}}

Latest revision as of 20:53, 9 April 2026


Recipes provide a structured way for players to perform item and block transformations in-game. Every Minecraft:crafting, smelting, Minecraft:brewing, blasting, campfire cooking, smoking, stonecutting and smithing recipe uses this system. Recipes are data driven and can be configured by Minecraft:add-ons.

Obtaining

Recipes can be obtained in various ways. Acquiring an item from the recipe causes the player to automatically discover it. Recipes can also be granted using the

  1. REDIRECT Template:Command

Template:Redr command.

Once a recipe has been discovered, it is added to the player's recipe book.

Usage

{{#vardefine:params|0 }}Template:Hatnote

Discovered recipes can be found in the player's recipe book. However, recipes do not need to be discovered for the player to be able to use them, unless the Template:Gmr game rule is enabled. The game rule Template:Gmr can be used to disable the unlocking of recipes, making them all accessible and visible.

Recipes appear in the inventory's recipe book if they are 2×2 in size, otherwise they will only appear if the player is using a crafting table.

The Minecraft:anvil, cartography table, Minecraft:loom, and Minecraft:grindstone don't use the recipe system; they use different, hardcoded systems for their mechanics.

JSON format

Vanilla recipes are stored as separate Minecraft:JSON files in the behavior_packs/vanilla/recipes or behavior_packs/<version> /recipes within the game files.

Vanilla recipes can be easily accessed in the behavior_pack/recipes folder on the official sample github for addons.

Custom recipe files are stored in the behavior_packs/<add-on name>/recipes in a Minecraft:add-on, but it is allowed to add the recipe to a subfolder, allowing the creation of new recipes and the editing of vanilla recipes.

Recipe JSON files have different structures depending on their type. These types are listed below.

recipe_shaped

Represents a crafting recipe with shape in a crafting table, the Minecraft:inventory, and the Minecraft:crafter.

The key used in the pattern can be any single character except the space character , which is reserved for empty slots in a recipe, can also be omitted to accept the recipe format in any location that has enough space. This format is the only format that accepts multiple results.

  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr and

  1. REDIRECT Template:Code

Template:Redr.

Usage example json: <syntaxhighlight lang="c++"> {

 "format_version": "1.20.10",
 "minecraft:recipe_shaped": {
   "description": {
   "identifier": "minecraft:cake"
   },


   "tags": [ "crafting_table" ],
   "pattern": [
     "AAA",
     "BEB",
     "CCC"
   ],
   "key": {
     "A": {
       "item": "minecraft:bucket",
       "data": 1
     },
     "B": {
       "item": "minecraft:sugar"
     },
     "C": {
       "item": "minecraft:wheat"
     },
     "E": {
       "tag": "minecraft:egg"
     }
   },

"unlock": [

     {
       "tag": "minecraft:egg"
     }
   ],
  "result": {
     "item": "minecraft:cake",
     "count": 1
   } // for single result
   "result": [
     { "item": "minecraft:cake" },
     { "item": "minecraft:bucket", "count": 3, "data": 0 } // to have multiple results
   ]
 }

} </syntaxhighlight>

Template:Crafting

recipe_shapeless

Represents a shapeless crafting recipe in a crafting table, Minecraft:inventory and the Minecraft:crafter, and is also used for the Minecraft:stonecutter.

The ingredient list must have at least one and a maximum of nine entries. Unlike a recipe shaped, multiple results are not possible.

  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr and

  1. REDIRECT Template:Code

Template:Redr.

Crafting table example json: <syntaxhighlight lang="c++"> {

 "format_version": "1.20.10",
 "minecraft:recipe_shapeless": {
   "description": {
   "identifier": "minecraft:flint_and_steel"
   },


   "tags": [ "crafting_table" ],
   "ingredients": [
     {
       "item": "minecraft:iron_ingot"
     },
     {
       "item": "minecraft:flint"
     }
   ],

"unlock": [

     {
       "item": "minecraft:flint"

}, { "item": "minecraft:obsidian"

     }
   ],
   "result": {
     "item": "minecraft:flint_and_steel"
   }
 }

} </syntaxhighlight>

Template:Crafting

Stonecutter Example Json: <syntaxhighlight lang="c++"> {

   "format_version": "1.20.10",
   "minecraft:recipe_shapeless": {
       "description": {
           "identifier": "minecraft:polished_deepslate_stairs_from_cobbled_deepslate_stonecutting"
       },
     "tags": ["stonecutter"],
       "ingredients": [
           {
               "data": 0,
               "item": "minecraft:cobbled_deepslate"
           }
       ],
       "unlock": [
         {
           "item": "minecraft:cobbled_deepslate"
         }
       ],
       "result": {
           "count": 1,
           "data": 0,
           "item": "minecraft:polished_deepslate_stairs"
       },
     "priority": 0
   }

} </syntaxhighlight>

Template:Stonecutting

recipe_furnace

Represents a smelting recipe in a Minecraft:furnace, blast furnace, Minecraft:smoker, Minecraft:campfire and the soul campfire.

It is not possible to set the amount of experience you will receive when smelting the item.

  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr and

  1. REDIRECT Template:Code

Template:Redr.

Usage example json: <syntaxhighlight lang="c++"> {

 "format_version": "1.20.10",
 "minecraft:recipe_furnace": {
   "description": {
   "identifier": "minecraft:furnace_log"
   },
   "unlock": [
     {
       "tag": "minecraft:logs_that_burn"
     }
   ],
   "tags": ["furnace"],
   "input": {
     "tag": "minecraft:logs_that_burn"
   },
   "output": {
     "item": "minecraft:charcoal",
     "count": 1
    },
   "priority": -1
 }

} </syntaxhighlight>

Template:Smelting

recipe_smithing_trim

Represents a smithing recipe at a smithing table for adding trims.

It is not possible to create a custom one this is for documentation purposes only.

  1. REDIRECT Template:Code

Template:Redr.

    • Template:Nbt/sprite minecraft:recipe_smithing_trim: Used to set the type of smithing recipe.
      • Template:Nbt/sprite description: Required in any type of recipe, it contains the identifier of a recipe.
        • Template:Nbt/sprite identifier: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
      • Template:Nbt/spriteTemplate:Nbt/sprite tags: Defines where the recipe can be used. It can be smithing_table it does not support custom tags.
      • Template:Nbt/sprite template: Used to define a template.
      • Template:Nbt/sprite base: Defines the base items that will be used.
        • Template:Nbt/sprite tag: Used to set an item tag for the recipe being used minecraft:trimmable_armors Using this tag on a custom item allows the custom armor to be trimmed.
      • Template:Nbt/sprite addition: Used to define a material.
        • Template:Nbt/sprite tag: Used to set an item tag for the recipe being used minecraft:trim_materials using this tag on a custom item has no effect.

Usage example json: <syntaxhighlight lang="c++"> {

 "format_version": "1.20.10",
 "minecraft:recipe_smithing_trim": {
   "description": {
     "identifier": "minecraft:smithing_armor_trim"
   },
   "tags": [ "smithing_table" ],
   "template": {
     "tag": "minecraft:trim_templates"
   },
   "base": {
     "tag": "minecraft:trimmable_armors"
   },
   "addition": {
     "tag": "minecraft:trim_materials"
   }
 }

} </syntaxhighlight>

Template:Smithing

recipe_smithing_transform

Represents a smithing recipe at a smithing table to perform a upgrading.

  1. REDIRECT Template:Code

Template:Redr.

    • Template:Nbt/sprite minecraft:recipe_smithing_transform: Used to set the type of smithing recipe.
      • Template:Nbt/sprite description: Required in any type of recipe, it contains the identifier of a recipe.
        • Template:Nbt/sprite identifier: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
      • Template:Nbt/spriteTemplate:Nbt/sprite tags: Defines where the recipe can be used. It can be smithing_table it does not support custom tags.
      • Template:Nbt/sprite template: Used to define a netherite upgrade accepting custom items if they have the item tag minecraft:transform_templates.
      • Template:Nbt/sprite base: Defines the base items that will be used, the custom item needs to have the item tag minecraft:transformable_items.
      • Template:Nbt/sprite addition: Used to define a base material, custom items with the minecraft:transform_materials tag can be placed, however it does not work. The only truly valid item is the netherite ingot with the id minecraft:netherite_ingot.
      • Template:Nbt/sprite result: Used to set an item as a recipe result.

Usage example json: <syntaxhighlight lang="c++"> {

 "format_version": "1.20.10",
 "minecraft:recipe_smithing_transform": {
   "description": {
     "identifier": "minecraft:smithing_netherite_chestplate"
   },
   "tags": [ "smithing_table" ],
   "template": "minecraft:netherite_upgrade_smithing_template",
   "base": "minecraft:diamond_chestplate",
   "addition": "minecraft:netherite_ingot",
   "result": "minecraft:netherite_chestplate"
 }

} </syntaxhighlight>

Template:Smithing

recipe_brewing_mix

Represents a Minecraft:brewing recipe on a brewing stand.

Vanilla potions use this system minecraft:potion_type:<potion_effect> can be added

  1. REDIRECT Template:Code

Template:Redr or

  1. REDIRECT Template:Code

Template:Redr for other types like

  1. REDIRECT Template:Code

Template:Redr also accepted is

  1. REDIRECT Template:Code

Template:Redr,

  1. REDIRECT Template:Code

Template:Redr and

  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr.

    • Template:Nbt/sprite minecraft:recipe_brewing_mix: Used to set the fermentation recipe type.
      • Template:Nbt/sprite description: Required in any type of recipe, it contains the identifier of a recipe.
        • Template:Nbt/sprite identifier: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
      • Template:Nbt/spriteTemplate:Nbt/sprite tags: Defines where the recipe can be used. brewing_stand does not support custom tags.
      • Template:Nbt/sprite input: Item used for this brew recipe, supports custom items and vanilla items in the format mentioned above.
      • Template:Nbt/sprite reagent: Used to define an item or block that is used as an ingredient also supports custom items.
      • Template:Nbt/sprite output: Recipe result item, supports custom items and vanilla items in the format mentioned above.

Usage example json: <syntaxhighlight lang="c++"> {

 "format_version": "1.20.10",
 "minecraft:recipe_brewing_mix": {
   "description": {
     "identifier": "minecraft:brew_awkward_poison"
   },
   "tags": [ "brewing_stand" ],
   "input": "minecraft:potion_type:awkward",
   "reagent": "minecraft:spider_eye",
   "output": "minecraft:potion_type:poison"
 }

} </syntaxhighlight> Template:Brewing

recipe_brewing_container

Represents a Minecraft:brewing recipe focused on changing one type into another in a brewing stand.

Vanilla potions use this system minecraft:potion_type:<potion_effect> can be added

  1. REDIRECT Template:Code

Template:Redr or

  1. REDIRECT Template:Code

Template:Redr for other types like

  1. REDIRECT Template:Code

Template:Redr also accepted is

  1. REDIRECT Template:Code

Template:Redr,

  1. REDIRECT Template:Code

Template:Redr and

  1. REDIRECT Template:Code

Template:Redr.

  1. REDIRECT Template:Code

Template:Redr.

    • Template:Nbt/sprite minecraft:recipe_brewing_container: Used to set the fermentation recipe type.
      • Template:Nbt/sprite description: Required in any type of recipe, it contains the identifier of a recipe.
        • Template:Nbt/sprite identifier: Required to detect the recipe in-game. The namespace can be omitted, but it is highly recommended to avoid conflicts.
      • Template:Nbt/spriteTemplate:Nbt/sprite tags: Defines where the recipe can be used. brewing_stand does not support custom tags.
      • Template:Nbt/sprite input: Item used for this brewing recipe, unlike the mix only supports vanilla potions items in the format mentioned above.
      • Template:Nbt/sprite reagent: Used to define an item or block that is used as an ingredient also supports custom items.
      • Template:Nbt/sprite output: Recipe result item, supports custom items and vanilla items in the format mentioned above.

Usage example json: <syntaxhighlight lang="c++"> {

 "format_version": "1.20.10",

"minecraft:recipe_brewing_container": {

   "description": {
     "identifier": "minecraft:brew_potion_sulphur"
   },
   "tags": [ "brewing_stand" ],
   "input": "minecraft:potion",
   "reagent": "minecraft:gunpowder",
   "output": "minecraft:splash_potion"
 }

} </syntaxhighlight> Template:Brewing

recipe_material_reduction

Template:Message boxTemplate:Article other Represents a Minecraft:Minecraft Education recipe in a material reducer.

  1. REDIRECT Template:Code

Template:Redr.

Usage example json: <syntaxhighlight lang="c++"> {

  "format_version" : "1.14",
  "minecraft:recipe_material_reduction" : {
     "description" : {
        "identifier" : "minecraft:cobblestone_wall:4"
     },
     "input" : "minecraft:andesite_wall",
     "output" : [
        {
           "count" : 33,
           "item" : "minecraft:element_14"
        },
        {
           "count" : 64,
           "item" : "minecraft:element_8"
        },
        {
           "count" : 3,
           "item" : "minecraft:element_8"
        }
     ],
     "tags" : "material_reducer"
  }

} </syntaxhighlight>

History

Template:HistoryTable

Issues

Script error: No such module "Issue list".

External links

Navigation

Editions
Merged
Ports to consoles
Discontinued
Development
Version history
Technical
Creator
Add-ons
Multiplayer
Exclusive features
Blocks
Mobs
Effects
Unused
Removed