CoreEngineWIKI
ESC
NavigateEnter OpenESC Close

Fast Leaf Decay

Cut down a tree in vanilla and the leaves hang in the air for minutes until random ticks let them decay. With this module they fall within seconds: once the last log in reach is gone, the canopy crumbles leaf by leaf, with the usual drops (saplings, sticks, apples), particles and sound.

How it works #

  • When a log or leaf is broken or a leaf decays, its six neighbouring leaves get a short random wait (default 4 to 12 ticks, a good half second at most). Each leaf is then checked: only leaves the game marks as "no log in reach" decay. Leaves placed by players stay, as in vanilla.
  • The decay goes through the server's regular leaves decay event, so protection plugins, logging and the claim module see it exactly like natural decay.
  • The cascade continues from leaf to leaf until the whole canopy is gone. Trees with a trunk are not affected, nor are leaves still connected to a log.
  • Triggers are breaking by players and natural decay. Logs removed by explosions, pistons, fire or WorldEdit leave leaves that decay slowly as in vanilla.
  • No commands, no permissions. A change of enabled takes effect right after /coreengine reload.
💡

Tip: A wider range (about 4 to 20 ticks) makes the canopy crumble more slowly and naturally; a narrow range makes it fall almost at once.

Configuration (modules/leafdecay.yml) #

YAML
# Enables or disables fast leaf decay.
enabled: true

leafdecay:
  # Every leaf next to a broken log or a fallen leaf waits a random number
  # of ticks in this range before it is checked (20 ticks = 1 second).
  # Minimum 2, the game needs a moment to notice the missing log.
  min-delay-ticks: 4
  max-delay-ticks: 12
  # Break particles and the leaf sound for every fallen leaf.
  particles: true
  sound: true
  # blacklist = fast decay everywhere except the listed worlds,
  # whitelist = only in the listed worlds.
  world-mode: blacklist
  # World names used by world-mode.
  worlds: []

Complete example config #

YAML
enabled: true

leafdecay:
  min-delay-ticks: 4
  max-delay-ticks: 20
  particles: true
  sound: false
  world-mode: blacklist
  worlds: ["creative", "lobby"]