Skip to content

Advancements ​

Writing advancements/*.yml means knowing which fields pages and nodes accept, how node keys are formed, how client coordinates take effect, and what runs after a node completes

Keep one sentence in mind: each advancements/*.yml file defines one vanilla advancement tab. Everything below is organized into four parts: page and node fields, registration key rules, the PacketEvents coordinate channel, and completion actions

NOTE

Only vanilla advancements are covered here. The category entries in codex/*.yml are a separate model whose category_id does not substitute for page_id here; see Category GUI

For automatic grants, see Triggers

advancements/*.yml ​

Basic structure:

yaml
page_id: "example"
title: "<gradient:#F59E0B:#EC4899>Codex Example</gradient>"
background: "minecraft:textures/gui/advancements/backgrounds/adventure.png"
root: "root"

advancements:
  root:
    icon: "minecraft-enchanted_book"
    title: "<gold>Codex Path</gold>"
    description: "<gray>Start your journey.</gray>"
    frame: "task"
    x: 0.0
    y: 1.0
    toast: false
    announce: false
    hidden: false
    actions:
      complete: []

Page fields:

FieldTypeRequiredDefaultAllowed valuesDescription
page_idstringNoemptynon-blank stringPage ID and key path prefix; a page with a blank page_id is skipped. Example nodes register as emakicodex:example/root
titleMiniMessage stringNopage_idMiniMessageAdvancement tab title
backgroundstringNominecraft:textures/gui/advancements/backgrounds/stone.pngresource-pack texture pathVanilla advancement background texture path, such as minecraft:textures/gui/advancements/backgrounds/adventure.png
rootstringNoemptylocal node IDLocal ID of the root node; must exist under advancements, otherwise the whole page is skipped
advancementsmapNoemptykeys are local node IDsNode definitions

Node fields:

FieldTypeRequiredDefaultAllowed valuesDescription
iconItemSource stringNominecraft-bookCoreLib ItemSource shorthandNode icon, such as minecraft-diamond
titleMiniMessage stringNonode IDMiniMessageNode title
descriptionMiniMessage stringNoemptyMiniMessageNode description
framestringNotasktask / goal / challengeVanilla frame style; unknown values fall back to task
parentstringNoemptylocal node IDLocal parent node ID; omit for the root. Empty or missing means the node is a root
xnumberNo0.0any doubleUI X coordinate, effective only through the PacketEvents coordinate channel
ynumberNo0.0any doubleUI Y coordinate, effective only through the PacketEvents coordinate channel
hiddenbooleanNofalsetrue / falseWhether the node stays hidden until completed
toastbooleanNotruetrue / falseWhether vanilla shows a completion toast
announcebooleanNoadvancement.announce_defaulttrue / falseWhether completion is broadcast; falls back to config.yml advancement.announce_default when omitted
actions.completelist<string>NoemptyCoreLib action lineCoreLib action lines executed on first completion
triggers.entrieslistNoemptytrigger listAutomatic grant trigger entries, see Triggers

Node key rules ​

EmakiCodex registers nodes as:

text
emakicodex:<page_id>/<node_id>

Examples:

text
emakicodex:example/root
emakicodex:example/first_step
emakicodex:example/challenge

Commands, API calls, and actions can use either short example/first_step IDs or full emakicodex:example/first_step keys

PacketEvents coordinate rules ​

For coordinates to take effect, x / y must meet all three conditions before they reach the client advancement UI:

  1. PacketEvents is installed and enabled
  2. config.yml > advancement.packet_coordinates: true
  3. At least one coordinate on the node is not 0.0

Notes:

  • x=0.0 and y=0.0 is treated as "not set", so that node falls back to client auto-layout
  • Configure coordinates for every node in the same page to avoid mixing explicit coordinates with auto-layout
  • Without PacketEvents, advancements still register normally; only coordinate injection is unavailable

While advancement.enabled: true, joining players receive one delayed advancement re-push so coordinates and the latest registration result apply right after login

Completion actions ​

actions.complete is a list of CoreLib action lines (command-style lines executed uniformly across modules) that runs when a node completes for the first time

yaml
advancements:
  first_step:
    actions:
      complete:
        - "send_message text=<green>You took your first codex step!</green>"
        - "give_item item=minecraft-diamond amount=1"

Behavior:

  • Commands, API calls, actions, and triggers all complete nodes through the same vanilla advancement completion flow
  • Granting an already completed node does not complete it again and does not repeat actions.complete
  • Actions that need a player target should only be used when the completion context has a player
  • Context variables available while actions.complete runs: advancement_id (full key), advancement_node (local node ID), advancement_title, and advancement_page (page ID)
  • Triggers: how to write triggers.entries, the available events and condition examples
  • Category GUI: the separate category-entry model, which can reference these node keys through unlock.advancements
  • Configuration: the advancement.enabled and packet_coordinates global switches
  • Commands and Permissions: granting, revoking and /codex reload
  • CoreLib Actions: granting advancements from another module's action chain