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.

Choose versionThree downloads6 nodes per tickPlayer leaves protected

01 / Install

Download the standalone add-on

1

Install one compatible TreeVeinMiner or VeinMiner base pack for the same Minecraft version.

2

Put the downloaded LeaveDecay ZIP beside the base pack in world/datapacks.

3

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

TreeVeinMiner

Every additional structural tree block emits the hook.

VeinMiner

The hook is tree-only and does not fire for ore veins.

Standalone

Without a supported base pack, LeaveDecay remains idle.

03 / Behavior

Only leaves already marked to decay

  1. A removed tree block creates a lightweight seed at that position.
  2. The seed waits 10 ticks while Minecraft recalculates leaf distance.
  3. Only blocks in #minecraft:leaves with distance=7 and persistent=false are claimed.
  4. 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/enable

Resume new seeds and pending cleanup.

/function leafdecay:admin/disable

Pause cleanup without deleting the queue.

/function leafdecay:admin/status

Show settings, pending work, base connection and received tree-hook events.

/function leafdecay:admin/reset

Invalidate and clear pending cleanup. Configuration values are preserved.

/function leafdecay:admin/set_budget

Apply #value ldc.input from 1 to 16 nodes per tick.

/function leafdecay:admin/set_max

Apply #value ldc.input from 32 to 4096 pending nodes.

/function leafdecay:admin/set_delay

Apply #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.

Default budget

6 queue nodes per tick across the server.

Pending cap

2048 seeds and frontier nodes by default.

Dimensions

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.