Skip to content

Datapacks

Most of Villagers at Work is data rather than code, so a datapack can tune it, or teach it about another mod, without touching a jar. There are two kinds of files: tags, and data files in the mod’s own formats. Both are re-read by /reload.

Tags

Add to a tag the vanilla way, with a file at data/vaw/tags/<block|item|entity_type|damage_type>/<name>.json. Your entries join the defaults; "replace": true would drop them. For another mod’s ids, write {"id": "othermod:thing", "required": false} so the tag still loads when that mod is absent.

{
"values": [
{ "id": "othermod:oak_crate", "required": false }
]
}

Blocks

TagWhat it is forDefault
vaw:shelvesBlocks that count as a shelf when placed against a workstation.The twelve vanilla shelves
vaw:chestsChests that bind to a workstation, as a buffer, an armory or a terminal.Chest, trapped chest, #minecraft:copper_chests
vaw:storage_targetsVillage storage when standing alone, and a terminal when touching a workstation. The block must hold items.#minecraft:copper_chests
vaw:buffer_storage_targetsStorage that is a buffer, as a plain chest is, when touching a workstation, not a terminal. Also needs vaw:chests to bind.None; Macaw’s drawers and cabinets in its pack
vaw:workstation_containersWorkstations with an inventory of their own: villagers deposit into it, haulers empty it.Barrel
vaw:leash_phaseableBlocks a leashed animal passes through while it stays shut, such as another mod’s gates.#minecraft:fence_gates
vaw:seat_blocksBlocks a villager sits on, such as another mod’s chairs: at a table or a campfire with Villagers after Work, and at a school. After work it also lies across two side by side, and leans back only on a wool carpet; on any other block here it sits upright. vaw_after_work:seat_blocks still works and is included.Carpets
vaw:keep_clear_aroundBlocks a farmer plants nothing around, on their sides or their corners, so it can walk its field without touching them, or so a stem has room for its fruit.Cactus, melon and pumpkin stems

Items

TagWhat it is forDefault
vaw:farmer_toolsTools the farmer works with, and what the toolsmith makes for it. Tilling needs a hoe.Hoes, and knives from Farmer’s Delight or any mod using #c:tools/knife
vaw:butcher_toolsTools the butcher culls with, and what the toolsmith makes for it.Axes; with Farmer’s Delight, its knives instead
vaw:animal_feedWhat counts as feed on the butcher’s shelf. Which species it feeds is set per animal by the breeding files below.The vanilla foods of cows, sheep, goats, pigs, rabbits and chickens
vaw:compostable_surplusSeeds the farmer may compost into bone meal. Keep food out of it.Wheat, beetroot, melon, pumpkin and torchflower seeds, pitcher pods
vaw:smeltable_oreRaw ores the armorer smelts. Each needs a blast furnace recipe.Raw iron, raw gold, raw copper
vaw:armorer_ingotsIngots the armorer works straight from its shelf, without smelting.Iron, gold and copper ingots
vaw:fuelFuel a worker moves off its shelf into its workstation, such as a blast furnace or a smoker. Vanilla decides how long each burns.Coal and charcoal, bamboo, dried kelp blocks, blaze rods
vaw:station_fuelFuel the farmer puts straight into workstations’ fuel slots.Bamboo
vaw:crop_itemsItems a farmer picks up when they lie in its field.Vanilla crops, their seeds and cuttings, and Farmer’s Delight’s when it is installed
vaw:butcher_pickupWhat a butcher picks up when it lies in its area.Eggs of every kind, and raw and cooked meat; with Alex’s Mobs, its emu eggs
vaw:bottlesBottles: one is worth a trip, so a villager never waits to carry more of them to a shelf or a Chef’s kitchen.Glass bottles, potions (water bottles among them), honey bottles, and Farmer’s Delight’s milk bottle
vaw_more:two_by_two_saplingsWith More Villagers at Work: saplings the lumberjack plants only four together, on a 2×2 square, since one alone never grows.Dark oak and pale oak saplings
vaw_more:chef_never_convertsWith More Villagers at Work: what the Chef only puts into a meal that takes it as it is, never into another ingredient. Its cabinet still takes it for those meals.Honey bottles, so honey never becomes sugar
vaw_more:chef_never_makesWith More Villagers at Work: what the Chef takes ready made and never makes, so its cabinet takes nothing it is made from.Sticks and planks
vaw_after_work:displayed_foods, vaw_after_work:plated_foods, vaw_after_work:small_plated_foodsWith Villagers after Work: another mod’s foods set on dinner tables as a player sets them, alone, piled on a plate, or on a small plate.Display Delight’s
vaw_after_work:plates, vaw_after_work:small_platesWith Villagers after Work: the plates those foods stand on.Display Delight’s
vaw:villager_reserveWhat a villager keeps for itself and never deposits or delivers. The farmer and the butcher have rules of their own, and with the MCA extension MCA villagers keep only seeds.Bread, carrots, potatoes, beetroots, wheat, and the seeds villagers plant

