Java Edition data pack
TreeVeinMiner
Connected structural wood is removed through a bounded queue. The first log is still mined by Minecraft, so normal tool, loot and protection behavior remains the entry point.
01 / Install
Use the ZIP for the selected version
Install TreeVeinMiner-7.1.1+1.16-1.16.5.zip. This file covers Minecraft 1.16 through 1.16.5.
Install TreeVeinMiner-7.1.1+1.17-1.20.4.zip. Do not use the 1.16 build on these versions; durability handling differs.
Install TreeVeinMiner-7.1.1+1.20.5-1.20.6.zip. It contains the item-component-compatible durability files required by these releases.
Install TreeVeinMiner-7.1.1+1.21-1.21.1.zip. Its singular data directories match the 1.21 data-pack layout.
Install TreeVeinMiner-4.2.1+1.21.2-26.2.zip. Do not load the separate Enchantment Edition beside it; both use the stm namespace.
Put the ZIP, without extracting it, in world/datapacks.
Enter the world and run /reload as an operator.
Crouch, hold an axe and break one supported log normally.
02 / Use
Break the first block yourself
Crouching is required. The operation follows 26 immediately touching positions by default and removes at most 256 additional blocks with a budget of 32 queue visits per player per tick.
/trigger tvl.toggleSwitch TreeVeinMiner off or on for your player.
/function treeveinminer:admin/adjacency_facesUse only the six face-connected directions.
The default activation accepts either crouching or an axe carrying stm:timber. The queue removes at most 256 additional blocks and processes 32 visits per server tick.
/trigger tvm.toggleSwitch TreeVeinMiner off or on for your player.
/function stm:admin/crouch_or_enchantmentRestore the shipped activation mode.
03 / Commands
Operator controls
/function treeveinminer:admin/enableEnable the pack globally.
/function treeveinminer:admin/disableStop new operations globally.
/function treeveinminer:admin/adjacency_immediateUse all 26 touching positions.
/function treeveinminer:admin/adjacency_facesUse six face-connected positions.
/function treeveinminer:admin/safety_onKeep the final durability point on the held tool.
/function treeveinminer:admin/safety_offAllow the held tool to break during queued work.
/function treeveinminer:admin/preview_onSet the retained legacy preview flag. This build has no preview renderer.
/function treeveinminer:admin/preview_offClear the retained legacy preview flag.
/function treeveinminer:admin/resetRestore enabled, 26 neighbors, 256 maximum, 32 budget, preview off and safety off.
Numeric settings: run /scoreboard players set #value tvl.input 128, then /function treeveinminer:admin/set_max. Use the same first command with a value from 1 to 64 before /function treeveinminer:admin/set_budget.
/function stm:admin/enableEnable new operations globally.
/function stm:admin/disableDisable new operations globally.
/function stm:admin/always_activeMine without crouching or the enchantment.
/function stm:admin/crouch_requiredRequire crouching.
/function stm:admin/enchantment_requiredRequire stm:timber.
/function stm:admin/crouch_or_enchantmentAccept either activation method.
/function stm:admin/adjacency_immediateUse all 26 touching positions.
/function stm:admin/adjacency_facesUse six face-connected positions.
/function stm:admin/durability_onCharge the axe for additional blocks.
/function stm:admin/durability_offCharge only Minecraft's first-block durability.
/function stm:admin/safety_onPreserve the axe's final durability point.
/function stm:admin/safety_offAllow the axe to break.
/function stm:admin/debug_onShow operation diagnostics to the owner.
/function stm:admin/debug_offHide operation diagnostics.
Numeric settings: use /function stm:admin/set_max {value:256} for 1–512 additional blocks and /function stm:admin/set_budget {value:32} for a 1–64 visit budget.
04 / Blocks
Tree families stay separate
Oak does not jump into spruce, and overworld logs do not connect to Nether stems. Stripped variants and wood or hyphae variants remain in their own matching family.
Family files are under data/treeveinminer/tags/blocks/family/. Adding a block to an existing family also makes it a trigger because trigger_blocks.json references every family tag.
{
"replace": false,
"values": [
"minecraft:oak_log",
{ "id": "examplemod:ancient_oak_log", "required": false }
]
}
Family files are under data/treeveinminer/tags/block/family/. Add related blocks to the same file, keep replace false and run /reload.
The modern detector is generated for the shipped tree IDs. Editing a family tag can change how supported blocks connect, but adding an arbitrary mod ID to a tag does not add the mined-stat detector required to start an operation. Use VeinMiner when you need its custom-block path.
Do not put leaves in a tree family. That recreates a canopy-scale mining operation and bypasses LeaveDecay's bounded natural-leaf checks.
05 / Durability
Version-specific tool handling
Minecraft 1.16 cannot apply relative damage to the selected player item safely with this data-pack architecture. The first block costs normal durability; additional queued blocks do not. The pack never reconstructs or replaces the held axe.
The first block is charged by Minecraft. Additional blocks use Unbreaking-aware durability handling. With safety enabled, the queue stops before consuming the last durability point.
06 / Leaves
Use LeaveDecay as a separate add-on
TreeVeinMiner intentionally mines structural wood only. LeaveDecay receives a tree-only hook, waits for vanilla distance updates, and removes only natural unsupported leaves through its own six-node default tick budget.
Leaves with persistent=true are never claimed.
Each removed leaf evaluates its vanilla loot table as natural decay.
TreeVeinMiner 7.1.1 or 4.2.1 exposes and advertises the hook used by the add-on.