CONTENT CONTRACT · VERSION 1
recipe
Ingredients, reach and the one result of crafting, building or repairing.
Signature
{ hidden: (boolean)?, id: ContentId, initially_available: boolean, inputs: {ItemStack}, kind: "recipe", name: TextKey, next_morning: (boolean)?, reach_mm: PositiveDistance, result: RecipeResult, station: (TagId)?, work_minutes: (number)? }Fields
| Name | Type | Meaning |
|---|---|---|
hidden | boolean | True: the build menu and the workbench do not show it (kept for later chapters). Absent: false. |
id | ContentId | Package-qualified identity; unique within its declaring namespace. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$ |
initially_available | boolean | Whether every player may use the recipe without an unlock. |
inputs | {ItemStack} | Items debited exactly once, indexed by unique item definitions. Items: 1…16; Unique entries |
kind | "recipe" | Discriminant |
name | TextKey | Localization key for the displayed name. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: text |
next_morning | boolean | Finish the first run at the next morning instead of after a fixed duration. |
reach_mm | PositiveDistance | Maximum distance to the station or repaired structure. Range: 1…2147483647; Unit: mm |
result | RecipeResult | Exactly one craft, build or repair result. |
station | TagId | Tag a nearby station must carry; absent recipes need no station. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: tag |
work_minutes | number | World minutes per run; required at stations. Zero is explicitly immediate. Range: 0…10080 |
Validated example
{
"id": "core:arrow_craft",
"initially_available": false,
"inputs": [
{
"count": 1,
"item": "core:wood"
},
{
"count": 1,
"item": "core:stone"
}
],
"kind": "recipe",
"name": "core:arrow_craft_recipe",
"reach_mm": 3500,
"result": {
"count": 5,
"item": "core:arrow",
"kind": "craft"
},
"station": "core:workbench_station",
"work_minutes": 20
}