Recipe System
EmakiCooking recipes are stored in subdirectories under recipes/ organized by station type, with each recipe in its own YAML file.
Chopping Board Recipes
Storage path: recipes/chopping_board/
yaml
# recipes/chopping_board/cut_carrot.yml
schema_version: 1
id: "cut_carrot"
display_name: "切胡萝卜"
# Input item
input:
source: "minecraft-carrot"
# Number of cuts required
cuts_required: 3
# Durability damage to the tool per cut
tool_damage: 1
# Permission required to use this recipe (optional)
permission: ""
# Cutting result
result:
# Output item list
outputs:
- source: "minecraft-golden_carrot"
amount: 1
- source: "minecraft-carrot"
amount_range:
min: 1
max: 3
chance: 50
# Action list executed on completion (optional)
actions:
- "playsound sound=block.wood.break volume=1.0 pitch=1.2"
# Override global cut_damage settings (optional)
damage_override:
chance: 20
value: 1Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
schema_version | int | Yes | Fixed to 1 |
id | string | Yes | Unique recipe identifier |
display_name | string | Yes | Display name |
input.source | string | Yes | Input item source |
cuts_required | int | Yes | Number of cuts required |
tool_damage | int | No | Tool durability damage per cut (default 1) |
permission | string | No | Usage permission |
result.outputs | list | Yes | Output item list |
result.actions | list | No | Actions executed on completion |
damage_override | object | No | Override global cut_damage settings |
Wok Recipes
Storage path: recipes/wok/
yaml
# recipes/wok/simple_stew.yml
schema_version: 1
id: "simple_stew"
display_name: "简易炖菜"
# Ingredient list (order-sensitive)
ingredients:
- source: "minecraft-beef"
amount: 2
stir_rule: ">=3" # Stir rule: each ingredient must be stirred at least 3 times
- source: "minecraft-carrot"
amount: 1
stir_rule: ">=2"
# Required heat level (0 means no restriction)
heat_level: 1
# Total stir count range
stir_total:
min: 5
max: 15
# Fault tolerance — how many ingredients can fail their stir_rule and still count as success
fault_tolerance: 0
# Usage permission (optional)
permission: ""
# Result branches
result:
# Success
success:
outputs:
- source: "minecraft-mushroom_stew"
amount: 1
actions:
- "playsound sound=entity.player.burp volume=1.0 pitch=1.0"
- "sendmessage message=<green>美味的炖菜出锅了!"
# Undercooked (insufficient stirring)
undercooked:
outputs:
- source: "minecraft-suspicious_stew"
amount: 1
actions:
- "sendmessage message=<yellow>似乎还没炒熟..."
# Overcooked (too much stirring or timeout)
overcooked:
outputs:
- source: "minecraft-charcoal"
amount: 1
actions:
- "sendmessage message=<red>烧焦了!"
# Invalid (random failure or complete mismatch)
invalid:
outputs:
- source: "minecraft-charcoal"
amount: 1Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
ingredients | list | Yes | Ingredient list, order-sensitive |
ingredients[].source | string | Yes | Ingredient item source |
ingredients[].amount | int | Yes | Ingredient quantity |
ingredients[].stir_rule | string | No | Stir rule expression (e.g., >=3, ==5, <=10) |
heat_level | int | No | Required heat level (0 = no restriction) |
stir_total.min | int | No | Minimum total stir count |
stir_total.max | int | No | Maximum total stir count |
fault_tolerance | int | No | Number of ingredients allowed to fail stir_rule (default 0) |
result.success | object | Yes | Success branch |
result.undercooked | object | No | Undercooked branch |
result.overcooked | object | No | Overcooked branch |
result.invalid | object | No | Invalid branch (uses global invalid_result_source when not configured) |
Result Determination Logic
1. Timeout check → Exceeded timeout_ms without stirring → overcooked
2. Total stir count < stir_total.min → undercooked
3. Total stir count > stir_total.max → overcooked
4. Random failure check → failure.chance% probability → invalid
5. Per-ingredient stir_rule check:
- Failed count <= fault_tolerance → success
- Over-stirred > under-stirred → overcooked
- Under-stirred > over-stirred → undercooked
- Equal → invalidGrinder Recipes
Storage path: recipes/grinder/
yaml
# recipes/grinder/bone_meal.yml
schema_version: 1
id: "bone_meal"
display_name: "骨粉研磨"
# Input item
input:
source: "minecraft-bone"
# Grinding time (seconds)
grind_time_seconds: 5
# Usage permission (optional)
permission: ""
# Grinding result
result:
outputs:
- source: "minecraft-bone_meal"
amount: 3
- source: "minecraft-bone_meal"
amount: 1
chance: 30
actions:
- "playsound sound=block.grindstone.use volume=1.0 pitch=0.8"Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
schema_version | int | Yes | Fixed to 1 |
id | string | Yes | Unique recipe identifier |
display_name | string | Yes | Display name |
input.source | string | Yes | Input item source |
grind_time_seconds | int | Yes | Grinding time (seconds) |
permission | string | No | Usage permission |
result.outputs | list | Yes | Output item list |
result.actions | list | No | Actions executed on completion |
Steamer Recipes
Storage path: recipes/steamer/
yaml
# recipes/steamer/steamed_cod.yml
schema_version: 1
id: "steamed_cod"
display_name: "清蒸鳕鱼"
# Input item
input:
source: "minecraft-cod"
# Required total steam
required_steam: 100
# Usage permission (optional)
permission: ""
# Steaming result
result:
output:
source: "minecraft-cooked_cod"
amount: 1
actions:
- "playsound sound=block.fire.extinguish volume=0.5 pitch=1.5"Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
schema_version | int | Yes | Fixed to 1 |
id | string | Yes | Unique recipe identifier |
display_name | string | Yes | Display name |
input.source | string | Yes | Input item source |
required_steam | int | Yes | Required total steam |
permission | string | No | Usage permission |
result.output | object | Yes | Output item (single) |
信息
The steamer recipe's result uses output (singular), not outputs (plural list) like other stations. Each steamer slot produces only one item.
Default Recipe Overview
| Recipe ID | Station | Input | Output | Description |
|---|---|---|---|---|
cut_carrot | Chopping Board | Carrot | Golden Carrot | 3 cuts |
bone_meal | Grinder | Bone | Bone Meal ×3 | 5 seconds grinding |
simple_stew | Wok | Beef ×2 + Carrot ×1 | Mushroom Stew | Requires heat level 1 |
steamed_cod | Steamer | Cod | Cooked Cod | Requires 100 steam |
Item Source Format Rules
All source fields in recipes use CoreLib's item source shorthand format:
{provider}-{identifier}| Source Type | Format Example | Description |
|---|---|---|
| Vanilla | minecraft-diamond_sword | Minecraft vanilla item |
| CraftEngine | craftengine-my_namespace:my_item | CraftEngine custom item |
| MMOItems | mmoitems-SWORD:FIRE_BLADE | MMOItems item |
| ItemsAdder | itemsadder-custom_food | ItemsAdder item |
| NeigeItems | neigeitems-my_item | NeigeItems item |
Note
Item sources use - as the separator, not :. For example, minecraft-diamond_sword, not minecraft:diamond_sword.