CONTENT CONTRACT · VERSION 1
task_worked
A villager finished one round of work at its task.
Signature
{ action: TaskAction, actor: ActorRef, item: (ItemId)?, kind: "task_worked", npc: NpcId, position: Position, task: VillagerTaskId }Fields
| Name | Type | Meaning |
|---|---|---|
action | TaskAction | What it did. |
actor | ActorRef | The villager. Length: 1…256; Pattern: ^[\s\S]+$ |
item | ItemId | What the round gave or used (wood, the crop harvested, the seed sown, the fish, the dish crafted). Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: item |
kind | "task_worked" | Discriminant |
npc | NpcId | The villager's NPC definition. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: npc |
position | Position | Where it worked. |
task | VillagerTaskId | Its task. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: villager_task |
Validated example
{
"action": "planted",
"actor": "a3",
"item": "core:carrot_seeds",
"kind": "task_worked",
"npc": "core:juana",
"position": {
"map": "m1",
"x_mm": 1000,
"y_mm": 0,
"z_mm": 2000
},
"task": "core:task_farming"
}