CONTENT CONTRACT · VERSION 1
recipe
Ingredients, reach and the one result of crafting, building or repairing.
Signature
{ id: ContentId, initially_available: boolean, inputs: {ItemStack}, kind: "recipe", name: TextKey, reach_mm: PositiveDistance, result: RecipeResult, station: (TagId)? }Fields
| Name | Type | Meaning |
|---|---|---|
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 |
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 |
Validated example
{
"id": "core:arrow_craft",
"initially_available": true,
"inputs": [
{
"count": 1,
"item": "core:wood"
},
{
"count": 1,
"item": "core:stone"
}
],
"kind": "recipe",
"name": "core:arrow_craft_recipe",
"reach_mm": 2000,
"result": {
"count": 5,
"item": "core:arrow",
"kind": "craft"
}
}