Custom Crafting Recipes and Advancements in Datapacks
Two of the friendliest datapack features: add your own crafting recipes and build advancement trees that reward players. Here's how both are structured.
Recipes and advancements are a great first datapack project because they're pure data — no tick logic, no timing, just JSON describing what the player can craft and what goals they can complete. They're also genuinely useful: custom recipes rebalance progression, and advancements give a map structure and a sense of reward.
Adding a crafting recipe
A recipe file lives at data/<namespace>/recipe/<name>.json and describes a recipe type (shaped, shapeless, smelting and more), its ingredients, and its result. A shaped recipe uses a small grid of keys to lay out the pattern — for example, mapping the letter D to a diamond and arranging Ds into a shape — while a shapeless recipe just lists the ingredients in any order. Drop the file in, reload, and the recipe appears in the crafting book like any vanilla one.
- ▸type — crafting_shaped, crafting_shapeless, smelting, etc.
- ▸pattern + key — the grid layout for shaped recipes.
- ▸ingredients — the items consumed.
- ▸result — the item (and count) produced.
Building advancements
An advancement file describes a goal: an icon and title, the 'criteria' that complete it (place a block, reach a biome, obtain an item), and which advancement it branches from. Chain them by pointing each one's 'parent' at the previous, and you get a tree in the advancements screen. Advancements can also reward the player — grant loot, XP, or run a function — which makes them a clean way to trigger events in adventure maps without a constant tick scan.
Using advancements as triggers
A popular pattern uses a hidden advancement purely as an event detector: set its criteria to 'the player entered this area' or 'the player picked up this item', give it a reward that runs a function and then revokes itself, and you've built a one-shot trigger that costs nothing every tick. It's an elegant, performance-friendly alternative to constantly polling for a condition.
Build it without the busywork
Mine Mod AI turns a plain-English description into a ready-to-install Minecraft datapack or Bedrock add-on — version-correct and free to try.
Try the generator →