Skip to content

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 IDOperationDescription
emakicookingaddnutritionAdd nutritionAdds to one nutrition type's current value.
emakicookingremovenutritionRemove nutritionRemoves from one nutrition type's current value.
emakicookingsetnutritionSet nutritionSets one nutrition type's current value.
emakicookingclearnutritionClear nutritionSets one type or all types to their configured min.
emakicookingresetnutritionReset nutritionSets one type or all types to their configured default.
emakicookingrechecknutritionthresholdRecheck thresholdsRechecks nutrition thresholds for an online player without clearing edge state.
emakicookingrunreciperewardRun recipe rewardDelivers one loaded recipe outcome through CookingRewardService.

Add/remove/set nutrition

ParameterTypeRequiredDefaultDescription
typeSTRINGYesNutrition type ID.
amountSTRINGYesNutrition value or expression.
targetSTRINGNoContext playerTarget player name or UUID. Empty means the action-context player.
silentBOOLEANNofalseWhether to suppress optional output.
yaml
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.

ParameterTypeRequiredDefaultDescription
typeSTRINGNo""Nutrition type ID. Empty means all types.
targetSTRINGNoContext playerTarget player name or UUID.
silentBOOLEANNofalseWhether to suppress optional output.
yaml
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.

ParameterTypeRequiredDefaultDescription
targetSTRINGNoContext playerTarget online player name or UUID.
silentBOOLEANNofalseWhether to suppress optional output.
yaml
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.

ParameterTypeRequiredDefaultDescription
recipeSTRINGYesRecipe ID.
stationSTRINGNo""Station folder name. Empty searches all station loaders.
outcomeSTRINGNosuccessOutcome path or short name, such as success, perfect, or result.success.
targetSTRINGNoContext playerTarget online player name or UUID.
drop_resultBOOLEANNofalseWhether outputs should drop at the player location instead of going to inventory.
include_outputsBOOLEANNotrueWhether to deliver configured outputs.
include_actionsBOOLEANNotrueWhether to execute configured actions.
phaseSTRINGNoAuto-generatedAction phase override.
silentBOOLEANNofalseWhether to suppress optional output.
yaml
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 target is empty, a player context must exist. In console-triggered or playerless action chains, provide an online player name or UUID.
  • When amount is 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.