Entity types

TagWhat it is forDefault
vaw:farm_animalsAnimals butchers breed and cull, and shepherds shear.Cow, pig, sheep, goat, rabbit, chicken
vaw:shearable_overrideOther animals a shepherd may shear. They must work with vanilla shears.Empty
vaw:seatsThings a villager rides to sit, as a player sits on a cushion: at a table or a campfire with Villagers after Work, and at a school. vaw_after_work:seats still works and is included.Cushions
vaw:carryableAnimals the butcher carries to the smoker rather than leading them.Chicken, rabbit

Be careful: many modded creatures fight back. Adding one to vaw:farm_animals can get your butcher killed.

Damage types

TagWhat it is forDefault
vaw:pricksDamage from brushing against a plant. A villager at work takes none of it, and no villager panics at it.Cactus, sweet berry bush

Data files

Every data file is a JSON file at data/<namespace>/vaw/<kind>/<name>.json, where <namespace> is your pack’s own. Ids are registry ids such as minecraft:wheat, and where an item is asked for, # marks an item tag, such as #minecraft:hoes.

  • To change a file the mod ships, put yours at the same path, for example data/vaw/vaw/crop/wheat.json. Yours replaces it.
  • To add something new, use a new file in your own namespace.
  • Two files describing the same thing, such as the same crop, soil, profession, animal or trader item, are not both used: the first is kept, and the other is refused with a warning in the log naming both files. Replace a file at its own path instead.
  • A file that is wrong is skipped with a warning in the log saying why, and never stops the reload. An id that names nothing is warned about and has no effect.
  • Files for another mod can carry Fabric’s fabric:load_conditions, so they load only when that mod does and stay silent otherwise. This is how the bundled Farmer’s Delight support works:
{
"fabric:load_conditions": [
{ "condition": "fabric:all_mods_loaded", "values": ["farmersdelight"] }
],
"block": "farmersdelight:rice_panicles",
"mode": "break_produce",
"tools": ["#farmersdelight:tools/knives", "#minecraft:hoes", "empty_hand"]
}

requirement_set: what a profession needs on its shelf

One file per profession, listing groups of items in order. A missing mandatory group is what the error icon shows.

