RapidLeafFall 让被砍伐的树木按照应有的方式消失——快速且平滑。当玩家击碎支撑树冠的最后一根原木时,失去连接的树叶会在短暂且略带随机的延迟后逐渐消失,而不是像原版那样悬停数分钟。不再有无从依附的悬浮树叶方块,也不会造成服务器卡顿。
该模组仅使用稳定的 Bukkit/Paper API —— 无需 NMS、无需反射、无版本锁定的内部实现 —— 因此同一构建包可在 Paper 和 Leaf 上的整个 1.21 系列版本中通用。
功能特性
快速但平滑的衰减 — 每片树叶都在其独立的随机延迟后被移除,使得大树逐渐“融化”消失,而不是一帧内瞬间弹出消失。
零卡顿 — 移除操作分散在多个刻(tick)中进行,并配有可配置的每刻上限。整片树冠绝不会在单个刻内被删除。
原版精准还原 — 仅在树叶真正与树木断开连接时(即其原版距离达到衰减阈值)才会衰减。活体树木永远不会受到影响。
支持所有树叶类型 — 橡木、云杉、白桦、丛林、金合欢、深色橡木、樱花、红树林、杜鹃花丛及开花杜鹃花丛均通过 Bukkit 的 leaves 标签得到支持,因此新增的树叶类型也能自动兼容。
尊重玩家建筑 — 默认情况下,不会处理持久化(玩家放置)的树叶。
掉落或干净清除 — 可通过 breakNaturally() 掉落树叶战利品,或直接将其清除为空气。
多世界支持 — 可启用所有世界,或仅白名单指定所需的世界。
兼容保护插件 — 以监控优先级监听事件,并忽略已取消的破坏行为,因此绝不会与 WorldGuard 或其他土地保护插件冲突。
要求
Paper 或 Leaf 1.21.x(目标版本 1.21.11),运行于 Java 21+。
安装
将 jar 文件放入服务器的 plugins/ 文件夹并重启。默认的 config.yml 将在 plugins/RapidLeafFall/ 下生成。按需编辑配置文件,然后执行 /rlf reload。
配置
所有选项均位于 plugins/RapidLeafFall/config.yml 中:
- radius — 扫描周围方块半径以寻找待衰减的树叶(默认
7)。
- min-decay-delay / max-decay-delay — 每片树叶将在该范围内的随机延迟(单位:刻)后被移除(默认值
10 / 60)。
- blocks-per-tick — 每刻最多移除的树叶数量安全上限(默认
64)。
- check-diagonal-leaves — 是否也通过对角线邻居传播衰减(默认
true)。
- ignore-persistent-leaves — 永不衰减玩家放置的树叶(默认
true)。
- drop-items — 是否掉落树叶战利品;若设为
false 则直接清除为空气(默认 true)。
- decay-effects — 是否在衰减时播放原版破坏粒子效果和音效(默认
false)。
- enabled-worlds — 世界白名单;留空表示在所有世界启用(默认
[])。
- debug — 详细控制台日志记录(默认
false)。
为了减轻超大树木带来的负载,请降低 blocks-per-tick 或提高 max-decay-delay。
命令与权限
/rlf reload — 重新加载配置。
/rlf status — 显示当前设置及待处理队列大小。
别名 /qld 同样可用。所有子命令均需权限 rapidleaffall.admin(默认:op)。
工作原理
原木被破坏时会触发一个块破坏事件(在保护插件发表意见之后)。附近的树叶会被安排进行检查,每片树叶都有其独立的随机延迟。当检查运行时,会读取该树叶的原版距离;如果它不再由任何原木支撑,则该树叶将被移除,其邻居也将被重新检查。衰减过程向外级联,逻辑完全遵循原版——只是速度更快——同时每刻上限确保服务器运行流畅。
由 ZiTr_ 制作 · 基于 MIT License 发布。
RapidLeafFall makes chopped-down trees disappear the way they should — fast, but smooth. When a player breaks the last log holding up a canopy, the disconnected leaves fade away after a short, slightly random delay instead of lingering for minutes like vanilla. No more floating leaf blocks, and no lag spikes.
It uses only the stable Bukkit/Paper API — no NMS, no reflection, no version-locked internals — so the same build runs across the whole 1.21 line on both Paper and Leaf.
Features
Fast but smooth decay — each leaf is removed after its own random delay, so big trees melt away gradually instead of popping in a single frame.
Zero lag — removals are spread across ticks with a configurable per-tick cap. A whole canopy is never deleted in one tick.
Vanilla-accurate — a leaf only decays when it is genuinely disconnected from a tree (its vanilla distance reaches the decay threshold). Living trees are never touched.
Every leaf type — oak, spruce, birch, jungle, acacia, dark oak, cherry, mangrove, azalea and flowering azalea are all supported through the Bukkit leaves tag, so new leaf types keep working automatically.
Respects player builds — persistent (player-placed) leaves are left alone by default.
Drops or clean removal — drop leaf loot via breakNaturally(), or simply clear the leaves to air.
Multi-world — enable everywhere, or whitelist only the worlds you want.
Protection-friendly — listens at monitor priority and ignores cancelled breaks, so it never fights WorldGuard or other land-protection plugins.
Requirements
Paper or Leaf 1.21.x (targets 1.21.11), running on Java 21+.
Installation
Drop the jar into your server's plugins/ folder and restart. A default config.yml is generated under plugins/RapidLeafFall/. Edit it as you like, then run /rlf reload.
Configuration
Every option lives in plugins/RapidLeafFall/config.yml:
- radius — block radius around a broken log scanned for decaying leaves (default
7).
- min-decay-delay / max-decay-delay — each leaf is removed after a random delay in this range, in ticks (defaults
10 / 60).
- blocks-per-tick — safety cap on leaves removed per tick (default
64).
- check-diagonal-leaves — propagate decay through diagonal neighbours too (default
true).
- ignore-persistent-leaves — never decay player-placed leaves (default
true).
- drop-items — drop leaf loot, or clear to air when
false (default true).
- decay-effects — play vanilla break particles and sound on decay (default
false).
- enabled-worlds — world whitelist; leave empty to enable everywhere (default
[]).
- debug — verbose console logging (default
false).
To flatten the load on very large trees, lower blocks-per-tick or raise max-decay-delay.
Commands and permissions
/rlf reload — reload the configuration.
/rlf status — show current settings and the pending queue size.
The alias /qld also works. All subcommands require the permission rapidleaffall.admin (default: op).
How it works
A log break fires a block-break event (after protection plugins have had their say). Nearby leaves are scheduled for a check, each with its own random delay. When that check runs, the leaf's vanilla distance is read; if it is no longer supported by a log, the leaf is removed and its neighbours are re-checked. The decay cascades outward exactly like vanilla — just much faster — while the per-tick cap keeps the server smooth.
Made by ZiTr_ · released under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