MCTOOLBOX
MC ToolboxMC TOOLBOX

April 15, 2026

Commands & Data

How to Create Custom Datapacks & Advancements in Minecraft 26.x (26.1/26.2)

Learn how to write custom Java datapacks, define JSON advancement triggers, and grant custom rewards to players.

Datapacks allow map makers and server admins to customize Minecraft mechanics without installing heavy server mods or forge launchers. You can add custom recipes, loot tables, functions, and custom achievement popups!

Datapack Folder Structure

my_custom_pack/
├── pack.mcmeta
└── data/
    └── my_namespace/
        ├── advancements/
        │   └── slay_dragon.json
        └── functions/
            └── reward.mcfunction

Defining the pack.mcmeta File

In 1.21, the pack format for datapacks updated. Ensure your pack.mcmeta specifies format 65+ (Minecraft 26.x) for Minecraft 26.x compatibility. Generate valid mcmeta files instantly with our pack.mcmeta Generator.

Datapack JSON file structure and advancement tree diagram

Advancement Triggers

Advancements trigger on specific player actions, such as minecraft:player_killed_entity, minecraft:inventory_changed, or minecraft:location. You can attach a function reward to grant items or play sounds when unlocked.

Build custom JSON advancement trees with custom icons using our Advancement Generator!

Create a minimal advancement datapack

  1. Create a datapack folder with a valid pack.mcmeta for the exact Java version.
  2. Add the advancement JSON under the version-correct data/<namespace>/advancement/ path.
  3. Give the advancement a unique namespaced ID and at least one criterion.
  4. Place the pack in the world's datapacks folder and run /reload.
  5. Use /advancement grant @s only namespace:id to verify the file loads.

Debug a file that does not appear

Read the game log immediately after /reload. A missing comma, wrong directory name, invalid trigger or obsolete pack format normally produces a useful parsing message. Confirm the namespace and file path are lowercase and that the command uses the same ID.

Start with one criterion and no display section. Once the grant command works, add title, description, icon, parent and rewards incrementally. This makes it clear which addition caused a failure.

Gio Nui

Gio Nui

Independent web developer and editor of MC Toolbox. Guides are maintained alongside the site's browser-based Minecraft tools, with commands, file formats and version notes reviewed during updates.

More Guides