Optional data-pack add-on
LeaveDecay
Unsupported natural leaves are cleaned through a small independent queue after TreeVeinMiner or VeinMiner removes the logs. Mining speed never expands into a one-tick canopy scan.
01 / Install
Download the standalone add-on
Use this file with TreeVeinMiner 7.1.1 or VeinMiner 7.1.1 for Minecraft 1.16–1.16.5.
Use this file with the matching TreeVeinMiner 7.1.1 or VeinMiner 7.1.1 build for Minecraft 1.17–1.20.6.
Use this file with TreeVeinMiner or VeinMiner 7.1.1 on 1.21–1.21.1, or TreeVeinMiner 4.2.1 / VeinMiner 5.2.1 on 1.21.2–26.2.
Install one compatible TreeVeinMiner or VeinMiner base pack for the same Minecraft version.
Put the downloaded LeaveDecay ZIP beside the base pack in world/datapacks.
Run /reload, then confirm Base connected: 1 with the status command.
Do not mix packaging styles. If you already use a local combined +LeaveDecay bundle, do not install this standalone ZIP beside it.
02 / Compatibility
The base pack must expose the tree hook
Use TreeVeinMiner 7.1.1 or VeinMiner 7.1.1 for the exact Minecraft version. Earlier 7.0.x ZIPs do not contain the tree_removed hook and therefore cannot notify the add-on.
For Minecraft 1.21–1.21.1, use TreeVeinMiner or VeinMiner 7.1.1. For Minecraft 1.21.2–26.2, use TreeVeinMiner 4.2.1 or VeinMiner 5.2.1.
Every additional structural tree block emits the hook.
The hook is tree-only and does not fire for ore veins.
Without a supported base pack, LeaveDecay remains idle.
03 / Behavior
Only leaves already marked to decay
- A removed tree block creates a lightweight seed at that position.
- The seed waits 10 ticks while Minecraft recalculates leaf distance.
- Only blocks in
#minecraft:leaveswithdistance=7andpersistent=falseare claimed. - Each claimed leaf evaluates its vanilla loot table with no shears or Silk Touch, then queues its unsupported neighbors.
Player-placed leaves remain. Minecraft places leaf blocks with persistent=true; the add-on's block-state check excludes them before loot or removal runs.
04 / Commands
Operator settings
/function leafdecay:admin/enableResume new seeds and pending cleanup.
/function leafdecay:admin/disablePause cleanup without deleting the queue.
/function leafdecay:admin/statusShow settings, pending work, base connection and received tree-hook events.
/function leafdecay:admin/resetInvalidate and clear pending cleanup. Configuration values are preserved.
/function leafdecay:admin/set_budgetApply #value ldc.input from 1 to 16 nodes per tick.
/function leafdecay:admin/set_maxApply #value ldc.input from 32 to 4096 pending nodes.
/function leafdecay:admin/set_delayApply #value ldc.input from 6 to 40 ticks.
/scoreboard players set #value ldc.input 8 /function leafdecay:admin/set_budget
Replace 8 with the desired value, then run the setter for the setting you want to change.
05 / Performance
Bounded work, once per occupied dimension
The default budget processes six queue nodes per server tick. A node checks the 26 immediately touching positions, so the default ceiling is 156 small block-state checks per tick while cleanup is active. There is no player-radius scan and no search when no hook has queued work.
6 queue nodes per tick across the server.
2048 seeds and frontier nodes by default.
Each dimension containing a player is visited once per tick, including custom dimensions.
Large modded trees: the pending cap is intentional. Leaves skipped after the cap is reached are still handled by Minecraft's native random-tick decay.
06 / Troubleshooting
Check the hook before changing the budget
- No leaves move: run
/function leafdecay:admin/status. Both enabled and Base connected must be 1. - Tree hook events stays at 0 after mining: remove legacy 7.0.x or duplicate base ZIPs, then install the matching supported base release beside this add-on.
- Some leaves remain beside another trunk: they still have support and are correctly excluded.
- Cleanup pauses after everyone leaves a dimension: this is expected. It resumes when a player returns and the entities are loaded.
- A custom log mines but leaves stay: in modern VeinMiner, place the log in a tree family as well as
custom_blocks.json.