FieldRequiredWhat it does
professionyesThe profession, such as minecraft:toolsmith. Only the twelve professions the mod works with are accepted.
groupsyesThe groups, checked in order.
groups[].kindyesall_of: every member. one_of: any one member. at_least_one_of_all: each member is optional, but an empty shelf is an error. exclusive_sets: one complete set out of several, given as sets.
groups[].membersyes, except for exclusive_setsThe items, or #tags. A potion is named by what it holds, such as a water bottle: {"item": "minecraft:potion", "potion": "minecraft:water"}. A plain minecraft:potion means any potion.
groups[].setsfor exclusive_setsA list of sets, each a list of members written as above.
groups[].mandatoryno, default trueWhether the villager is blocked without this group.
groups[].iconnoThe item the error icon shows when this group is missing. Must be an item, not a tag.
groups[].per_usenoHow many of a member one piece of work uses, such as {"minecraft:stick": 2}. Default 1.
groups[].maxnoThe member’s cap: how deep the slot is stocked, such as {"minecraft:iron_ingot": 16}. The shelf asks for more whenever it holds less. Default: the member’s per_use, and it may never be below it. restockCaps in the config overrides it per item.
groups[].keep_lastnotrue, or a list of members: the last item of each stack stays on the shelf, so everyone can see what the shelf is for.
groups[].needed_withnoA list of items or #tags: the group counts only while the shelf holds one of them. For example, a group needed with #vaw:smeltable_ore counts only while raw ore is on the shelf.
groups[].never_orderednoA list of members that meet the group but that no villager or trader brings: they are yours to stock. The armorer’s ingots.
groups[].always_orderednoA list of members the shelf asks for whenever it holds less than their cap, even before you have stocked them once, and even in an optional group. The beekeeper’s bone meal. A member can’t be both this and never_ordered.
{
"profession": "minecraft:toolsmith",
"groups": [
{ "kind": "all_of", "members": ["minecraft:stick"], "per_use": { "minecraft:stick": 2 } },
{ "kind": "one_of", "icon": "minecraft:iron_ingot",
"members": ["#minecraft:iron_tool_materials", "#minecraft:stone_tool_materials"] }
]
}

crop: how the farmer harvests a plant

One file per plant block.

FieldRequiredWhat it does
blockyesThe plant.
modeyesbreak_and_replant: harvest and replant from the drops, like wheat. break_produce: break the produce and leave the plant, like melons, or, with stacking, cane and bamboo. pick_in_place: pick it without breaking it, like sweet berries. base: never harvested itself, only the plant under produce that is, like rice under its panicles.
toolsyes, except for baseWhat it is harvested with, best first: items, #tags, or "empty_hand". The farmer uses the first it has; with none of them, it leaves the plant alone.
seedfor break_and_replantThe item that replants it. Without one the crop is never replanted or sown.
stackingno, default falseFor break_produce: the plant grows in segments, harvested once it is two tall, leaving the bottom one.
pick_loot_tablefor pick_in_placeThe loot table picking rolls.
after_pick_property, after_pick_valuefor pick_in_placeThe block-state property picking resets, and the value it resets to. The plant is ripe when the property is above that value.
pick_soundnoA sound to play on picking.
{
"block": "minecraft:sweet_berry_bush",
"mode": "pick_in_place",
"pick_loot_table": "minecraft:harvest/sweet_berry_bush",
"after_pick_property": "age",
"after_pick_value": "1",
"tools": ["empty_hand"],
"pick_sound": "minecraft:block.sweet_berry_bush.pick_berries"
}

To stop the farmer harvesting a plant, you do not need a datapack: list it in the doNotHarvest configuration option.

tillable: ground the farmer may till

FieldRequiredWhat it does
sourceyesThe ground.
resultyesThe farmland it becomes.
priorityno, default 0Higher is tilled first, so a better soil is preferred.
{ "source": "farmersdelight:rich_soil", "result": "farmersdelight:rich_soil_farmland", "priority": 10 }

breeding: what an animal is bred with

FieldRequiredWhat it does
entityyesThe animal. It must also be in vaw:farm_animals.
foodyesThe item or #tag it is fed and bred with. A butcher tends the species whose food is on its shelf.
{ "entity": "minecraft:cow", "food": "#minecraft:cow_food" }

variant_key: how an animal’s variants are told apart

A butcher always leaves at least one of each variant, and a shepherd tells its sheep apart by colour this way.

FieldRequiredWhat it does
entityyesThe animal.
accessoryesnone for an animal without variants, dye_color for a colour, or variant.
nbtnoThe saved-data key the variant is read from. Defaults to Color for dye_color and variant for variant.
{ "entity": "minecraft:rabbit", "accessor": "variant", "nbt": "RabbitType" }

workstation_tool: which tool a workstation needs, and who makes it

FieldRequiredWhat it does
workstationyesThe workstation block.
tool_tagyesThe tag of tools it uses, such as #vaw:farmer_tools.
made_byyesThe profession that makes them. When it is minecraft:toolsmith, the toolsmith forges one for a station whose shelf has none.
{ "workstation": "minecraft:composter", "tool_tag": "#vaw:farmer_tools", "made_by": "minecraft:toolsmith" }

