-
Notifications
You must be signed in to change notification settings - Fork 0
Advancement
Mqx edited this page May 5, 2026
·
5 revisions
If your datapack creates advancements, the following directory structure should exist:
Datapack/
├─ pack.mcmeta
└─ data/
└─ <namespace>/
├─ advancement/
│ └─ <...>/
│ └─ <advancement name>.json
└─ function/
└─ advancement/
├─ reset.mcfunction
└─ <...>/
└─ <advancement name>/
├─ <additional functions...>.mcfunction
└─ trigger.mcfunction-
<...>The advancment can also be nested in subdirectories. The directory structure should be the same as the functions structure to avoid naming collisions. -
<namespace>:advancement/resetThis function should be called from the#minecraft:load.jsonfile when the datapack is started. All advancements for each player are reset by this function. -
<namespace>:advancement/<...>/<advancement name>/<additional functions...>These functions should be specific to this advancement and not complex. -
<namespace>:advancement/<...>/<advancement name>/triggerThis function should be called from the<namespace>:<...>/<advancement name>.jsonfile when the advancement is triggered, and serves as an entry point from which to call other functions. There should be no complex logic built into this function.
Note
Sometimes an advancement needs additional functions for the actual functionality. If this is the case, we do not want the user to separate the functionality from the actual advancement, as this functionality should still be part of the actual advancement. If this functionality is not part of the actual advancement, then you should move the functionality to another location within your application. This ensures a clean structure.