Skip to content

1.20.1 Datapacks

Stefano Manca edited this page Oct 16, 2026 · 2 revisions

Datapacks

Version: This guide applies to Minecraft 1.20.1 (Forge).

Everything here reloads with /reload and also works from kubejs/data/. Datapack values are the baseline; a server config value, when set, wins.

Name pools

data/<namespace>/ratworker/names/<any>.json. All files are merged into one pool.

{ "names": ["Ada", "Ben", "Carol"] }

The mod ships data/ratworker/ratworker/names/default.json (English first names, no surnames). To replace it, override that same path. The server config list acquisition.namePool, when not empty, replaces all pools.

Skins

data/<namespace>/ratworker/skins/<any>.json. Textures are normal 64x64 player skins in a resource pack or mod.

{
  "skins": [
    { "texture": "mypack:textures/entity/worker/mechanic.png", "slim": false },
    { "texture": "mypack:textures/entity/worker/doctor.png", "slim": true }
  ]
}

A recruited worker gets a random skin from the pool. A scripted contract or RatWorker.spawn can set a fixed one.

Task numbers

data/<namespace>/ratworker/task/<task path>.json sets the numbers of task <namespace>:<task path>. Any number key of the task works.

{ "hungerCost": 1.2, "range": 20, "learnXp": 50, "holdInterval": 12 }

Saved as data/ratworker/ratworker/task/crank.json, this changes the crank. Script tasks use the kubejs namespace (data/kubejs/ratworker/task/chop.json).

Manuals

data/<namespace>/ratworker/manual/<any>.json makes any item a training manual:

{ "item": "mypack:manual_crank", "task": "ratworker:crank", "xp": 0 }

xp is the worker XP it costs: 0 = free, -1 or missing = the task's learnXp.

Drinks

data/<namespace>/ratworker/drink/<any>.json, used only while thirst is on (Thirst Was Taken installed).

{ "item": "minecraft:potion", "potion": "minecraft:water", "thirst": 6, "purity": 1 }
  • potion is optional (for potion items).
  • purity is optional: 0 dirty, 1 unsafe, 2 clean. Without it the stack's own Thirst Was Taken purity is used (clean if it has none).
  • These entries win over Thirst Was Taken's values and the built-in defaults.

Tags

Tag Default Use
ratworker:drinks (items) empty Extra drinks, value 4, clean.
ratworker:empty_containers (items) glass bottle, bucket, bowl, empty thirstcanteen canteens, Thirst Was Taken bowls Left in the supply container on every supply run.
ratworker:crank_targets (blocks) create:hand_crank Blocks the crank task holds right-click on. Must have a block entity.
ratworker:recruit_spots (blocks) #minecraft:beds Where contracts work when contractRequiresSpot is on.

Recipes

The mod ships ratworker:contract, ratworker:tome_crank (only with Create) and ratworker:tome_farm. Replace or remove them with a datapack or KubeJS. A recipe that makes a manual sets its task in the result NBT:

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [ { "item": "minecraft:book" }, { "item": "minecraft:iron_axe" } ],
  "result": { "item": "ratworker:tome", "nbt": "{Task:\"kubejs:chop\"}" }
}

Clone this wiki locally