Skip to content

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/reset This function should be called from the #minecraft:load.json file 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>/trigger This function should be called from the <namespace>:<...>/<advancement name>.json file 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.

Clone this wiki locally