Unlocks the selected recipes in the target's recipe book
Every recipe at once, including datapack recipes. No recipe id needed.
Needs cheats on in singleplayer, or operator level 2 on a server. Works in chat and command blocks.
The /recipe command gives or takes recipe book unlocks for any player. give with * fills the whole recipe book at once, give with an id unlocks a single recipe, and take removes unlocks again. It needs cheats enabled in singleplayer or operator level 2 on a server.
Recipe unlocks are stored per player, so the command always takes a target: a player name or a selector like @s or @a. Normally recipes unlock themselves as you pick up their ingredients; give unlocks them instantly as if the player had discovered them, complete with the recipe toast in the corner, and take clears those unlocks again. Neither touches items, advancements or anything else in the world.
The important detail: by default the recipe book is only a convenience. A locked recipe can still be crafted by placing its ingredients in the grid by hand. The book only becomes a real gate when the doLimitedCrafting gamerule is on, which is exactly what adventure maps use the command for.
The generator above covers the full command: pick give or take, build the target, then choose between all recipes (*) and a single id searched from the complete recipe list of the selected version, or type any datapack id by hand.
The command has four forms: give or take, each with * or a recipe id:
Most recipe ids simply match the item they produce: minecraft:diamond_sword, minecraft:cake. When an item has more than one recipe, the alternates get descriptive suffixes, like minecraft:iron_ingot_from_nuggets and minecraft:iron_ingot_from_smelting_iron_ore. The id is the recipe's registry name, not the item's display name, so Diamond Sword in the book is still diamond_sword in the command.
/recipe give @s *
Unlocks every recipe in your own recipe book at once. The classic full-unlock command.
/recipe give @a *
Unlocks every recipe for every online player. Handy at the start of a server or a creative session.
/recipe give @p minecraft:diamond_sword
Unlocks just the diamond sword recipe for the nearest player, with the usual recipe toast.
/recipe take @a *
Empties every player's recipe book. Pair it with /gamerule doLimitedCrafting true to lock crafting behind unlocks on a map.
/recipe give @s minecraft:iron_ingot_from_nuggets
Unlocks one specific variant recipe: crafting an iron ingot from nine nuggets, not the smelting routes.
On its own, /recipe only changes what the recipe book shows. The command becomes a progression system the moment you run /gamerule doLimitedCrafting true: with that rule on, players can only craft recipes that are unlocked in their book, and everything else refuses to craft even with the right ingredients placed by hand.
The standard map-making pattern is to start players with an empty book using /recipe take @a * and then hand out recipes one at a time from command blocks as rewards: /recipe give @p minecraft:diamond_sword after a boss, a quest turn-in or a found schematic. Because unlocks are per player, each player progresses independently, and revoking a reward is a single take command.
Run /recipe give @s * in chat. You need cheats enabled in singleplayer or operator level 2 on a server. It fills your entire recipe book at once, including recipes added by datapacks. To do the same for every online player, use /recipe give @a * instead.
Not on its own. Taking a recipe only removes it from the recipe book interface; players can still craft anything by placing the ingredients in the grid manually. Combine it with /gamerule doLimitedCrafting true and players can only craft recipes that are unlocked, which turns take into a real restriction.
The usual causes: cheats are off in that world, you are not a level 2 operator on the server, or the recipe id is wrong. Most ids match the result item, like minecraft:diamond_sword, but alternate recipes add suffixes, such as minecraft:iron_ingot_from_nuggets. The target also has to be an online player, and in a command block you leave out the leading slash.
Any id in the recipe registry. Vanilla ids are usually the result item (minecraft:cake), with suffixed variants when an item has several recipes (minecraft:iron_ingot_from_smelting_iron_ore, minecraft:iron_ingot_from_nuggets). Datapack recipes use their own namespace the same way. The generator's searchable list covers every vanilla id in the selected version.
No. Unlocking a recipe only adds it to the recipe book, so it shows up in the book's search and can be clicked to ghost the pattern into the crafting grid. You still need the actual ingredients to craft it. The /recipe command never gives items; use /give for that.
Recipe unlocks are also stored as hidden advancements, so /advancement grant @s everything unlocks every recipe too, but it additionally completes every real advancement and floods the chat with announcements. /recipe give @s * touches only the recipe book and changes nothing else.
Need a recipe's exact id and ingredients? Or browse more Minecraft tools: