Developer Datapack Creation - Atlasroar/WandererZ GitHub Wiki
WandererZ is made up of five formerly-separate mods (core WandererZ, Jobs, RPG Difficulty, Tiered, Food Spoilage), and each one exposes its own datapack folder for overriding default settings. Player-attribute-affecting settings are changed via the config files instead (see Configuration); everything else listed below can be overridden per-world with a datapack. Party has no datapack-configurable content.
If you don't know how to create a datapack, check out the Minecraft Wiki Data Pack article and try making your first one for the vanilla game before tackling any of the sections below.
Folder path: data\wandererz\FOLDER\YOURFILE.json
Caution! Make sure you name the files differently than the existing ones.
Each locking file can choose its depending skill except for the mining and brewing list. The available skills are:
- health
- strength
- agility
- defense
- stamina
- luck
- archery
- trade
- smithing
- mining
- farming
- alchemy
There are 7 different folders for different locking things:
- block
- entity
- item
- brewing
- mining
- smithing
- crafting
The block category stands for the use of a few vanilla blocks. Example:
{
"replace": false,
"skill": "smithing",
"level": 10,
"block": "minecraft:anvil"
}"replace": has to be "true" if you want to overwrite the default setting.
"skill": has to be one of the skills listed above.
"level": is the level when the player unlocks the interaction of the block.
"block": has to be one of the following strings:
"minecraft:anvil","minecraft:barrel","minecraft:beacon","minecraft:beehive","minecraft:blast_furnace","minecraft:brewing_stand", "minecraft:cartography_table","minecraft:cauldron","minecraft:composter","minecraft:enchanting_table","minecraft:grindstone","minecraft:lectern", "minecraft:loom","minecraft:pumpkin","minecraft:smithing_table","minecraft:smoker","minecraft:stonecutter","minecraft:fletching_table","minecraft:crafting_table"
It will only cancel the interaction with the block. Custom block restrictions are also supported:
{
"replace": false,
"skill": "smithing",
"level": 10,
"block": "minecraft:custom_block",
"object": "modid:blockid"
}The enchanting table list takes an unlocking-level list inside its json file:
"enchanting": [
5,
10,
18
]Locks interaction with the set entity. Example:
{
"replace": false,
"skill": "farming",
"level": 7,
"entity": "minecraft:cow"
}"entity": has to be one of the following strings:
"minecraft:cow","minecraft:mooshroom","minecraft:sheep","minecraft:snow_golem","minecraft:villager","minecraft:wandering_trader", "minecraft:axolotl","minecraft:piglin","minecraft:wolf","minecraft:tadpole","minecraft:allay","minecraft:goat"
Custom entity restrictions are also supported:
{
"replace": false,
"skill": "smithing",
"level": 10,
"entity": "minecraft:custom_entity",
"object": "modid:entityid"
}Locks the use of items. Example:
{
"replace": false,
"skill": "archery",
"level": 10,
"item": "minecraft:crossbow"
}"item": has to be one of the following strings:
"minecraft:bow","minecraft:bucket,"minecraft:crossbow","minecraft:dragon_breath","minecraft:elytra","minecraft:fishing_rod", "minecraft:flint_and_steel","minecraft:shield","minecraft:totem_of_undying","minecraft:shears","minecraft:compass","minecraft:trident"
There are also 4 special categories: armor, axe, sword, tool. Example:
{
"replace": false,
"skill": "defense",
"level": 8,
"item": "minecraft:armor",
"material": "iron"
}It takes a fifth argument called "material" to determine which material of items will be locked. Each of these items has to be in the corresponding fabric item tag.
Custom item restrictions are also supported — use them only if the previous two options don't work:
{
"replace": false,
"skill": "smithing",
"level": 10,
"item": "minecraft:custom_item",
"object": "modid:itemid"
}Locks the use of brewing ingredient items at the brewing table. Example:
{
"replace": false,
"level": 4,
"item": [
"minecraft:golden_carrot"
]
}It locks the slots of the brewing table, so players can't insert items to brew the resulting potion before they reach the level. See the Brewing Wiki for the list of brewing items. Hardcoded to the alchemy skill.
Locks the drop from blocks. Example:
{
"replace": false,
"level": 5,
"block": [
"minecraft:coal_ore",
"minecraft:coal_block",
"minecraft:deepslate_coal_ore"
]
}The player can still break the listed blocks, but they won't drop anything and the block-breaking process is 50% slower (by default).
Restricts crafting items at the smithing table. Example:
{
"replace": false,
"level": 20,
"item": [
"minecraft:netherite_sword",
"minecraft:netherite_pickaxe"
]
}Locks the crafting recipe of the smithing table, so players can't pull out crafted result items before they reach the level. Hardcoded to the smithing skill.
Restricts crafting items at the crafting table and player GUI. Example:
{
"replace": false,
"level": 4,
"skill": "luck",
"item": [
"minecraft:stick",
"minecraft:wooden_axe"
]
}To permanently disable access to an entity, set the skill requirement higher than the maxLevel property
configured in wandererz.json5.
See data/wandererz
in the repo for the current built-in defaults.
Check out the exampleDatapack folder for
an example of how it can look. Every level is set to 0 in this pack.
WandererZ provides two advancement criterion triggers, wandererz:level and wandererz:skill.
The first one triggers when the player reaches the set level:
"criteria": {
"levelexample": {
"trigger": "wandererz:level",
"conditions": {
"level": 100
}
}
}The second one triggers when the player reaches the set skill level:
"criteria": {
"otherlevelexample": {
"trigger": "wandererz:skill",
"conditions": {
"skill_name": "health",
"skill_level": 20
}
}
}In the config, there is a developer-mode setting. When enabled, hover over an item/block in the creative
menu and press F8 (default key) to append that item/block's id to idlist.json in your Minecraft folder —
handy for building datapack JSON files without hunting down ids manually.
Folder path: data\jobsaddon\FOLDER\YOURFILE.json
Caution! Make sure you name the files differently than the existing ones.
There are 8 different folders, one per job:
- brewer
- builder
- farmer
- fisher
- lumberjack
- miner
- smither
- warrior
The structure of each file is mostly the same but has a few per-job differences. Example:
{
"5": {
"replace": false,
"items": [
"minecraft:iron_sword"
]
}
}The key ("5" in this example) is the experience given for each qualifying action within that job. Set
"replace" to true to overwrite the default datapack shipped by the mod. The meaning of the "items"
list (or other lists) depends on which job folder it's in — e.g. within smither it's item outputs from
the anvil/smithing table, within fisher it's catchable fish items.
Defines "effects" for potion brewing at the brewing table and "enchantments" for enchanting items at
the enchantment table.
{
"5": {
"replace": false,
"effects": [
"minecraft:regeneration",
"minecraft:speed",
"minecraft:water_breathing"
]
},
"10": {
"replace": false,
"effects": [
"minecraft:fire_resistance",
"minecraft:poison"
],
"enchantments": [
"minecraft:sharpness",
"minecraft:fire_aspect"
]
}
}Defines "blocks" for placing blocks on the ground. Block tags can be used — put a # in front.
{
"5": {
"replace": false,
"blocks": [
"minecraft:grass_block",
"minecraft:dirt"
]
},
"10": {
"replace": false,
"blocks": [
"minecraft:sand"
]
}
}Defines "items" for block drops like wheat and "crafting" for craftable items including smoker outputs.
{
"5": {
"replace": false,
"items": [
"minecraft:wheat"
],
"crafting": [
"minecraft:cake",
"minecraft:baked_potato"
]
}
}Defines "items" for item drops while fishing, "entities" for killing entities, and "crafting" for
craftable items.
{
"5": {
"replace": false,
"items": [
"minecraft:raw_cod"
],
"entities": [
"minecraft:cod"
],
"crafting": [
"minecraft:fishing_rod"
]
}
}Defines "blocks" for breaking these blocks.
{
"5": {
"replace": false,
"blocks": [
"minecraft:birch_log"
]
}
}Defines "blocks" for breaking these blocks.
{
"5": {
"replace": false,
"blocks": [
"minecraft:coal_ore"
]
}
}Defines "items" for craftable items including other furnace outputs.
{
"5": {
"replace": false,
"items": [
"minecraft:netherite_sword",
"minecraft:iron_ingot"
]
}
}Defines "entities" for killing them.
{
"5": {
"replace": false,
"entities": [
"minecraft:zombie"
]
}
}A few built-in tags provide extra hooks:
-
fisher_crafting_items— items which can be crafted, used for fisher experience -
farmer_crafting_items— items which can be crafted and are not a food item, for farmer experience -
farmer_breaking_items— items which are a drop from plant blocks and their instances, for farmer experience -
builder_placing_blocks— blocks which the builder can place for experience -
miner_breaking_blocks— blocks which the miner can break for experience
You can restrict recipes by their id from granting Jobs experience. The file goes in a folder called
restricted:
{
"replace": false,
"recipes": [
"minecraft:golden_sword"
]
}Jobs provides an advancement criterion trigger called jobsaddon:job_up. It triggers when the player
reaches the set job level.
"criteria": {
"miner_level_100": {
"trigger": "jobsaddon:job_up",
"conditions": {
"job_name": "miner",
"job_level": 100
}
}
}Folder path: data\rpgdifficulty\difficulty\YOURFILE.json
Most RPG Difficulty settings are global (config file), but per-dimension overrides require a datapack.
Boss modifiers apply to all mobs in the c:bosses common entity-type tag. If the mod is used on a server,
turning timeFactor to 0 is recommended.
Settings which can be overridden per-dimension:
distanceCoordinatesXdistanceCoordinatesZincreasingDistancedistanceFactorincreasingTimetimeFactorheightDistanceheightFactormaxFactorHealthmaxFactorDamagemaxFactorProtectionmaxFactorSpeedstartingFactorstartingDistancestartingTimestartingHeightpositiveHeightIncreasionnegativeHeightIncreasion
Example — stronger, faster-scaling Nether difficulty:
{
"dimension": "minecraft:the_nether",
"increasingDistance": 300,
"distanceFactor": 0.1,
"increasingTime": 60,
"timeFactor": 0.05,
"heightDistance": 30,
"heightFactor": 0.1,
"maxFactorHealth": 3.0,
"maxFactorDamage": 3.0,
"maxFactorProtection": 1.5,
"maxFactorSpeed": 2.0,
"startingFactor": 1.0,
"startingDistance": 0,
"startingTime": 0,
"startingHeight": 62,
"positiveHeightIncreasion": true,
"negativeHeightIncreasion": true
}See Player: RPG Difficulty for what each of these config fields controls in plain language.
Folder path: data\tiered\item_attributes\FOLDER\YOURFILE.json
Tiered is entirely data-driven, which means you can add, modify, and remove tier modifiers as you see fit.
Use any subfolder name you like under item_attributes to organize your files (the built-in defaults use
folders like all_armor, melee_weapons, ranged_weapons, etc.) — Caution! Make sure you name the files
differently than the existing ones.
Here's an example modifier called "Hasteful," which grants additional dig speed when any of the valid tools are held:
{
"id": "tiered:hasteful",
"verifiers": [
{
"tag": "c:pickaxes"
},
{
"tag": "c:shovels"
},
{
"tag": "c:axes"
}
],
"weight": 10,
"style": {
"color": "GREEN"
},
"attributes": [
{
"type": "generic.dig_speed",
"modifier": {
"name": "tiered:hasteful",
"operation": "MULTIPLY_TOTAL",
"amount": 0.10
},
"optional_equipment_slots": [
"MAINHAND"
]
}
]
}Tiered provides 3 custom attributes in addition to the vanilla ones: Dig Speed, Crit Chance, and Durability. Dig Speed increases block-breaking speed (think: haste), Crit Chance adds a random chance to crit when using a tool, and Durability increases the item's max durability.
Available attribute types: generic.armor, generic.armor_toughness, generic.dig_speed,
tiered:generic.durable, generic.max_health, generic.movement_speed, reach-entity-attributes:reach,
generic.luck, generic.attack_damage, tiered:generic.crit_chance, reach-entity-attributes:attack_range,
tiered:generic.range_attack_damage.
A verifier (in the "verifiers" array of a modifier file) defines whether a given item or tag is valid for
the modifier.
A specific item ID can be specified with:
"id": "minecraft:apple"and a tag can be specified with:
"tag": "c:helmets"Tiered doesn't provide its own item tags, but AutoTag — a required
dependency, bundled compatibility-wise but installed separately — generates several convention-based tags,
documented on its own repo README. Example tags AutoTag provides: c:tools, c:pickaxes, c:axes,
c:shovels, c:hoes, c:swords, c:armor, c:helmets, c:chestplates, c:leggings, c:boots, and
several more.
The "weight" field determines the commonness of the tier — higher weights increase the chance of being
applied to an item, and vice versa.
Custom NBT can be added via "nbtValues"; it supports only string, boolean, integer, and double values.
Caution! Once applied, NBT keys won't get removed if the modifier changes later — only the values update.
"nbtValues": {
"Damage": 100,
"key": "value"
}Custom tooltip borders can be set via a resource pack:
- The border texture has to be in the
assets\tiered\textures\guifolder. - The definition has to be a JSON file placed inside the
assets\tiered\tooltipsfolder. -
background_gradientcan also be set. - Gradients use hex color codes; see this gist for transparency reference.
- Check out the default datapack under
src/main/resources/assets/tiered/tooltipsin the repo for examples.
{
"tooltips": [
{
"index": 0,
"start_border_gradient": "FFBABABA",
"end_border_gradient": "FF565656",
"texture": "tiered_borders",
"decider": [
"set_the_id_here",
"tiered:common_armor"
]
}
]
}Reforging items into a different tier is done at the anvil, in a slot called "base" on the left and a slot
called "addition" on the right. The addition slot only accepts items in the tiered:reforge_addition item
tag. The base slot accepts the item's own reforging material if one exists in the datapack definition,
otherwise it falls back to the tiered:reforge_base_item tag.
Base-slot overrides go in data\tiered\reforge_items\YOURFILE.json:
{
"items": [
"minecraft:bow"
],
"base": [
"minecraft:string"
]
}The tiered:modifier_restricted item tag can be used to exclude specific items from receiving modifiers at
all, including reforging.
/tiered tier <players> common|uncommon|rare|epic|legendary|unique — forces the target players' held item
to roll the given tier.
/tiered untier <players> — removes the tier from the target players' held item.
Folder path: data\spoiledz\tags\items\FOLDER.json
Food Spoilage controls which items spoil purely through two item tags — no per-item JSON files or special
folder structure, just standard Fabric/vanilla item tags. Caution! Datapack tag files with the same path
merge with (rather than replace) the built-in defaults unless you set "replace": true.
-
spoiledz:spoiling_items— items that spoil over time (wheat, egg, milk bucket, honey bottle, cake, and more by default). -
spoiledz:non_spoiling_items— items explicitly excluded from spoilage, even if a mod/datapack elsewhere tags them as spoiling.
Important: an item spoils if it's spoiledz:spoiling_items or already has a vanilla food component
(ItemStack#isFood() — i.e. it's edible/has hunger+saturation values), unless it's also in
spoiledz:non_spoiling_items. This means most edible items from other mods (cooked dishes, raw meat, fresh
produce with a food component, etc.) already spoil automatically with zero datapack changes needed —
spoiledz:spoiling_items only needs entries for perishable items that aren't technically "food" (raw
ingredients like flour, milk, or crafting components without a food component). Use
spoiledz:non_spoiling_items to opt a food item out of spoiling (e.g. alcohol, jam, cured/dried goods —
anything shelf-stable that would otherwise auto-spoil just by being edible).
Example — adding a custom food item to the spoiling list:
{
"replace": false,
"values": [
"modid:custom_stew"
]
}Non-tag spoilage behavior (season count to fully spoil, whether crafting resets spoilage) is controlled entirely through the config screen — see Configuration and Player: Food Spoilage. As of v2.5.0, the negative effects from eating spoiled food are fixed/static (no RNG) and only trigger once an item is 25% freshness or less remaining — not datapack- or config-driven, since they're intentionally no longer configurable chance values.
WandererZ ships spoiledz:spoiling_items/spoiledz:non_spoiling_items tag entries (as optional tag
entries — {"id": "modid:item", "required": false} — so nothing breaks if the mod isn't installed) for
several popular farming/cooking mods, so their food spoils correctly out of the box with no extra setup:
| Mod | Perishable items added | Exempted (won't spoil) |
|---|---|---|
| Farmer's Delight Refabricated | raw/cooked dishes & ingredients | Smoked Ham |
| HerbalBrews | fresh herbs, brewed teas/coffee | dried teas |
| Vinery | fresh grapes, cherries, juices | all wines/ciders/mead |
| Meadow | fresh cheeses, milk, buffalo meat | — (no shelf-stable items in this mod) |
| FarmAndCharm | fresh produce & dishes | flour, yeast, barley, oat |
| Bakery | fresh baked goods | jams |
| Candlelight | fine-dining dishes | — (no shelf-stable items in this mod) |
| Brewery | snacks/dishes, raw hops | beers, whiskeys, dark brew |
This is pure data (no Java compat code, no new Gradle dependency) — if you want to tweak it for your own
pack, add/override entries in your own data/spoiledz/tags/items/*.json the same way as any other datapack
tag.