CoreLib Actions
When EmakiCooking is enabled, it adds nutrition, threshold recheck, and recipe reward actions to the CoreLib action registry. They can be used by other module action lists, CoreLib action templates, or action chains triggered through CoreLib's ActionExecutor.
This page documents only CoreLib actions registered by EmakiCooking. CoreLib built-in actions are documented in CoreLib Actions. Current action IDs use only the canonical names below; historical aliases are no longer registered.
Action IDs
| Action ID | Operation | Description |
|---|---|---|
emakicookingaddnutrition | Add nutrition | Adds to one nutrition type's current value. |
emakicookingremovenutrition | Remove nutrition | Removes from one nutrition type's current value. |
emakicookingsetnutrition | Set nutrition | Sets one nutrition type's current value. |
emakicookingclearnutrition | Clear nutrition | Sets one type or all types to their configured min. |
emakicookingresetnutrition | Reset nutrition | Sets one type or all types to their configured default. |
emakicookingrechecknutritionthreshold | Recheck thresholds | Rechecks nutrition thresholds for an online player without clearing edge state. |
emakicookingrunrecipereward | Run recipe reward | Delivers one loaded recipe outcome through CookingRewardService. |
Add/remove/set nutrition
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type | STRING | Yes | — | Nutrition type ID. |
amount | STRING | Yes | — | Nutrition value or expression. |
target | STRING | No | Context player | Target player name or UUID. Empty means the action-context player. |
silent | BOOLEAN | No | false | Whether to suppress optional output. |
actions:
- 'emakicookingaddnutrition type=satiety amount=5'
- 'emakicookingremovenutrition type=hydration amount=3 silent=true'
- 'emakicookingsetnutrition target=PlayerName type=hydration amount=80'Clear/reset nutrition
emakicookingclearnutrition sets nutrition to each type's min; emakicookingresetnutrition sets it to each type's default. Empty type processes all registered nutrition types.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type | STRING | No | "" | Nutrition type ID. Empty means all types. |
target | STRING | No | Context player | Target player name or UUID. |
silent | BOOLEAN | No | false | Whether to suppress optional output. |
actions:
- 'emakicookingclearnutrition type=hydration'
- 'emakicookingresetnutrition target=PlayerName'Threshold recheck
emakicookingrechecknutritionthreshold rechecks nutrition thresholds for an online player. It fails if the nutrition or threshold system is disabled or unavailable.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
target | STRING | No | Context player | Target online player name or UUID. |
silent | BOOLEAN | No | false | Whether to suppress optional output. |
actions:
- 'emakicookingrechecknutritionthreshold target=PlayerName'Recipe reward action
emakicookingrunrecipereward finds a loaded recipe and delivers configured outputs/actions through CookingRewardService. It does not create an ad-hoc recipe; recipe must already be loaded by a station recipe loader.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
recipe | STRING | Yes | — | Recipe ID. |
station | STRING | No | "" | Station folder name. Empty searches all station loaders. |
outcome | STRING | No | success | Outcome path or short name, such as success, perfect, or result.success. |
target | STRING | No | Context player | Target online player name or UUID. |
drop_result | BOOLEAN | No | false | Whether outputs should drop at the player location instead of going to inventory. |
include_outputs | BOOLEAN | No | true | Whether to deliver configured outputs. |
include_actions | BOOLEAN | No | true | Whether to execute configured actions. |
phase | STRING | No | Auto-generated | Action phase override. |
silent | BOOLEAN | No | false | Whether to suppress optional output. |
actions:
- 'emakicookingrunrecipereward recipe=apple_pie station=oven outcome=success target=PlayerName'
- 'emakicookingrunrecipereward recipe=tea outcome=result.perfect drop_result=true include_actions=false'Notes
- When
targetis empty, a player context must exist. In console-triggered or playerless action chains, provide an online player name or UUID. - When
amountis an expression, numeric placeholders and action-context attributes are available as variables. Expressions that cannot be parsed evaluate to 0. - If the nutrition system, threshold system, or recipe reward service is not ready, the corresponding action fails instead of silently doing nothing.