ChopChop
ChopChop 是一个服务端 Fabric 模组,添加了可通过附魔台或村民交易获得的“伐木”(Tree Feller)附魔。
当你使用附有“伐木”附魔的斧头挖掘原木时,整棵树会一次性被破坏。所有原木、树叶、藤蔓、蜂巢、可可豆以及其他附加方块会同时破碎并掉落其常规物品。
支持的树木类型
该模组开箱即用支持五种不同的树木类型。每种类型都有独立的检测逻辑和可配置的设置。
- 通用树木:橡木、云杉、白桦、丛林、金合欢、深色橡木、红树、樱花。模组会扫描相连的原木,然后在这些原木周围的可配置半径内查找所有树叶。
- 垂直植物:仙人掌和竹子。当禁用动画选项时,效果不明显。
- 紫颂植物:包括紫颂花在内的整个紫颂树结构。
- 红色蘑菇:菌柄和红色蘑菇帽。
- 棕色蘑菇:菌柄和棕色蘑菇帽。
自定义树木类型可以在模组的配置文件中添加。
无配置时的默认行为
“伐木”附魔适用于上述所有五种树木类型。
当你使用附魔斧挖掘原木时:
- 模组会扫描相连的原木,上限为 256 个原木。
- 对于通用树木,距离任何原木 7 格以内的树叶会被破坏。玩家放置的树叶会被忽略。
- 树木会以动画形式倒下,默认持续 60 刻(3 秒),或者像 Hytale 那样逐块破碎。
- 工具耐久度会根据挖掘的方块数量减少。
若要仅破坏单个原木,请在挖掘时按住潜行键。
配置
模组会生成 config/chopchop.json 文件。
选项:
animated(默认 false):设为 true 时,树木作为一个单一的动画实体倒下。设为 false 时,方块逐个顺序破碎。
animationDuration(默认 60):倒下的动画持续多少刻。仅在 animated 为 true 时生效。
speedMultiplication(默认 2.0):每增加一个原木所应用的挖掘速度倍率。
maxSpeedMultiplication(默认 512.0):速度倍率的上限。
configs:每个树木类型的设置列表。你可以禁用某种树木类型、更改所需工具或调整方块过滤器。
configs 中的每个条目对应一种树木类型(generic、vertical、chorus、red_mushroom、brown_mushroom)。
每种类型可用的字段如下:
enabled(默认 true):是否允许砍伐此树木类型。
requireTool(大多数为 true,紫颂为 false):如果为 true,模组会在砍伐前检查 allowedToolFilter。
allowedToolFilter(默认需要“伐木”附魔):一个物品谓词,用于确定哪些工具可用。你可以将其更改为要求特定材质或任何不带附魔的斧头。
logFilter(默认取决于类型):一个方块谓词,定义什么算作原木或菌柄。
leavesFilter(可选):一个方块谓词,用于树叶或蘑菇帽。如果缺失,树叶不会被破坏。
algorithm(仅适用于 generic 类型):包含 maxLeavesRadius(默认 7)、maxLogAmount(默认 256)以及 shouldIgnorePersistentLeaves(默认 true)。
依赖项
服务端需要安装 Fabric API 和 Polymer。
ChopChop
ChopChop is a serverside Fabric mod that adds a Tree Feller enchantment available from the enchantment table or villager trades.
When you mine a log with an axe enchanted with Tree Feller, the entire tree is destroyed in one go. All logs, leaves, vines, bee nests, cocoa beans, and other attached blocks break together and drop their usual items.
Which trees work
The mod supports five distinct tree types out of the box. Each type has its own detection logic and configurable settings.
- Generic trees: oak, spruce, birch, jungle, acacia, dark oak, mangrove, cherry. The mod scans for connected logs, then finds all leaves within a configurable radius around those logs.
- Vertical plants: cactus and bamboo. Doesn't have much effect when the animation option is disabled.
- Chorus plants: the entire chorus tree structure including chorus flowers.
- Red mushrooms: the stem and the red mushroom cap.
- Brown mushrooms: the stem and the brown mushroom cap.
Custom tree types can be added in the mod's config.
Default behavior without configuration
Tree Feller works on all five tree types above.
When you mine a log with the enchanted axe:
- The mod scans for connected logs up to a maximum of 256 logs.
- For generic trees, leaves within 7 blocks of any log are destroyed. Player placed leaves are ignored.
- The tree either falls with an animation that lasts 60 ticks (3 seconds) by default or breaks block-by-block similar to Hytale.
- Tool durability is reduced by the number of blocks mined.
To break a single log, sneak while mining.
Configuration
The mod generates config/chopchop.json.
Options:
animated (default false): When true, the tree falls as a single animated entity. When false, blocks break one by one sequentially.
animationDuration (default 60): How many ticks the falling animation lasts. Only used when animated is true.
speedMultiplication (default 2.0): Mining speed multiplier applied per additional log.
maxSpeedMultiplication (default 512.0): Upper limit for the speed multiplier.
configs: A list of per tree type settings. You can disable a tree type, change the required tool, or adjust the block filters.
Each entry in configs corresponds to a tree type (generic, vertical, chorus, red_mushroom, brown_mushroom).
Available fields per type:
enabled (default true): Whether this tree type can be felled.
requireTool (default true for most, false for chorus): If true, the mod checks the allowedToolFilter before felling.
allowedToolFilter (default requires the Tree Feller enchantment): An item predicate that determines which tools work. You can change this to require a specific material or any axe without the enchantment.
logFilter (default depends on type): A block predicate that defines what counts as a log or stem.
leavesFilter (optional): A block predicate for leaves or mushroom caps. If absent, leaves are not destroyed.
algorithm (for generic type only): Contains maxLeavesRadius (default 7), maxLogAmount (default 256), and shouldIgnorePersistentLeaves (default true).
Dependencies
Fabric API and Polymer are required on the server.
评论 0
登录后参与评分
还没有评论,来抢沙发吧