CM'sALL
一款内置方块保护功能、可自定义的连锁采集模组,用于 safeguard 你的建筑。
CM'sALL 将三种核心的连锁采集功能整合进一个模组中,同时解决了一个常见问题:意外破坏玩家建筑。通过追踪玩家放置的方块,它确保在进行大规模采集时,你的木屋、石墙和自定义路径不会被触碰。
支持版本
| Minecraft |
加载器 |
Architectury API |
| 1.21.1 |
NeoForge, Fabric |
13.0.8 |
| 1.21 |
NeoForge, Fabric |
13.0.8 |
| 1.20.1 |
Forge, Fabric |
9.2.14 |
| 1.16.5 |
Forge, Fabric |
1.32.68 |
| 1.12.2 |
Forge |
— (独立运行,无需依赖) |
每个 Minecraft 版本和加载器都提供独立的 jar 文件(例如 cmsall-forge-1.0.0+1.20.1.jar、cmsall-fabric-1.0.0+1.20.1.jar)。仅安装与你 Minecraft 版本和加载器匹配的单个 jar 文件。
依赖项
- Architectury API — 除 1.12.2 外的所有版本均需要,版本号见上表对应 Minecraft 版本所示(1.20.1 为 9.2.14;1.21 / 1.21.1 为 13.0.8;1.16.5 为 1.32.68)。该 Minecraft 版本的任何兼容更新版本也可用。
- Fabric API — Fabric 版 jar 文件必需。
- ModMenu — 可选,仅限 Fabric。在游戏内模组列表中添加配置按钮(参见配置部分)。未安装时模组仍可正常工作;你只需从暂停菜单或通过命令进行配置即可。
功能
- 三合一功能模组
- MineAll: 挖掘相连的完全相同类型的矿石(例如,采集煤炭不会意外触发相邻的铁矿)。
- CutAll: 砍伐整棵树和下界巨型真菌。如果需要,可以将主世界巨型蘑菇加入列表。可选择启用树叶连锁断裂。
- DigAll: 清除范围内相连的软地形方块(泥土、沙子、砾石、黏土等)——混合地形会连接在一起。
- 建筑保护(玩家放置方块追踪)
追踪玩家放置方块的坐标,并在连锁采集期间自动跳过它们。(默认对
CutAll 启用;可按功能配置。)
- 黑名单
某些方块无论列表如何设置都不会被连锁破坏——默认包括刷怪笼和末地传送门框架,你也可以添加自己的方块。
- 游戏内 GUI 配置
所有功能和服务器规则均可通过游戏内菜单进行配置——无需手动编辑 JSON 或 TOML 文件。参见配置部分。
- 按玩家激活模式
玩家可以单独选择如何触发模组:按住(潜行)、切换、始终开启或潜行反转。
- 自动重新种植
可选择在树木被砍伐后,自动从掉落的物品中重新种植树苗(可按玩家配置)。
- 灵活的掉落物管理
选项可将掉落物直接发送到玩家背包、在破坏原点收集,或自动消失配置的批量垃圾方块(如圆石或泥土)。
- 工具耐久度与安全
包含可配置的耐久度消耗乘数。链条会在工具耐久度归零之前自动停止,以防止损坏。
- 服务端权威 & 领地模组兼容
服务器配置同步到客户端,且无法由单个用户覆盖。它会触发标准的破坏事件以尊重领地和保护模组。
配置
CM'sALL 可以完全在游戏内配置——无需手动编辑配置文件。
从暂停菜单(任意位置):
- 按 Esc 打开暂停菜单。
- 点击 成就 按钮旁边的铁镐图标。
- 即时调整你的激活模式、切换选项或全服限制(仅限 OP)。
从模组列表(主标题屏幕):
- 打开 Mods → CM'sALL → Config 访问你的客户端设置(激活模式、重新种植、保护)。服务器设置不在此处显示,因为它们属于世界。
- 在 Forge / NeoForge 上此按钮是内置的。在 Fabric 上需要安装 ModMenu。
按键绑定与实用程序
- 切换键绑定: 默认未绑定以防止冲突。你可以在 选项 → 控制 下绑定
CM'sALL: Toggle 以快速开关模组而无需打开菜单。
- 玩家特定的偏好设置(激活模式、重新种植切换、保护)按玩家 UUID 保存在服务器上。
技术规格与性能
- 连锁上限: 每次采集受
globalMaxBlocks 限制(默认:256,最大:8192),以保持连锁范围可控。
- TPS 保护 (
perTickBudget):
默认情况下(0),整个连锁在一个 tick 内处理。对于高人口服务器,将此值设置为高于 0 可将工作负载分散到多个 tick(例如每个 tick 破坏 N 个方块),防止服务器卡顿和 TPS 下降。
- 追踪限制: 按功能的全球追踪上限(
trackCutMax 默认 16384;trackMineMax / trackDigMax 默认 4096)。当达到上限时,旧记录使用 FIFO(先进先出)策略被驱逐。
命令
所有功能也可以通过 /cmsall 命令结构进行管理。
适用于所有玩家
/cmsall status — 显示你当前的设置。
/cmsall mode <hold|toggle|always|sneak_invert> — 更改你的激活模式。
/cmsall toggle — 切换你的连锁采集能力。
/cmsall replant <true|false> — 切换你自己的自动重新种植。
/cmsall protect <true|false> — 切换跳过你自己放置的方块。
适用于操作员(需要权限等级 ≥ editPermissionLevel,默认 3)
/cmsall enable <true|false> — 模组的总开关。
/cmsall reload — 重新加载服务器配置文件(config/cmsall-server.json)。
/cmsall <mine|cut|dig> <block|tool> <add|remove> <id> — 添加或删除方块/工具定义(支持模组 ID)。
/cmsall track <enable|max|overflow|reset|status> — 管理放置方块的追踪。
注意:未指定命名空间的资源 ID 默认使用 minecraft:。
已知限制(Forge / NeoForge)
为确保与保护、领地及日志记录类模组的严格兼容性,在 Forge/NeoForge 环境下,CM'sALL 会对连锁破坏过程中的每一个方块都触发标准的 BlockEvent.BreakEvent。因此,其他监听破坏事件的模组(例如任务线、反作弊或工具经验模组)将对每个方块单独处理事件。Fabric 通过其收割查询 API 处理此逻辑,不会发出重复事件。
面向开发者(API)
CM'sALL 提供了一个小型且与加载器无关的 API,以便其他移动方块的模组(如自定义活塞、传送带及其他类似方块移动模组)能够使 CM'sALL 的玩家放置保护跟随这些方块一起移动。原版活塞的处理是自动完成的——此 API 仅适用于自定义的非活塞移动机制。请在服务端线程上调用。
类:cmsall.api.CmsAllTracking
推荐模式——在移动操作前后进行包裹,仅在移动完成后对实际成功着陆的方块执行 relocate。如果移动中途失败,未移动的源方块将保留其保护状态:
import cmsall.api.CmsAllTracking;
CmsAllTracking.beginMove();
try {
// ... 你的模组在此处执行实际的 setBlock 移动操作 ...
CmsAllTracking.relocate(level, landedFromTo); // 仅针对成功着陆的方块;Map<BlockPos, BlockPos>:源坐标 -> 目标坐标
} finally {
CmsAllTracking.endMove();
}
该包裹结构支持重入——嵌套调用 beginMove()/endMove()(例如各个辅助方法各自包裹一次移动操作)是安全的。你可以省略包裹结构并提前调用 relocate(即在清除源方块之前),但前提是移动操作必须是单步执行且不可能失败的情况。
relocate(ServerLevel, BlockPos from, BlockPos to) — 移动单个记录;返回该位置追踪到的记录数量(0 或 1)。
relocate(ServerLevel, Map<BlockPos, BlockPos>) — 批量移动(两阶段处理;适用于移动/重叠集合,安全);返回被迁移的记录数量。
beginMove() / endMove() — 在移动过程中抑制记录移除;务必通过 try/finally 成对使用。
支持所有版本和加载器。(在 1.12.2 中,API 可用于自定义搬运器,但原版活塞未自动挂钩。)
部分失败。 若先执行重定位然后失败,源方块仍将存在且无任何保护:CM'sALL 的孤儿清理机制会移除现在无效的目的地记录(其存储的方块 ID 与当前实际方块不匹配),但它无法为未记录的源方块重新创建记录。因此,“落地后重定位”是安全的失败处理顺序;“先重定位后落地”仅在移动过程不会失败时才安全。
软依赖。 引用这些方法时,如果 CM'sALL 未安装,可能会引发 NoClassDefFoundError。稳健的做法是将所有 CM'sALL 相关引用隔离在一个专用的集成类中,并且仅在确认 CM'sALL 存在时才访问该类——类链接/验证机制可能会在你的守卫条件执行之前就加载所引用的类型(例如当某个类型出现在方法签名或字段中时),因此仅靠“此代码路径不会执行”并不总是足够。在隔离引用周围添加存在性检查,或使用 compileOnly 依赖,均可解决问题。
Supported Languages
CM'sALL's in-game GUI, configuration menu, and command feedback automatically follow your Minecraft client's language setting — no extra setup required.
Please note that there may be mistranslations.
39 languages supported:
-
?? English
-
?? Japanese
-
?? Korean
-
?? Chinese (Simplified)
-
?? Chinese (Traditional)
-
?? German
-
?? French
-
?? Spanish (Spain)
-
?? 西班牙语(墨西哥)
-
?? 葡萄牙语(巴西)
-
?? 葡萄牙语(葡萄牙)
-
?? 意大利语
-
?? 荷兰语
-
?? 波兰语
-
?? 俄语
-
?? 乌克兰语
-
?? 土耳其语
-
?? 瑞典语
-
?? 挪威语
-
?? 丹麦语
-
?? 芬兰语
-
?? 冰岛语
-
?? 匈牙利语
-
?? 捷克语
-
?? 斯洛伐克语
-
?? 罗马尼亚语
-
?? 保加利亚语
-
?? 克罗地亚语
-
?? 斯洛文尼亚语
-
?? 塞尔维亚语
-
?? 希腊语
-
?? 印度尼西亚语
-
?? 马来语
-
?? 越南语
-
?? 泰语
-
?? 印地语
-
?? 希伯来语
-
?? 阿拉伯语
-
?? 加泰罗尼亚语
-
?? 立陶宛语
许可证
本项目采用 MIT 许可证 授权 — © 2026 G.Vael。
CM'sALL
A customizable chain-harvesting mod featuring built-in block protection to safeguard your builds.
CM'sALL integrates three essential chain-harvesting functions into a single mod while addressing a common issue: accidental destruction of player structures. By tracking player-placed blocks, it ensures that your wooden cabins, stone walls, and custom pathways remain untouched during bulk harvesting.
Supported Versions
| Minecraft |
Loaders |
Architectury API |
| 1.21.1 |
NeoForge, Fabric |
13.0.8 |
| 1.21 |
NeoForge, Fabric |
13.0.8 |
| 1.20.1 |
Forge, Fabric |
9.2.14 |
| 1.16.5 |
Forge, Fabric |
1.32.68 |
| 1.12.2 |
Forge |
— (standalone, not required) |
Each Minecraft version and loader ships as its own jar (e.g. cmsall-forge-1.0.0+1.20.1.jar, cmsall-fabric-1.0.0+1.20.1.jar). Install only the single jar that matches your Minecraft version and loader.
Dependencies
- Architectury API — required on every version except 1.12.2, at the version shown per Minecraft version in the table above (9.2.14 for 1.20.1; 13.0.8 for 1.21 / 1.21.1; 1.32.68 for 1.16.5). Any compatible newer build for that Minecraft version also works.
- Fabric API — required by the Fabric jars.
- ModMenu — optional, Fabric only. Adds the in-game config button to the mod list (see Configuration). Without it, the mod still works; you just configure it from the pause menu or via commands.
Features
- Three Functions in One Mod
- MineAll: Vein-mines connected ores of the exact same type (e.g. harvesting coal won't accidentally trigger adjacent iron ores).
- CutAll: Fells entire trees and nether huge fungi. Overworld giant mushrooms can be added to the list if desired. Leaf chain-breaking can be optionally enabled.
- DigAll: Clears connected soft terrain blocks (dirt, sand, gravel, clay, etc.) within range — mixed terrain chains together.
- Build Protection (Player-Placed Block Tracking)
Tracks the coordinates of blocks placed by players and automatically skips them during chain-harvests. (Enabled by default for
CutAll; configurable per function.)
- Denylist
Certain blocks are never chain-broken regardless of the lists — spawners and end-portal frames by default, and you can add your own.
- In-Game GUI Configuration
All features and server rules can be configured through an in-game menu — no manual JSON or TOML editing required. See Configuration.
- Per-Player Activation Modes
Players can individually choose how to trigger the mod: Hold (Sneak), Toggle, Always On, or Sneak-Invert.
- Auto-Replant
Optionally replants saplings automatically from the dropped items right after a tree is felled (configurable per player).
- Flexible Drop Management
Options to send drops directly to the player's inventory, gather them at the break origin, or automatically despawn configured bulk junk blocks (like cobblestone or dirt).
- Tool Durability & Safety
Includes a configurable durability consumption multiplier. The chain automatically stops before the tool's durability hits zero to prevent breakage.
- Server-Authoritative & Claim Mod Compatible
Server configurations sync to clients and cannot be overridden by individual users. It fires standard break events to respect land-claim and protection mods.
Configuration
CM'sALL can be configured entirely in-game — no config files to edit by hand.
From the pause menu (anywhere):
- Press Esc to open the pause menu.
- Click the iron pickaxe icon located next to the Advancements button.
- Adjust your activation mode, toggles, or server-wide limits (OP only) instantly.
From the mod list (title screen):
- Open Mods → CM'sALL → Config to access your client settings (activation mode, replant, protection). Server settings aren't shown here because they belong to a world.
- On Forge / NeoForge this button is built in. On Fabric it requires ModMenu to be installed.
Key Bindings & Utilities
- Toggle Keybind: Unbound by default to prevent conflicts. You can bind
CM'sALL: Toggle under Options → Controls to quickly flip the mod on and off without opening menus.
- Player-specific preferences (activation mode, replant toggle, protection) are saved on the server per player UUID.
Technical Specifications & Performance
- Chain Caps: Each harvest is limited by
globalMaxBlocks (Default: 256, Max: 8192) to keep chains bounded.
- TPS Protection (
perTickBudget):
By default (0), the entire chain is processed within a single tick. For high-population servers, setting this value above 0 splits the workload across multiple ticks (e.g. breaking N blocks per tick), preventing server lag and TPS drops.
- Tracking Limits: Per-function world-wide tracking caps (
trackCutMax default 16384; trackMineMax / trackDigMax default 4096). When a cap is reached, older records are evicted using a FIFO (First-In, First-Out) policy.
Commands
All functions can also be managed via the /cmsall command structure.
For All Players
/cmsall status — Displays your current settings.
/cmsall mode <hold|toggle|always|sneak_invert> — Changes your activation mode.
/cmsall toggle — Toggles your chain-harvesting capability.
/cmsall replant <true|false> — Toggles auto-replanting for yourself.
/cmsall protect <true|false> — Toggles skipping your own placed blocks.
For Operators (requires permission level ≥ editPermissionLevel, default 3)
/cmsall enable <true|false> — Master switch for the mod.
/cmsall reload — Reloads the server configuration file (config/cmsall-server.json).
/cmsall <mine|cut|dig> <block|tool> <add|remove> <id> — Adds or removes block/tool definitions (supports modded IDs).
/cmsall track <enable|max|overflow|reset|status> — Manages placed-block tracking.
Note: Resource IDs entered without a namespace default to minecraft:.
Known Limitations (Forge / NeoForge)
To ensure strict compatibility with protection, claim, and logging mods, CM'sALL fires a standard BlockEvent.BreakEvent for every single block destroyed in a chain under the Forge/NeoForge environment. Consequently, other mods tracking break events (such as quest lines, anti-cheats, or tool-XP mods) will process individual events per block. Fabric handles this via its harvest query API and does not emit duplicate events.
For Developers (API)
CM'sALL exposes a small, loader-agnostic API so other mods that move blocks (custom pistons, conveyors, and similar block-moving mods) can keep CM'sALL's player-placed protection following those blocks. Vanilla pistons are handled automatically — this is only for custom, non-piston movers. Call it on the server thread.
Class: cmsall.api.CmsAllTracking
Recommended pattern — bracket the move, then relocate only the blocks that actually landed, after moving. If the move fails partway, the un-moved source blocks keep their protection:
import cmsall.api.CmsAllTracking;
CmsAllTracking.beginMove();
try {
// ... your mod performs its actual setBlock moves here ...
CmsAllTracking.relocate(level, landedFromTo); // only blocks that landed; Map<BlockPos, BlockPos>: source -> destination
} finally {
CmsAllTracking.endMove();
}
The bracket is re-entrant — nesting beginMove()/endMove() (e.g. helpers that each bracket a move) is safe. You may skip the bracket and relocate before clearing the source only if the move is a single step that cannot fail.
relocate(ServerLevel, BlockPos from, BlockPos to) — move one record; returns how many were tracked there (0 or 1).
relocate(ServerLevel, Map<BlockPos, BlockPos>) — bulk move (two-phase; safe for shifting/overlapping sets); returns how many records were carried.
beginMove() / endMove() — suppress record removal during the move; always pair them via try/finally.
Available on every version and loader. (On 1.12.2 the API works for custom movers, but vanilla pistons are not auto-hooked.)
Partial failures. Relocating first and then failing leaves the still-present source block protected by nothing: CM'sALL's orphan sweep removes the now-bogus destination record (its stored block id no longer matches the block there), but it cannot re-create a record for an unrecorded source block. So relocate-after-landing is the fail-safe order; relocate-first is safe only when the move cannot fail.
Soft dependency. Referencing these methods when CM'sALL is not installed risks NoClassDefFoundError. The robust idiom is to isolate every CM'sALL reference in one dedicated integration class and touch it only when CM'sALL is present — class linking/verification can load referenced types before your guard line runs (e.g. when a type appears in a method signature or field), so "this code path doesn't execute" is not always enough. A presence check around an isolated reference, or a compileOnly dependency, both work.
Supported Languages
CM'sALL's in-game GUI, configuration menu, and command feedback automatically follow your Minecraft client's language setting — no extra setup required.
Please note that there may be mistranslations.
39 languages supported:
- ?? English
- ?? Japanese
- ?? Korean
- ?? Chinese (Simplified)
- ?? Chinese (Traditional)
- ?? German
- ?? French
- ?? Spanish (Spain)
- ?? Spanish (Mexico)
- ?? Portuguese (Brazil)
- ?? Portuguese (Portugal)
- ?? Italian
- ?? Dutch
- ?? Polish
- ?? Russian
- ?? Ukrainian
- ?? Turkish
- ?? Swedish
- ?? Norwegian
- ?? Danish
- ?? Finnish
- ?? Icelandic
- ?? Hungarian
- ?? Czech
- ?? Slovak
- ?? Romanian
- ?? Bulgarian
- ?? Croatian
- ?? Slovenian
- ?? Serbian
- ?? Greek
- ?? Indonesian
- ?? Malay
- ?? Vietnamese
- ?? Thai
- ?? Hindi
- ?? Hebrew
- ?? Arabic
- ?? Catalan
- ?? Lithuanian
License
This project is licensed under the MIT License — © 2026 G.Vael.
评论 0
登录后参与评分
还没有评论,来抢沙发吧