Gives or takes (unlocks or locks) recipes for players.
Contents
Syntax[]
- Java Edition
recipe (give|take) <targets> *
- Gives or takes all recipes from the player.
recipe (give|take) <targets> <recipe>
- Gives or takes a specified recipe from the player.
- Bedrock Edition
recipe give <player: target> *
- Gives all recipes to the player.
recipe take <player: target> *
- Takes all recipes from the player.
recipe give <player: target> <recipe: string>
- Gives a specified recipe to the player.
recipe take <player: target> <recipe: string>
- Takes a specified recipe from the 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: 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[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. | |
The recipes are now suggested by the command auto-complete. | ||
Now an output message appears after the command is executed. | ||
1.20.30 | beta 1.20.20.21 | /recipe is no longer behind the "Recipe Unlocking" experimental toggle. |
beta 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.