armory_stock: what a maker keeps in its armory

For the armorer, weaponsmith, fletcher and leatherworker. A maker works only while its armory holds less than this.

FieldRequiredWhat it does
professionyesThe maker.
piecesyesWhat it keeps, restocked in this order.
pieces[].keyyesA name for the piece.
pieces[].itemsyesThe item or #tag that counts as this piece, whatever it is made of.
pieces[].countno, default 1How many to keep.
{
"profession": "minecraft:fletcher",
"pieces": [
{ "key": "bow", "items": "minecraft:bow" },
{ "key": "arrows", "items": "minecraft:arrow", "count": 64 }
]
}

enchantable_output: what a maker’s enchanted books go on

A maker with an enchanted book on its shelf puts it on the next matching thing it makes, and librarians deliver books only to makers listed here.

FieldRequiredWhat it does
professionyesThe maker.
itemsyesThe items or #tags of its output that take a book.
{
"profession": "minecraft:toolsmith",
"items": ["#minecraft:hoes", "#minecraft:axes", "#c:tools/knife", "#farmersdelight:tools/knives"]
}

trader_offer: what the village may buy from the wandering trader

Only raw materials: tools, weapons, armour and enchanted books are never offered, whatever a file says. These offers are the village’s own and never appear in the trades players see.

FieldRequiredWhat it does
itemyesThe item.
countno, default 1How many one purchase gives.
priceno, default 1Its price in emeralds, 1–64. The traderPrices configuration option overrides it.
{ "item": "minecraft:raw_iron", "count": 3, "price": 1 }

exchange: what the cleric turns into what

FieldRequiredWhat it does
professionyesminecraft:cleric.
inputyesWhat it takes from its shelf.
outputyesWhat it makes.

The rate is set in the configuration, with clericLapisPerStack or clericUseVanillaRates.

guard_supplier: which makers equip which guards

For a guard mod (see Extension API). Used only while a guard mod is installed.

FieldRequiredWhat it does
guard_typeyesThe guard, as the guard mod names it.
suppliersyesThe makers whose armories it takes gear from.
{ "guard_type": "mca:archer", "suppliers": ["minecraft:leatherworker", "minecraft:fletcher"] }

evening_light: which lights villagers light after work

With Villagers after Work.

FieldRequiredWhat it does
blockyesThe light, a block or a #tag of blocks. A file naming the block itself wins over one naming a tag it is in.
propertyyesThe block state property that lights it, such as lit.
eveningyesThe property’s value when lit, or a list of values: villagers set the first, and any of them counts as lit.
nightyesIts value when out, or a list, the same way.
{ "block": "#minecraft:candles", "property": "lit", "evening": "true", "night": "false" }

window_cover: which shutters and windows villagers close at night

With Villagers after Work.

FieldRequiredWhat it does
blockyesThe shutter, blind or window, a block or a #tag of blocks. A file naming the block itself wins over one naming a tag it is in.
propertyyesThe block state property that closes it, such as open.
nightyesThe property’s value when closed for the night, or a list of values: villagers set the first, and any of them counts as closed.
dayyesIts value by day, or a list, the same way. A value in neither is left alone, such as a locked window.
on_glassnotrue for a block that counts only with glass on the side it closes against, as a trapdoor on a window.
{ "block": "#minecraft:wooden_trapdoors", "property": "open", "night": "true", "day": "false", "on_glass": true }
{ "block": "#mcwwindows:windows_four", "property": "windowstate", "night": "closed", "day": ["open_left", "open_right"] }

The bundled packs

Villagers at Work comes with built-in datapacks for other mods, on by default. Each does nothing without its mod, and can be turned off like any other datapack.

PackWhat it does
Farmer’s DelightThe farmer harvests rice, tomatoes and tomatoes on ropes, and tills Rich Soil.
Alex’s MobsBison, emus and gazelles are farm animals; the butcher picks up emu eggs.
Macaw’s FurnitureIts chairs, stools, couches and chaises are seats; its drawers, wardrobes and cabinets are storage, and a station’s drop-off when touching it.