Skip to content

Public API

Compile-time dependency

xml
<repositories><repository><id>jiuwu-releases</id><url>https://repo.crypticlib.com/repository/maven-public/</url></repository></repositories>
<dependency><groupId>emaki.jiuwu.craft</groupId><artifactId>emaki-cooking-api</artifactId><version>4.2.9</version><scope>provided</scope></dependency>
kotlin
repositories { maven("https://repo.crypticlib.com/repository/maven-public/") }
dependencies { compileOnly("emaki.jiuwu.craft:emaki-cooking-api:4.2.9") }

Compile only — never install, shade, or relocate this jar

EmakiCooking embeds this API unchanged; shading or relocating creates incompatible event and bridge classes.

Use EmakiCookingApi.status().usable(). nutrition(), catalog(), and operations() are non-null; install, uninstall, and Bridge are internal. Nutrition configuration is separate: nutrition().enabled() may be false while cooking remains usable.

CookingNutrition exposes values, add/remove/set changes, applyFood, threshold rechecks, and type definitions. applyFood and recheckThresholds require the player's owner thread. CookingCatalog lists/looks up recipes by CookingStationType, matches one-input recipes, reads station snapshots, and tracks recentStation; matching with a player needs that player owner, and stationAt needs location ownership.

CookingOperations.createOutputs(stationType, recipeId) builds every configured success output as detached items on any suitable thread; invalid individual outputs can yield Partial. completionConditionPasses(recipeId, player) requires the player owner thread and rejects ambiguous recipe ids across station loaders. There is no public recipe-execution operation.

Success, Partial, and Failure remain distinct; optionalValue() reads either payload. Failure kinds are UNAVAILABLE, NOT_FOUND, INVALID_INPUT, REJECTED, CANCELLED, TARGET_OFFLINE, WRONG_THREAD, and INTERNAL_ERROR.