Skip to content

Recipe locks

Lyof429 edited this page Jun 10, 2025 · 3 revisions

< Back to homepage


Recipe locks, primarily meant for pack developpers, allow users to define conditions for certain recipes to be usable.

When attempting to use a recipe for which conditions are not meant, the crafting table will refuse to yield a result and display a message explaining how to unlock it.

Currently, recipes can be locked behind experience levels or advancements.

Compat: Because advancements can be granted through in game commands, mods such as Questlog can use this feature to lock recipes behind quests (just make a dummy, non obtainable, non displayed advancement, grant it as a quest reward, and make it the lock for the desired recipe).

Compat: Locked recipes are displayed in EMI too (as are all of Sortilege's new recipe types).

EMI Lock Demo

Configuration

All recipe locks are defined through the config file, at experience.recipe_locks.

This config element is a map, with each entry being like recipeid: condition.

  • If the condition is an integer, the recipe will be locked to players whose experience level is less than this number.
  • If the condition is a string, the recipe will be locked behind the advancement having it as an id.

At the moment, only one lock can be set for each recipe.

Theoretically, any crafting table recipe can be locked, as long as it has a valid identifier.


"recipe_locks": {
  "minecraft:ender_eye": 30,
  "minecraft:beacon": "minecraft:nether/summon_wither"
}

With this:

  • The recipe of id minecraft:ender_eye will be locked behind level 30.

  • The recipe of id minecraft:beacon behind the advancement minecraft:nether/summon_wither (Granted when a player summons a Wither by vanilla).

Keep in mind that the id of a recipe is not necessarily the id of the item it crafts. For instance, the recipe to dye leather items is minecraft:armor_dye.

Clone this wiki locally