Public API
Compile-time dependency
<repositories><repository><id>emaki-public</id><url>https://repo.crypticlib.com/repository/maven-public/</url></repository></repositories>
<dependency><groupId>emaki.jiuwu.craft</groupId><artifactId>emaki-codex-api</artifactId><version>1.0.5</version><scope>provided</scope></dependency>repositories { maven("https://repo.crypticlib.com/repository/maven-public/") }
dependencies { compileOnly("emaki.jiuwu.craft:emaki-codex-api:1.0.5") }Compile only — never install, shade, or relocate this jar
EmakiCodex embeds this API unchanged; a duplicate copy breaks event and bridge class identity.
Use EmakiCodexApi.status().usable(), catalog(), operations(), and extensions(). install, uninstall, and Bridge are internal. Codex works with registered Minecraft advancements and live advancement progress.
The public API currently covers only the vanilla advancement layer. The category-entry codex (unlock, activation, and claim state from codex/*.yml) has no public API contract and is managed through commands, the GUI, and configuration; do not assume matching entry methods exist because advancement methods do.
catalog() lists/lookups registered advancements and pages on any thread. completed(playerId, advancementId) reads live progress and needs the online player's owner thread. operations().grant and revoke are owner-thread writes and return EmakiResult<Unit>.
extensions().registerAdvancement(owner, AdvancementSpec) registers an owner-namespaced advancement on the server global thread and returns an owner-cleaned registration. AdvancementSpec contains id, icon, title, description, frame, optional parent key, hidden, toast, and announce options. registerTrigger(owner, AdvancementTrigger) registers an owner-cleaned trigger; it receives AdvancementTriggerContext(player, triggerId, variables) on the player owner thread, must be fast, and returns advancement ids to grant (duplicates are collapsed).
Use Success, Partial, Failure, and optionalValue(). Failure kinds are UNAVAILABLE, NOT_FOUND, INVALID_INPUT, REJECTED, CANCELLED, TARGET_OFFLINE, WRONG_THREAD, INTERNAL_ERROR.