LemmeCutTrees
适用于 Minecraft Java 版的服务端权威 Fabric 砍树模组。
手持已配置的斧头并潜行,破坏符合条件的原木。LemmeCutTrees 会在保留原版方块破坏行为、掉落物、工具耐久度消耗、疲劳值、音效以及兼容的 Fabric 回调的前提下,处理剩余的原木和树叶。
功能特性
- 整树砍伐:检测配置中的树木类型,并按受控队列破坏其相连的原木。
- 树叶清理:启用时移除相连的树叶,且不额外消耗斧头的耐久度。
- 原版行为:使用服务器正常的方块破坏路径来处理掉落物、附魔、工具行为、疲劳值、音效和回调。
- 耐久度保护:在开始砍伐前预留足够的斧头耐久度以应对整棵树的需求。队列中的树木也会被计入考量。
- 安全中断:当玩家死亡、断开连接、切换维度或停止手持已配置的斧头时,会停止队列中的工作;无法再交互的方块会被安全跳过。
- 可配置检测:支持添加树种、原木和树叶方块、对角线树叶连接、尺寸限制、高度限制以及检测范围。
- 服务器反馈:功能激活期间显示活动动作栏(actionbar),并为玩家播放激活/停用音效。
- 独立服务端友好:游戏逻辑由服务端权威控制;连接客户端无需安装此模组。
安装方法
- 在服务端为 Minecraft
26.1.2 安装 Fabric Loader。
- 在服务端的
mods 目录中安装对应版本的 Fabric API。
- 将
lemmecuttrees JAR 文件放入同一个 mods 目录中。
- 启动一次服务器。默认配置文件将在
config/lemmecuttrees.yml 生成。
- 根据需要调整配置,然后重启服务器或运行
/lemmecuttrees reload 命令。
使用方法
默认激活流程如下:
- 在主手持有已配置的一把斧头。
- 按住 Shift 键并瞄准一棵树的原木。
- 正常破坏该原木。
- 如果该方块是符合条件的树木,第一个方块会正常破坏,随后剩余的原木将被逐步处理。
默认配置识别以下树种:
橡木 ·
杜鹃花丛 ·
白桦木 ·
云杉木 ·
丛林木 ·
深色橡木 ·
金合欢木 ·
红树林 ·
樱花木 ·
苍白橡木 ·
绯红菌核 ·
诡异菌核
树木必须满足配置中原木、树叶、尺寸、高度、形状和垂直比例的检查要求。已经发生变化或玩家无法再与之交互的方块会被安全跳过。
当树木被接受后,玩家会收到绿色的 LemmeCutTrees Activated 动作栏提示及激活音效。只要玩家继续手持允许的斧头,动作栏就会保持可见。切换到其他物品则会发送红色的 LemmeCutTrees Deactivated 动作栏提示及停用音效。
如果斧头无法覆盖所需的原木耐久度消耗,则该树木不会被接受,且玩家会收到耐久度警告。创造模式玩家不受耐久度预留的限制。
附魔与砍伐速度
| 附魔/效果 |
砍伐速度 |
| 效率 I-V |
更快;等级越高速度越快 |
| 急迫 |
更快 |
| mining fatigue (挖掘疲劳) |
更慢 |
| 耐久, 经验修补, 抢夺, 精准采集 |
无影响 |
配置说明
配置说明
生成的文件位于 config/lemmecuttrees.yml。它是标准的 YAML 格式,可以在服务器关闭时进行编辑。
通用设置
| 键 |
默认值 |
描述 |
require-shift |
true |
要求玩家在运行树木检测前处于潜行状态。 |
clear-leaves |
true |
在原木处理完成后破坏已检测到的树叶。 |
cutting-speed.multiplier |
1.0 |
乘以原版每根原木的破坏时间。数值越高,速度越慢。 |
cutting-speed.minimum-ticks-per-log |
1 |
队列中原木破坏之间的延迟下限。 |
cutting-speed.maximum-ticks-per-log |
200 |
队列中原木破坏之间的延迟上限。 |
检测设置
| 键 |
默认值 |
描述 |
detection.scan-distance |
256 |
发现相连原木时使用的最大距离。 |
detection.required-logs |
4 |
检测为一棵树木所需的最少原木数量。 |
detection.required-leaves |
10 |
检测为一棵树木所需的最少相连树叶数量。 |
detection.maximum-logs |
250 |
单棵树木允许的最大原木数量。 |
detection.maximum-cut-height |
5 |
从被破坏的原点到底部检测到的原木之间的最大垂直距离。 |
detection.leaf-detect-range |
6 |
用于判断树木是否有足够树叶的范围。 |
detection.leaf-break-range |
6 |
可能被清除的树叶范围。 |
detection.maximum-horizontal-log-run |
6 |
最大直线水平原木延伸长度。 |
detection.minimum-vertical-log-ratio |
0.5 |
最小垂直与水平原木比例。 |
detection.include-player-placed-leaves |
false |
在检测和清除中包含持久化/玩家放置的树叶。 |
斧头与树木映射
allowed-axes 控制哪些主手物品可以激活此功能。默认列表包含木质、石质、铜质、铁质、金质、钻石质和下界合金质斧头。
trees 中的每个条目定义了一个物种,包含 logs(原木)和 leaves(树叶)方块 ID 列表。
可选的单树设置如下:
diagonal-leaves: 允许对角线方向的树叶连接。
required-logs: 覆盖全局最少原木数量要求。
leaf-detect-range: 覆盖全局树叶检测范围。
leaf-break-range: 覆盖全局树叶清除范围。
maximum-horizontal-log-run: 覆盖全局水平延伸长度限制。
使用命名空间 ID,例如 minecraft:oak_log。当加载配置时,无效的 ID、重复的树木名称、重复的映射、非斧头的允许物品以及无效的数字值将被拒绝。
重载配置
拥有服务器 gamemaster 命令权限的操作员可以运行:
/lemmecuttrees reload
有效的更改将替换当前活动的配置。如果新的 YAML 文件无效,则保留之前的配置并报告失败。
许可与致谢
LemmeCutTrees 根据 GNU General Public License v3.0 授权。
树木检测的默认值源自 ThizThizzyDizzy 有意限制的子集 TreeFeller 1.30.2。有关详细归属信息,请参阅 NOTICE。
LemmeCutTrees
Server-authoritative Fabric tree felling for Minecraft Java Edition.
Hold a configured axe, sneak, and break a qualifying tree log. LemmeCutTrees
handles the remaining logs and leaves while preserving vanilla block-breaking
behavior, drops, tool durability, exhaustion, sounds, and compatible Fabric
callbacks.
Features
- Tree felling: Detects configured trees and breaks their connected logs in a
controlled queue.
- Leaf clearing: Removes connected leaves when enabled, without consuming extra
axe durability.
- Vanilla behavior: Uses the server's normal block-breaking path for drops,
enchantments, tool behavior, exhaustion, sounds, and callbacks.
- Durability protection: Reserves enough axe durability for the complete tree
before felling starts. Queued trees are also accounted for.
- Safe interruption: Stops queued work when the player dies, disconnects,
changes dimension, or stops holding a configured axe; blocks that are no
longer interactable are skipped safely.
- Configurable detection: Add tree species, log and leaf blocks, diagonal leaf
connections, size limits, height limits, and detection ranges.
- Server feedback: Shows an active actionbar while the feature is active and
plays activation/deactivation sounds for the player.
- Dedicated-server friendly: Gameplay is authoritative on the logical server;
connecting clients do not need the mod installed.
Installation
- Install Fabric Loader for Minecraft
26.1.2 on the server.
- Install the matching Fabric API in the server's
mods directory.
- Put the
lemmecuttrees JAR in the same mods directory.
- Start the server once. The default configuration is created at
config/lemmecuttrees.yml.
- Adjust the configuration if needed, then restart the server or run
/lemmecuttrees reload.
Usage
The default activation flow is:
- Hold one of the configured axes in your main hand.
- Hold Shift while targeting a tree log.
- Break the log normally.
- If the block is a qualifying tree, the first block breaks normally and the
remaining logs are processed progressively.
The default configuration recognizes:
Oak ·
Azalea ·
Birch ·
Spruce ·
Jungle ·
Dark Oak ·
Acacia ·
Mangrove ·
Cherry ·
Pale Oak ·
Crimson ·
Warped
A tree must satisfy the configured log, leaf, size, height, shape, and vertical
ratio checks. Blocks that have already changed or that the player can no longer
interact with are skipped safely.
When a tree is accepted, the player receives a green LemmeCutTrees Activated
actionbar and activation sound. The actionbar remains visible while the player
continues holding an allowed axe. Switching to another item sends a red
LemmeCutTrees Deactivated actionbar and deactivation sound.
If the axe cannot cover the required log durability, the tree is not accepted
and the player receives a durability warning. Creative players are not limited
by the durability reservation.
Enchantments and cutting speed
| Enchantment/effect |
Cutting speed |
| Efficiency I-V |
Faster; higher level cuts faster |
| Haste |
Faster |
| Mining Fatigue |
Slower |
| Unbreaking, Mending, Fortune, Silk Touch |
No effect |
Configuration
Configuration
The generated file is config/lemmecuttrees.yml. It is ordinary YAML and can
be edited while the server is stopped.
General settings
| Key |
Default |
Description |
require-shift |
true |
Require the player to sneak before tree detection runs. |
clear-leaves |
true |
Break detected leaves after the logs are processed. |
cutting-speed.multiplier |
1.0 |
Multiplies the vanilla per-log break time. Higher values are slower. |
cutting-speed.minimum-ticks-per-log |
1 |
Lower bound for the delay between queued log breaks. |
cutting-speed.maximum-ticks-per-log |
200 |
Upper bound for the delay between queued log breaks. |
Detection settings
| Key |
Default |
Description |
detection.scan-distance |
256 |
Maximum distance used while discovering connected logs. |
detection.required-logs |
4 |
Minimum logs required for a detected tree. |
detection.required-leaves |
10 |
Minimum connected leaves required for a detected tree. |
detection.maximum-logs |
250 |
Maximum logs allowed in one tree. |
detection.maximum-cut-height |
5 |
Maximum vertical distance from the broken origin to the lowest detected log. |
detection.leaf-detect-range |
6 |
Range used to decide whether a tree has enough leaves. |
detection.leaf-break-range |
6 |
Range of leaves that may be cleared. |
detection.maximum-horizontal-log-run |
6 |
Maximum straight horizontal log run. |
detection.minimum-vertical-log-ratio |
0.5 |
Minimum vertical-to-horizontal log ratio. |
detection.include-player-placed-leaves |
false |
Include persistent/player-placed leaves in detection and clearing. |
Axes and tree mappings
allowed-axes controls which main-hand items can activate the feature. The
default list contains wooden, stone, copper, iron, golden, diamond, and
netherite axes.
Each entry in trees defines a species with logs and leaves block ID lists.
The optional per-tree settings are:
diagonal-leaves: Allow diagonal leaf connections.
required-logs: Override the global minimum log count.
leaf-detect-range: Override the global leaf detection range.
leaf-break-range: Override the global leaf clearing range.
maximum-horizontal-log-run: Override the global horizontal run limit.
Use namespaced IDs such as minecraft:oak_log. Invalid IDs, duplicate tree
names, duplicate mappings, non-axe allowed items, and invalid numeric values
are rejected when the configuration loads.
Reloading
Operators with the server's gamemaster command permission can run:
/lemmecuttrees reload
Valid changes replace the active configuration. If the new YAML is invalid,
the previous configuration remains active and the command reports the failure.
License and attribution
LemmeCutTrees is licensed under the GNU General Public License v3.0.
The tree-detection defaults are derived from the deliberately limited subset
of TreeFeller 1.30.2 by
ThizThizzyDizzy. See NOTICE for the attribution details.
评论 0
登录后参与评分
还没有评论,来抢沙发吧