Configuration

Better Harvest Levels reads its configuration from config/betterharvestlevel/ when the game or server starts and whenever /bhl reload runs. Every file uses a top-level configVersion of 1.

FilePurpose
tiers.jsonDefines the named harvest tiers and their numeric order.
blocks.json and blocks*.jsonAssign required tiers to blocks.
tools.json and tools*.jsonAssign harvest tiers to items.
equivalences.jsonMakes named tiers satisfy one another regardless of their numeric order.

The configVersion field is an integer that defaults to 1. Keep it at 1 in every wrapper shown below.

tiers.json contains the tier IDs used by block overrides, tool overrides, and equivalence groups.

FieldTypeMeaning
namestringTier ID used by overrides and equivalences. hand is reserved.
levelintegerNumeric order. A tool can satisfy an equal or lower required level.
displayNamestringName shown by commands.
colorstringHex color used by command output.
builtInbooleanMarks the generated vanilla tier definitions.
iconItemitem IDJade fallback icon for the tier.

A new configuration generates these definitions. The hand tier is not written to tiers.json; Better Harvest Levels injects it internally.

NameLevelDisplay nameDefault icon
hand-1Handnone, injected internally
wood0Woodenminecraft:wooden_pickaxe
gold0Goldenminecraft:golden_pickaxe
stone1Stoneminecraft:stone_pickaxe
copper2Copperminecraft:copper_ingot
iron3Ironminecraft:iron_pickaxe
diamond4Diamondminecraft:diamond_pickaxe
netherite5Netheriteminecraft:netherite_pickaxe

Add the custom object to the generated tiers array. This complete tiers.json keeps every generated tier and adds steel, so the later examples can refer to both steel and the built-in tier IDs.

{
"configVersion": 1,
"tiers": [
{
"name": "wood",
"level": 0,
"displayName": "Wooden",
"color": "#8B6914",
"builtIn": true,
"iconItem": "minecraft:wooden_pickaxe"
},
{
"name": "gold",
"level": 0,
"displayName": "Golden",
"color": "#FFAA00",
"builtIn": true,
"iconItem": "minecraft:golden_pickaxe"
},
{
"name": "stone",
"level": 1,
"displayName": "Stone",
"color": "#888888",
"builtIn": true,
"iconItem": "minecraft:stone_pickaxe"
},
{
"name": "copper",
"level": 2,
"displayName": "Copper",
"color": "#E77C56",
"builtIn": true,
"iconItem": "minecraft:copper_ingot"
},
{
"name": "iron",
"level": 3,
"displayName": "Iron",
"color": "#C8C8C8",
"builtIn": true,
"iconItem": "minecraft:iron_pickaxe"
},
{
"name": "diamond",
"level": 4,
"displayName": "Diamond",
"color": "#55FFFF",
"builtIn": true,
"iconItem": "minecraft:diamond_pickaxe"
},
{
"name": "netherite",
"level": 5,
"displayName": "Netherite",
"color": "#4D3B3B",
"builtIn": true,
"iconItem": "minecraft:netherite_pickaxe"
},
{
"name": "steel",
"level": 4,
"displayName": "Steel",
"color": "#9AA4AD",
"builtIn": false,
"iconItem": "examplemod:steel_pickaxe"
}
]
}

Better Harvest Levels loads blocks.json and every file whose name matches blocks*.json. Files load in alphabetical filename order, and each file contributes its overrides entries in array order.

{
"configVersion": 1,
"overrides": [
{
"target": "#minecraft:needs_diamond_tool",
"type": "tag",
"requiredTier": "netherite"
}
]
}
FieldTypeMeaning
targetstringBlock ID, block tag, namespace, or regular expression selected according to type.
typestringSelector type: block, tag, mod, or regex.
requiredTiertier IDRegistered tier that matching blocks require for drops.

tools.json and every file whose name matches tools*.json use the same alphabetical layering. Entries from each file are appended in their array order.

{
"configVersion": 1,
"overrides": [
{
"target": "examplemod:steel_pickaxe",
"type": "item",
"tier": "steel"
}
]
}
FieldTypeMeaning
targetstringItem ID, item tag, namespace, or regular expression selected according to type.
typestringSelector type: item, tag, mod, or regex.
tiertier IDRegistered tier assigned to matching items.
File familyTypeTarget form
BlocksblockExact block ID such as minecraft:obsidian
BlockstagTag with leading #, such as #minecraft:mineable/pickaxe
BlocksmodNamespace or namespace:*
BlocksregexFull-string regular expression matched against the block ID
ToolsitemExact item ID such as minecraft:iron_pickaxe
ToolstagTag with leading #
ToolsmodNamespace or namespace:*
ToolsregexFull-string regular expression matched against the item ID

A regex selector must match the complete identifier. For example, examplemod:.*_ore matches IDs in the examplemod namespace that end in _ore.

For each override family, Better Harvest Levels applies this order:

  1. Files load alphabetically by filename.
  2. Entries are evaluated in their loaded order, including their order within each overrides array.
  3. A later matching entry replaces the tier selected by an earlier matching entry.

This means the last matching block rule wins among all loaded blocks*.json entries, and the last matching tool rule wins among all loaded tools*.json entries.

  • An exact block or item target that is not present in the registry does not resolve to an override.
  • An unknown selector type is logged and skipped.
  • An invalid regular expression is logged and skipped.
  • Invalid JSON causes that entire file to be logged and skipped. Other files still load.
  • A duplicate tier name is logged and ignored, leaving the first definition registered.
  • A blank tier name or a definition of the reserved hand tier is logged and ignored.
  • A direct tier comparison involving an unknown tier is denied.
  • A block override whose requiredTier is unknown is logged and dropped during reload.
  • A tool override whose tier is unknown is logged and dropped during reload.

equivalences.json groups tier IDs that should satisfy one another.

{
"configVersion": 1,
"groups": [
{
"name": "diamond-grade",
"tiers": ["diamond", "steel"]
}
]
}
FieldTypeMeaning
namestringName used to identify the equivalence group in log messages.
tiersstring arrayRegistered tier IDs that are equivalent within this group.

Membership lets the named tiers satisfy each other even when one has a lower numeric level. In the example, a steel tool satisfies a diamond requirement, and a diamond tool satisfies a steel requirement. Numeric ordering still applies normally outside the group.

References to unknown tiers are logged and ignored. The known tier members of the group remain available for equivalence checks.