Skip to content

Targets And Scope

Each field of a work task limits what its engine can use. No field can make an engine use a target that its code rejects.

Target fields accept resource IDs and #tag references:

{
"workstations": ["minecraft:furnace", "#example:ovens"],
"entities": ["minecraft:cow", "#example:livestock"],
"recipes": ["example:honey_cake", "#example:baked_goods"]
}

In recipes, a resource ID matches the recipe ID or the output item ID. A tag matches the tags of the output item.

Recipe and input filters also accept classification tokens:

TokenMatches
edibleAny food output.
weaponSwords, axes, tridents, maces, and modded items of the same kinds.
armorArmour and shields.
toolDigging tools, shears, flint and steel, and brushes.
blockBlock items that a player can place.
rangedProjectile weapons and arrows.
navigationMaps, compasses, and spyglasses.
bookBooks, writable books, written books, and enchanted books.

Use a token when the kind of item is easier to match than a tag. Use tags for unusual items.

An empty allow list accepts all of the default targets of the engine. A list with entries limits them.

Townstead checks deny rules first:

{
"recipes": ["edible"],
"deny_recipes": ["minecraft:rotten_flesh"]
}

The example accepts all food except rotten flesh.

Input filters check the ingredients, not the result:

{
"type": "townstead_work:smoke",
"workstations": ["#townstead:smoker_stations"],
"recipe_inputs": ["#townstead:butcher_smoker_input"]
}

With this filter, the Butcher does not make every output of a shared smoker.

ScopeSearch area
worksiteOnly the assigned workplace. This is the default, and the fastest search.
nearbyThe workplace and the area just around it.
villageAll recognised buildings in the village.

Use the smallest scope that reaches the stations. A search of the whole village is slower, and a worker can then claim a machine in a different room.

A task can use any Pheno condition:

{
"type": "townstead_work:craft",
"requirements": {
"type": "pheno:profession",
"profession": "example:beekeeper"
}
}

The condition type must be registered. If the condition is malformed, Townstead rejects the task. The task does not become available without a condition.