Gives or takes (unlocks or locks) recipes for players.
Syntax
- Java Edition
recipe (give|take) <targets> *
- Gives or takes all recipes from that player.
recipe (give|take) <targets> <recipe>
- Gives or takes a specified recipe from that player.
- Bedrock Edition
recipe give <victim: target> *
- Gives all recipes to that player.
recipe take <victim: target> *
- Takes all recipes from that player.
recipe give <victim: target> <recipe: string>
- Gives a specified recipe to that player.
recipe take <victim: target> <recipe: string>
- Takes a specified recipe from that player.
Arguments
give|take
- If
give, the recipe will be given (unlocked) for the player. Iftake, the recipe will be taken (locked) for the player.
JE: <target>: entity
BE: victim: 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[Java Edition only]. And the target selector must[JE only]/should[BE only] be of player type.
JE: <recipe>: resource_location
BE: recipe: string: basic_string
- Specifies a recipe to give or take.
Result
| Command | Trigger | Java Edition |
|---|---|---|
| any | the arguments are not specified correctly | Unparseable |
<target> fails to resolve to one or more online players | Failed | |
| does not give or take any recipe from any player | ||
| 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. |
History
| Java Edition | |||||
|---|---|---|---|---|---|
| 1.12 | 17w13a | Added /recipe. | |||
| Bedrock Edition | |||||
| Recipe Unlocking (Experimental) | beta 1.20.10.21 | Added /recipe behind the "Recipe Unlocking" experimental toggle. | |||
| beta 1.20.20.20 | Updated the syntax to match Java Edition. | ||||
| beta 1.20.20.21 | /recipe is no longer behind the "Recipe Unlocking" experimental toggle. | ||||
See also
- Knowledge Book
/gamerule doLimitedCrafting– Whether players should only be able to craft recipes that they have unlocked first.