CaveMiner
挖掘一块矿石,获得整条矿脉。CaveMiner 将相连的矿石方块链接为单次挖掘动作,并准确保留工具的耐久度和附魔效果;掉落物会出现在每个被破坏方块的原始位置,或全部掉落至你的脚下。
每一个被链式挖掘的方块都会触发正常的方块破坏事件,因此区域保护、领地插件和方块日志记录器看到的矿脉表现与玩家手动挖掘时完全一致——如果矿脉延伸至他人的领地边界,它会在边界处停止,而不会穿透过去。
前置要求
- Minecraft 1.21+ 版本的 Spigot、Paper 或其分支
- Java 21
- PlaceholderAPI(可选,仅用于占位符)
命令
| 命令 |
描述 |
权限 |
/caveminer stats |
显示你自己的挖掘统计数据 |
- |
/caveminer toggle |
切换你个人的矿脉挖掘功能的开/关状态 |
caveminer.toggle |
/caveminer toggle |
切换你个人的矿脉挖掘功能的开/关状态 |
caveminer.toggle |
/caveminer reload |
重新加载 config.yml |
caveminer.reload |
/cm 是别名。矿脉挖掘功能本身需要 caveminer.use 权限,默认开启;caveminer.reload 默认为 OP 权限。
占位符
| 占位符 |
值 |
%caveminer_blocks_mined% |
通过矿脉挖掘破坏的方块数量 |
%caveminer_veins_triggered% |
触发的矿脉数量 |
%caveminer_enabled% |
当玩家关闭矿脉挖掘时为 false |
%caveminer_enabled% |
当玩家关闭矿脉挖掘时为 false |
配置
config.yml 已在文件内提供详细注释。以下是值得了解的部分:
max-chain-size 限制单条矿脉最多覆盖的方块数量。搜索过程不会加载尚未加载的区块,因此矿脉会在已加载地形的边缘自然停止,而不会在主线程上生成新地形。
merge-deepslate-variants 将 DIAMOND_ORE 和 DEEPSLATE_DIAMOND_ORE 视为同一条矿脉,这样位于深板岩边界的矿石 pocket 就不会被截断。
sneak.required 和 sneak.sneak-activates 决定潜行键是开启还是关闭矿脉挖掘功能。
disabled-worlds 列出永远不会触发矿脉挖掘的世界列表。
hunger.exhaustion-per-block 使每个额外挖掘的方块消耗饥饿值;0.005 与徒手挖掘的消耗相匹配。
drops.all-at-source-block 将所有掉落物收集到你破坏的那个方块处。经验球也会跟随掉落物一起掉落。
ore-tool-map 列出哪些矿石可以链式挖掘以及允许使用的工具。空的工具列表意味着任何工具——甚至空手——都可以进行挖掘。
掉落物和经验的获取来自方块自身的战利品表,因此“效率”和“精准采集”的效果与原版完全一致。
耐久度
每个被链式挖掘的方块消耗一点耐久度,包括“无损”附魔的效果。最终导致工具损坏的那块方块仍会被挖掘,但链条在此之后停止。
统计
stats.yml 在重启之间保持计数器数据。只有在线玩家的数据保存在内存中;退出服务器时,其数值会写回文件,该文件每五分钟写入一次,并在服务器关闭时写入。
构建
mvn clean package
生成的 jar 包位于 target/caveminer-<version>.jar。paper-api 和 PlaceholderAPI 均为 provided 范围,不会包含在最终的 jar 包中。
许可证
GNU General Public License v3.0。详见 LICENSE。
CaveMiner
Break one ore, get the whole vein. CaveMiner chains connected ore blocks into a
single mining action, keeps the tool's durability and enchantments honest, and
drops the loot either where each block stood or all at once at your feet.
Every chained block is announced as a normal block break event, so region
protection, claim plugins and block loggers see the vein exactly as they would
see a player mining it by hand - a vein that runs into someone else's claim stops
at the border instead of tunnelling through it.
Requirements
- Spigot, Paper or a fork on Minecraft 1.21+
- Java 21
- PlaceholderAPI (optional, only for the placeholders)
Commands
| Command |
Description |
Permission |
/caveminer stats |
Show your own mining statistics |
- |
/caveminer toggle |
Switch vein mining off or on for yourself |
caveminer.toggle |
/caveminer toggle |
Switch vein mining off or on for yourself |
caveminer.toggle |
/caveminer reload |
Reload config.yml |
caveminer.reload |
/cm is an alias. Vein mining itself needs caveminer.use, which defaults to
true; caveminer.reload defaults to op.
Placeholders
| Placeholder |
Value |
%caveminer_blocks_mined% |
Blocks broken through vein mining |
%caveminer_veins_triggered% |
Number of veins triggered |
%caveminer_enabled% |
false while the player switched vein mining off |
%caveminer_enabled% |
false while the player switched vein mining off |
Configuration
config.yml is documented inline. The parts worth knowing:
max-chain-size caps how many blocks one vein may cover. The search never
loads a chunk that is not already loaded, so a vein simply stops at the edge of
loaded terrain instead of generating it on the main thread.
merge-deepslate-variants treats DIAMOND_ORE and DEEPSLATE_DIAMOND_ORE as
the same vein, so an ore pocket sitting on the deepslate border is not cut in
half.
sneak.required and sneak.sneak-activates decide whether the sneak key turns
vein mining on or off.
disabled-worlds lists worlds where vein mining never triggers.
hunger.exhaustion-per-block makes every extra block cost hunger; 0.005
matches mining by hand.
drops.all-at-source-block collects the whole vein's loot at the block you
broke. Experience orbs follow the drops.
ore-tool-map lists which ores chain at all and which tools are allowed. An
empty tool list means any tool - and bare hands - will do.
Drops and experience come from the block's own loot table, so Fortune and Silk
Touch behave exactly as they do in vanilla.
Durability
Each chained block costs one point of durability, Unbreaking included. The block
that finally breaks the tool is still mined, the chain stops after it.
Statistics
stats.yml keeps the counters across restarts. Only online players are held in
memory; on quit their values move back into the file, which is written every five
minutes and on shutdown.
Building
mvn clean package
The jar lands in target/caveminer-<version>.jar. paper-api and PlaceholderAPI are
provided and stay out of it.
License
GNU General Public License v3.0. See LICENSE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