Skip to content

EmakiCodex

EmakiCodex is the vanilla-advancement codex module in the Emaki series. It defines advancement pages and nodes through advancements/*.yml, registers them as vanilla advancements, and lets commands, CoreLib actions, the public API, and gameplay triggers grant or revoke nodes.

When PacketEvents is installed, EmakiCodex can inject configured node coordinates into the client advancement tree and re-push the registered tree to online players. Without PacketEvents, advancements still register normally, but node placement is handled by the vanilla client parent tree and online players may need to reconnect after a reload to see the updated tree.

Basic information

ItemValue
Module version1.0.0
API Jaremaki-codex-api-1.0.0.jar
Main classemaki.jiuwu.craft.codex.EmakiCodexPlugin
Main command/codex
Alias/ecodex
Required dependencyEmakiCoreLib
Optional dependenciesPlaceholderAPI, PacketEvents, MythicMobs
Minimum serverPaper 1.21.8+ (api-version: 1.21.8, folia-supported: true)
JavaJava 25
Main permissionsemakicodex.use (default true), emakicodex.reload (op), emakicodex.debug (op), emakicodex.admin (op)

Pages

PageContents
Commands/codex and /ecodex subcommands, permissions, and examples.
ConfigurationThe global switches of config.yml and the lang/*.yml language files.
AdvancementsThe page and node fields of advancements/*.yml, node key rules, coordinate rules, and completion actions.
TriggersHow to write triggers.entries, the available trigger variables, and condition examples.
CoreLib ActionsActions registered by EmakiCodex into CoreLib's ActionRegistry.
APIHow third-party plugins call Codex through emaki-codex-api.

Core features

  • Vanilla advancement codex: each advancements/*.yml file is one vanilla advancement tab, with node keys like emakicodex:<page>/<node>.
  • Manual grant and revoke: administrators can manage online player progress with /codex grant and /codex revoke.
  • Action-based grants: other plugins can call Codex actions such as codex_grant_advancement, codex_revoke_advancement, and codex_reset_page from CoreLib action chains.
  • Gameplay triggers: nodes can define triggers.entries for kills, crafting, furnace extraction, fishing, brewing, taming, block breaking, mature crop harvesting, and related CoreLib gameplay events.
  • Completion actions: when a node completes, actions.complete can run CoreLib actions such as messages, rewards, or cross-module logic.
  • PacketEvents coordinate channel: when PacketEvents is installed and advancement.packet-coordinates is enabled, node x / y values are sent to the client advancement screen.

File layout

After startup, EmakiCodex mainly uses these files:

text
plugins/EmakiCodex/
├─ config.yml
├─ advancements/
│  └─ example_page.yml
└─ lang/
   ├─ zh_CN.yml
   └─ en_US.yml
PathPurpose
config.ymlMain settings for default resource release, advancement registration, PacketEvents coordinates, and trigger enablement.
advancements/*.ymlAdvancement pages. Each file defines one page, one root node, and any number of child nodes.
lang/*.ymlCommand, reload, and console messages.

Quick start

  1. Put EmakiCoreLib-*.jar and EmakiCodex-*.jar into the server plugins/ directory.
  2. Do not put emaki-codex-api-*.jar into plugins/; the API Jar is only for developer compile dependencies.
  3. After first startup, inspect plugins/EmakiCodex/advancements/example_page.yml.
  4. After editing or adding pages, run:
text
/codex reload
  1. Grant the sample node for testing:
text
/codex grant Steve example/first_step

The full key form also works:

text
/codex grant Steve emakicodex:example/first_step

Advancement page quick view

One advancements/*.yml file defines one advancement page:

  • Page level: page_id (the key path prefix), title, background, root.
  • Node level: icon, title, description, frame, parent, x / y, toast, announce, hidden.
  • Node completion actions go in actions.complete, gameplay triggers in triggers.entries. Trigger conditions use CoreLib condition groups with condition.type and condition.entries.

Nodes register as emakicodex:<page_id>/<node_id>. See Advancements for the full field tables, key rules, and coordinate rules, and Triggers for trigger variables and condition examples.

Notes

  • EmakiCodex currently focuses on vanilla advancement codex features and no longer provides recipe/JEI transfer features.
  • Nodes are completed through Codex grants: commands, actions, the public API, or triggers award the internal codex criterion.
  • actions.complete only runs on the first completion; granting an already completed node does not repeat completion actions.
  • If coordinates are enabled, configure x / y for every node in a page to avoid mixing explicit coordinates with client auto-layout.