Java Edition data pack
VeinMiner
Ore families, structural tree families and custom groups share one owner-safe queue while keeping their matching rules separate.
01 / Install
Install one VeinMiner build
Use VeinMiner-7.1.1+1.16-1.16.5.zip.
Use VeinMiner-7.1.1+1.17-1.20.4.zip.
Use VeinMiner-7.1.1+1.20.5-1.20.6.zip.
Use VeinMiner-7.1.1+1.21-1.21.1.zip.
Use VeinMiner-5.2.1+1.21.2-26.2.zip.
Choose one mining pack. Do not load VeinMiner together with separate OreVeinMiner or TreeVeinMiner builds. They detect the same break and would compete for the same connected blocks.
Put the selected ZIP in world/datapacks.
Run /reload as an operator.
Crouch with the correct tool and mine the first block normally.
02 / Use
One family per operation
Use /trigger vml.toggle for your personal switch. Crouching is required. The defaults are 26-neighbor matching, 256 additional blocks and 32 queue visits per player per tick.
Use /trigger vmr.toggle for your personal switch. The shipped activation accepts crouching or a tool with vm:vein_miner. The defaults are 26-neighbor matching, 256 additional blocks and 32 visits per server tick.
Coal through ancient debris use family-specific matching and harvest tiers.
Logs, wood, stems and hyphae are included; leaves and wart blocks are not.
Added IDs use the held tool's registered loot table.
03 / Commands
Player and operator controls
/trigger vml.togglePersonal enable or disable switch.
/function veinminer:admin/enableEnable new operations globally.
/function veinminer:admin/disableDisable new operations globally.
/function veinminer:admin/adjacency_immediateUse 26 touching positions.
/function veinminer:admin/adjacency_facesUse six face-connected positions.
/function veinminer:admin/safety_onPreserve the tool's last durability point.
/function veinminer:admin/safety_offAllow the tool to break.
/function veinminer:admin/preview_onSet the retained legacy preview flag. This build has no preview renderer.
/function veinminer:admin/preview_offClear the retained legacy preview flag.
/function veinminer:admin/resetRestore all shipped global settings.
Maximum: run /scoreboard players set #value vml.input 256, then /function veinminer:admin/set_max. Budget: set #value vml.input to 1–64, then run /function veinminer:admin/set_budget.
/trigger vmr.togglePersonal enable or disable switch.
/function vm:admin/enableEnable new operations globally.
/function vm:admin/disableDisable new operations globally.
/function vm:admin/always_activeRemove the activation requirement.
/function vm:admin/crouch_requiredRequire crouching.
/function vm:admin/enchantment_requiredRequire vm:vein_miner.
/function vm:admin/crouch_or_enchantmentAccept either activation method.
/function vm:admin/adjacency_immediateUse 26 touching positions.
/function vm:admin/adjacency_facesUse six face-connected positions.
/function vm:admin/durability_onCharge tools for additional blocks.
/function vm:admin/durability_offCharge only the first block.
/function vm:admin/safety_onPreserve the final durability point.
/function vm:admin/safety_offAllow the tool to break.
/function vm:admin/debug_onShow owner diagnostics.
/function vm:admin/debug_offHide owner diagnostics.
Numeric settings: use /function vm:admin/set_max {value:256} for 1–512 additional blocks and /function vm:admin/set_budget {value:32} for a 1–64 visit budget.
04 / Add blocks
Put connected IDs in the same group
Eight independent groups are available at data/veinminer/tags/blocks/family/custom_1.json through custom_8.json. Blocks in different custom files do not connect.
Eight independent groups are available at data/veinminer/tags/block/family/custom_1.json through custom_8.json. The directory name is singular on 1.21.
{
"replace": false,
"values": [
{ "id": "examplemod:tin_ore", "required": false },
{ "id": "examplemod:deepslate_tin_ore", "required": false }
]
}
Keep mod entries optional when the same ZIP may load without that mod. Rebuild the ZIP with pack.mcmeta at its root and run /reload.
Add arbitrary vanilla or modded IDs to data/vm/tags/block/custom_blocks.json. IDs listed only here share one generic connected family and accept a valid axe or pickaxe.
{
"replace": false,
"values": [
"minecraft:stone",
{ "id": "examplemod:ruby_ore", "required": false },
{ "id": "examplemod:rubber_log", "required": false }
]
}
To join a built-in family, add the same ID to its file under data/vm/tags/block/family/. For example, a modded copper ore in ore_copper.json connects to vanilla copper ore instead of the generic custom group.
05 / Remove blocks
Exclusions override inclusion
Edit data/veinminer/tags/blocks/excluded.json.
Edit data/veinminer/tags/block/excluded.json.
Edit data/vm/tags/block/excluded_blocks.json. This overrides built-in families and custom_blocks.json.
{
"replace": false,
"values": [
"minecraft:ancient_debris",
{ "id": "examplemod:machine_casing", "required": false }
]
}
06 / Loot & durability
The held tool remains the loot context
Additional blocks call their registered loot tables with the held tool. Fortune, Silk Touch and modded loot conditions therefore remain part of the result. Ore experience is emitted only where vanilla mining would award it.
1.16 durability: only the normally mined first block costs durability. The pack does not reconstruct the selected item, avoiding the item-loss bug caused by unsafe legacy replacement.
Additional durability: queued blocks use Unbreaking-aware damage. Safety mode stops before the final durability point is consumed.
07 / Leaves
Leaf cleanup is deliberately separate
VeinMiner's tree-only hook fires for structural tree families and never for ore operations. LeaveDecay listens to that hook, so mining a diamond vein cannot create a leaf-cleanup queue.
For a custom log to start LeaveDecay, add it to custom_blocks.json and the appropriate tree family. vm:tree_blocks already includes every tree family.
The legacy hook runs from built-in tree-family operations. Blocks placed only in a generic custom family are mined normally by VeinMiner but do not call the tree hook.