customadvancements/customadvancements/ the first time that folder is created. They form a small, self-contained advancement tree: a root tab, a simple task child, and a reward-bearing task that chains off the second. Together they demonstrate every common pattern you will encounter when writing your own advancements.
All three files belong to the customadvancements namespace. If you deleted them and want them back, remove the customadvancements/customadvancements/ folder and restart the game — the mod recreates it and copies the examples in again.
1. Root Advancement — root.json
A root advancement defines an entirely new tab in the advancement screen. It has noparent field, and its display block must include a background — a root without one fails validation and is skipped. The minecraft:tick trigger fires every game tick, so the root completes silently the moment any player logs in.
root.json
background— Points atscreenshot.png, one of the two example images the mod copies intocustomadvancements/data/textures/. A file in that folder is referenced ascustomadvancements:textures/<filename>. See Textures.largeBackground,shouldBgClip,bgRatio— The three mod-specific fields that make the image fill the whole panel at its correct proportions instead of tiling. ThebgRatiovalue here is simply the example image’s width divided by its height. See Backgrounds.show_toast: falseandannounce_to_chat: false— Root advancements that complete on every login should never fire notifications; these two flags suppress both the toast overlay and the chat broadcast.hidden: false— The root is always visible in the tab, so there is no reason to hide it.minecraft:ticktrigger — The simplest possible trigger. Noconditionsblock is needed because the tick trigger always fires unconditionally.translatetitles — The strings live incustomadvancements/data/lang/en_us.jsonand three other locale files, also copied in by the mod. See Language Files.
2. Simple Task — example.json
A standard child advancement linked to the root above. It completes as soon as dirt appears anywhere in the player’s inventory, triggering a toast and a chat announcement.example.json
parent: "customadvancements:root"— Links this advancement as a child ofroot.json. The resource location is the namespace (customadvancements) plus the file path without the.jsonextension (root).frame: "task"— Renders the standard square frame around the icon. Use"goal"for a rounded frame or"challenge"for the ornate frame on more difficult objectives.minecraft:inventory_changedtrigger — Fires whenever the player’s inventory changes. Theconditions.itemsarray narrows it to fire only when at least oneminecraft:dirtitem is present. Note the singular"item"key — that is the Minecraft 1.18.2 item predicate format.- No
background— Child advancements never need one; the field would be ignored anyway. - No
requirementsfield — With only one criterion, omittingrequirementsmeans that single criterion must be satisfied, which is equivalent to[["requirement"]].
3. Task with Rewards — back_to_the_roots.json
This advancement chains offexample.json and requires the player to kill an adult zombie while holding rotten flesh in their main hand. On completion it grants 50 experience points.
back_to_the_roots.json
minecraft:player_killed_entitytrigger — Fires when the player lands the killing blow on any entity.conditions.entity— An array of condition objects the killed entity must match. The single entry usesminecraft:entity_propertiesto assert that the entity is aminecraft:zombieand is not a baby (is_baby: false).conditions.killing_blow— Inspects the damage source. Thedirect_entity.equipment.mainhand.itemsarray requires the player to be holdingminecraft:rotten_fleshin their main hand when the kill lands.requirements— Explicitly lists the single criterion. With only one criterion this is optional, but including it makes the intent obvious.rewards.experience: 50— Awards 50 XP points directly to the player on completion. See Criteria for the other reward types.- Field order — Note that
parentandcriteriacome beforedisplayin this file. JSON object key order is irrelevant; the mod reads fields by name.
Using Vanilla Advancements as Templates
Writing advancement JSON from scratch is tedious when you are not sure what a complexconditions block should look like. The /ca generate advancement all command exports every currently loaded advancement — vanilla and mod-added alike — as a ready-to-edit JSON file placed into customadvancements/<namespace>/.