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-forge-api</artifactId><version>4.7.11</version><scope>provided</scope></dependency>repositories { maven("https://repo.crypticlib.com/repository/maven-public/") }
dependencies { compileOnly("emaki.jiuwu.craft:emaki-forge-api:4.7.11") }Compile only — never install, shade, or relocate this jar
EmakiForge embeds these un-relocated API/event classes. A duplicate copy makes listeners and static bridge types incompatible.
Use EmakiForgeApi.status().usable(). catalog(), operations(), and the currently empty experimental extensions() accessor are non-null. install, uninstall, and Bridge are internal.
Catalog
recipes, recipe, materialById, and materialByItem are any-thread reads. Player-scoped matchRecipe, validate, experimental previewResult, and experimental mastery require the player's owner thread. validate represents a rule refusal as Success<ForgeValidation> with allowed()==false; accepting() reports whether new attempts are accepted.
Programmatic forging
operations().forgeAsync(player, recipeId, inputs) is experimental and accepts calls from any thread. It uses the real preparation, validation, actions, quality, delivery, history, and event path, dispatching Bukkit work to the player's owner thread. Its future carries EmakiResult<ForgeOutcome>; cancelling the future cannot undo an attempt that crossed the delivery commit boundary.
ForgeInputs is detached escrow: it clones target, blueprint, required-material, and optional-material stacks on construction and access. The caller must reserve/commit/release the physical inventory items itself. ForgeOutcome exists only after a successful committed delivery and contains canonical recipe id, cloned result item, quality id, and multiplier. Chance failure, cancellation, rejection, and infrastructure failure are outer result failures, not outcomes.
Other operations are owner-thread GUI/book access, viewingRecipeBook, refreshItem, and refreshPlayer; no extra pipeline is invented by extensions().
Results
Use Success, Partial, Failure, and optionalValue(). Failure kinds: UNAVAILABLE, NOT_FOUND, INVALID_INPUT, REJECTED, CANCELLED, TARGET_OFFLINE, WRONG_THREAD, INTERNAL_ERROR.