/recipe
< Commands
/recipe| Permission level required |
|
|---|---|
| Restrictions |
Cheat only |
{
"title": "<code>/recipe</code>",
"rows": [
{
"field": "\n* 2 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup>\n* 1 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "(link to Options article, displayed as Cheat) only<sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Gives or takes (unlocks or locks) recipes for players.
Syntax
recipe give <targets> *(Java Edition)recipe give <player: target> *(Bedrock Edition)recipe give <player: target> "*"(Bedrock Edition)- Gives (unlocks) all recipes to the player.
recipe take <targets> *(Java Edition)recipe take <player: target> *(Bedrock Edition)recipe take <player: target> "*"(Bedrock Edition)- Takes (locks) all recipes from the player.
recipe give <targets> <recipe>(Java Edition)recipe give <player: target> <recipe: string>(Bedrock Edition)- Gives (unlocks) a specified recipe to the player.
recipe take <targets> <recipe>(Java Edition)recipe take <player: target> <recipe: string>(Bedrock Edition)- Takes (locks) a specified recipe from the player.
Arguments
JE: <target>: entity
BE: player: target: CommandSelector<Player>
- Specifies the player(s) to give or take the recipe from.
- Must be a player name, a target selector or a UUID. And the target selector must/should be of player type. In Bedrock Edition, the target selector should be of player type.
JE: <recipe>: resource_location
BE: recipe: string: basic_string
- Specifies a recipe to give or take.
- Must be a resource location for an unregistered content. In Bedrock Edition, must be the ID of a recipe (namespace cannot be omitted or added), see the official document.
Result
| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable | Unparseable |
<target> or player: target fails to resolve to one or more online players. | Failed | Failed | |
player: target is a target selector that is not in player type. | N/A | Failed | |
/recipe ... * | There's no player being newly unlocked or locked any recipe. | Failed | Successful |
/recipe ... <recipe> | There's no recipe with the specified ID. | Failed | |
| There's no player being newly unlocked or locked any recipe. | |||
| Any | Otherwise | Successful | |
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | 0 | 0 | 0 |
| On success | 1 | 1 | the total number of recipes given to/taken from each player. | ||
| Any | Bedrock Edition | On fail | 0 | N/A | N/A |
/recipe ... <*|"*"> | On success | the number of specified players. | N/A | N/A | |
/recipe ... <recipe: string> | On success | the number of players whose recipe is newly unlocked/locked. | N/A | N/A |
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.12 | 17w13a | Added /recipe. | |||||
| Bedrock Edition | |||||||
| 1.20.10 Experiment | Preview 1.20.10.21 | Added /recipe behind the "Recipe Unlocking" experimental toggle. | |||||
| 1.20.30 Experiment | Preview 1.20.20.20 | Updated the syntax to match Java Edition. | |||||
| The recipes are now suggested by the command auto-complete. | |||||||
| Now an output message appears after the command is executed. | |||||||
| 1.20.30 | Preview 1.20.20.21 | /recipe is no longer behind the "Recipe Unlocking" experimental toggle. | |||||
| Preview 1.20.20.22 | Renamed the victim: target argument to player: target. | ||||||
See also
- Knowledge Book
/gamerule doLimitedCrafting– Whether players should only be able to craft recipes that they have unlocked first.