The Labor Board
For how the Labor Board plays, see Work. There are three kinds of files in the data pack for the board: labor_board/levels.json controls the levels, pet_task/ controls the kinds of slips, and loot_table/pet_task/ controls the pay for finishing a slip.
Levels
labor_board/levels.json decides how many levels the board has, how many slips each level puts up a day, and how much it costs to upgrade to that level:
{
"levels": [
{ "slips": 3 },
{ "slips": 4, "price": 16 },
{ "slips": 5, "price": 32 }
]
}The first level is the board as it is when first placed, so it has no price. You can add more levels, with up to 31 slips per level. There is only one copy of this file, so to change it, replace it entirely.
Slips
Each file under pet_task/ is one kind of slip. The mod comes with five: Weeding, Advanced Weeding, Monster Hunting, Monster Shooting and Street Performance. Take Advanced Weeding as an example:
{
"capability": "chiikawa:farmer",
"counter": "chiikawa:weed",
"icon": "minecraft:tall_grass",
"amount": { "type": "minecraft:uniform", "min_inclusive": 16, "max_inclusive": 32 },
"reward": "chiikawa:pet_task/advanced_weeding",
"weight": 2,
"min_level": 2,
"requires": { "qualification": "chiikawa:weeding", "min_rank": 3 }
}| Field | Meaning |
|---|---|
capability | Which job can take it: chiikawa:farmer, chiikawa:fencer, chiikawa:archer, chiikawa:musician |
counter | What work counts towards progress, see below |
icon | The icon drawn on the board and on screens |
amount | How much work to do, either a fixed number or a vanilla random number |
reward | What is given on finishing, as a loot table |
weight | Optional, the weight for being drawn when slips are put up, 1 by default |
min_level | Optional, the board level at which this kind of slip starts being put up, 1 by default |
requires | Optional, which licence and at least what grade is needed to take it |
There are four kinds of counter: chiikawa:weed pulls up one weed, chiikawa:pick_mushroom picks one mushroom, chiikawa:slay defeats one hostile mob, and chiikawa:play_music_second plays for one second.
min_rank in requires follows the grades of the original series: 5 is the lowest, grade 5, and 1 is the highest, grade 1. Writing 3 means holding a grade 3 licence or higher.
None of the mod's own slips use mushroom picking, which makes it a good example. Under your own namespace, create data/my_pack/pet_task/mushroom_picking.json:
{
"capability": "chiikawa:farmer",
"counter": "chiikawa:pick_mushroom",
"icon": "minecraft:red_mushroom",
"amount": { "type": "minecraft:uniform", "min_inclusive": 4, "max_inclusive": 8 },
"reward": "my_pack:pet_task/mushroom_picking"
}Then write data/my_pack/loot_table/pet_task/mushroom_picking.json as the pay, and the board will start putting up mushroom picking slips. The slip name and progress shown on screen come from the resource pack's language file, under the keys pet_task.my_pack.mushroom_picking and pet_task.my_pack.mushroom_picking.amount. Write the latter like %s mushrooms, where %s is replaced by the amount of work to do.
Pay
Pay is a vanilla loot table under loot_table/pet_task/, and what it rolls goes straight into the pet's backpack. For money, use the chiikawa:currency tag instead of naming emeralds directly, so that changing the currency doesn't mean changing the pay.
The mod also adds a loot condition, chiikawa:qualification, which decides whether a pool is given based on the licence the pet holds. Weeding slips work this way: a grade 5 licence gets 1 more emerald, grade 4 one more again, and so on up to grade 1:
{
"rolls": 1,
"conditions": [
{ "condition": "chiikawa:qualification", "qualification": "chiikawa:weeding", "min_rank": 3 }
],
"entries": [
{ "type": "minecraft:tag", "name": "chiikawa:currency", "expand": true }
]
}