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-strengthen-api</artifactId><version>4.7.19</version><scope>provided</scope></dependency>repositories { maven("https://repo.crypticlib.com/repository/maven-public/") }
dependencies { compileOnly("emaki.jiuwu.craft:emaki-strengthen-api:4.7.19") }Compile only — never install, shade, or relocate this jar
The runtime embeds the same API classes; duplicate identities break event listeners and the bridge.
Use EmakiStrengthenApi.status().usable(), catalog(), operations(), and mastery(). install, uninstall, and Bridge are internal.
catalog() reads StrengthenState, recipe tables, previews, and success rate. Recipe tables are any-thread; live stacks use their holder owner thread, and player previews use the player owner thread. Ineligible state/preview is a successful model value, not an unavailable result.
operations() performs owner-thread attempt, transfer, GUI access, item rebuild/refresh, and player refresh. A committed failed roll is Success<AttemptResult> with success()==false; incomplete/no-layer rebuild work is Partial. EmakiResult<Unit> is used for GUI access.
mastery() returns the read-only ItemMastery layer: snapshot(ItemStack) and snapshot(Player, ItemStack) both yield EmakiResult<ItemMasteryView>, and every parameter is nullable. It falls back to an unavailable implementation when the bridge or its mastery provider is absent. Mastery writes live on operations() instead, as setMastery(ItemStack, double) and clearMastery(ItemStack).
Use optionalValue() to consume Success or Partial. Failure kinds are UNAVAILABLE, NOT_FOUND, INVALID_INPUT, REJECTED, CANCELLED, TARGET_OFFLINE, WRONG_THREAD, and INTERNAL_ERROR.