以 Español 阅读。
适用于任意形状的记分板,而不仅仅是矩形。 用一行标记方块在空中勾勒出你的挖掘区域、边界或建筑区域,运行一条命令,ShapeBoard 就会追踪该精确形状内被破坏和放置的每一个方块。当有人走入其中时,仅为他们显示的记分板侧边栏就会出现;当他们走出时,它便会消失。
100% 服务器端运行。玩家无需安装任何内容。
查看效果

完整画质带声音的视频:shapeboard-demo.mp4
为什么需要
像 buildevents 这样的工具只能追踪矩形框。但真实的项目并非都是矩形:边界可能有圆角、河流需要跳过、形状可能奇怪地凸起。如果用一个矩形框去追踪圆形边界,那么在项目实际范围之外采矿的人仍然会出现在你的记分板上。ShapeBoard 遵循你绘制的精确轮廓,因此计数公平合理。
侧边栏也是真正针对每个玩家的。它通过定向记分板数据包发送,因此只有站在形状内部的人才能看到它。不会触碰任何队伍,也不会更改队伍颜色,即使两个玩家恰好共享相同的队伍颜色,他们的记分板也不会互相泄露。无论你的服务器使用队伍和颜色做什么,都保持原样不受影响。
安装
- 需要 Fabric API 的 Fabric 服务器,支持 Minecraft 1.21 到 26.3 的任何版本。
- 将对应 你的 Minecraft 版本的 jar 文件放入
mods/ 目录(下表说明了哪个版本对应哪个文件)。
- 重启即可。无需编辑配置文件。
选择哪个 jar
每个版本都有独立的 jar 文件,针对该版本编译。文件名始终以它所支持的 Minecraft 版本号结尾。
| Minecraft |
Jar |
Java |
| 1.21, 1.21.1 |
shapeboard-x.y.z+1.21.jar |
21 |
| 1.21.2 |
shapeboard-x.y.z+1.21.2.jar |
21 |
| 1.21.3 |
shapeboard-x.y.z+1.21.3.jar |
21 |
| 1.21.4 |
shapeboard-x.y.z+1.21.4.jar |
21 |
| 1.21.5 |
shapeboard-x.y.z+1.21.5.jar |
21 |
| 1.21.6 |
shapeboard-x.y.z+1.21.6.jar |
21 |
| 1.21.7 |
shapeboard-x.y.z+1.21.7.jar |
21 |
| 1.21.8 |
shapeboard-x.y.z+1.21.8.jar |
21 |
| 1.21.9 |
shapeboard-x.y.z+1.21.9.jar |
21 |
| 1.21.10 |
shapeboard-x.y.z+1.21.10.jar |
21 |
| 1.21.11 |
shapeboard-x.y.z+1.21.11.jar |
21 |
| 26.1, 26.1.1, 26.1.2 |
shapeboard-x.y.z+26.1.2.jar |
25 |
| 26.2 |
shapeboard-x.y.z+26.2.jar |
25 |
| 26.3 |
shapeboard-x.y.z+26.3.jar |
25 |
Minecraft 26.1 及以上版本需要 Java 25:这是游戏本身的要求,而非模组的要求。如果在不匹配的版本上尝试加载,该版本的 jar 文件会拒绝启动,而不是半工作状态。
Minecraft 26.3 需要 Fabric Loader 0.19.5 或更高版本,以及用于 26.3 的 Fabric API。
更新现有世界
干净地停止服务器并备份世界。将旧的 ShapeBoard jar 替换为你目标 Minecraft 版本的 jar,根据需要更新 Fabric Loader 和 Fabric API,然后重新启动服务器。mods/ 中只保留一个 ShapeBoard jar。
如果你保持同一个世界不变,现有的形状和总分将被保留。形状定义、扫描快照、基线和玩家偏好设置在 world/shapeboard/ 中;单独的破坏和放置分数保存在世界的原版记分板数据中。复制世界时请同时保留这两部分。无需重新创建或扫描形状即可继续计数。如果 level-name 是自定义的,请使用那个世界目录而不是 world/。
快速入门
假设 TVTvirus 是管理员,想要追踪其服务器的边界挖掘情况:
-
绘制轮廓。 飞到高于建筑的 Y 坐标(例如 y150),并用一行标记方块(例如黑色混凝土)追踪项目的形状,直到形成一个闭合回路。任何形状都可以:圆形、不规则形状、甜甜圈孔、切角等。最多 6 个方块的小间隙会自动桥接;更大的间隙会导致扫描失败,并告诉你开放端点的精确坐标,以便你去修补它们。
-
创建形状。 站在距离线条 64 格范围内的任意位置(或从控制台传递显式坐标),然后运行:
/shapeboard create bigculo minecraft:black_concrete 150
ShapeBoard 会遍历整条线,闭合形状,并报告面积:
[ShapeBoard] Shape 'bigculo' created in 45 ms: 797,680 columns inside,
outline of 4,350 blocks. Objectives: bigculo_break / bigculo_place.
只需要矩形? 完全跳过绘制步骤:给出两个对角顶点和天花板 Y 坐标即可:
/shapeboard createbox spawnzone 30640 4768 31631 6079 150
-
给它起个好听的名字。 这是玩家在侧边栏上看到的内容:
/shapeboard rename bigculo Big Culo
-
选择记分板的排名依据。 这是人们容易忽略的一步:除非另有说明,否则侧边栏按 被破坏的方块数 排名。破坏和放置都会被统计,但只有一个驱动排行榜。
/shapeboard metric bigculo break # 挖掘(默认)
/shapeboard metric bigculo place # 建筑和装饰
/shapeboard metric bigculo both # 总和
如果是建造项目而不是挖掘?运行 place 命令,否则排行榜将一直为零,尽管每个人都在工作。
如果是先挖掘后建造?在挖掘阶段将 metric 保持在 break,在开始建造的那一天将其翻转为 place。两个计数器一直在运行,所以不会丢失任何数据,任何人都可以随时使用 /shapeboard view 查看另一个(见 两个板,一个区域)。
-
就这样。 从现在开始,所有在该形状内且在标记线下方被挖掘或放置的方块都会计入原版记分板目标 bigculo_break 和 bigculo_place。任何走进的人都会得到:
[ShapeBoard] 你进入了 Big Culo。在此处挖掘或放置的方块将计入排行榜。
[ShapeBoard] 运行 /shapeboard hide 隐藏侧边栏,/shapeboard quiet 静音这些消息。
这两行消息仅显示一次,并非每次穿过区域时都显示:进入该区域后的 15 分钟内,系统会保持静默;而 /shapeboard quiet 则永久静音此类提示。
带有实时前 15 名榜单的侧边栏。如果玩家不在前 15 名但拥有分数,其自己的行会显示在最后一个位置,以便他们始终了解自己的排名。
命令
| 命令 |
适用对象 |
说明 |
/shapeboard create <id> <block> <y> [x z] |
OP |
扫描标记线并创建形状。x z 为可选起点(从控制台执行时必须提供) |
/shapeboard createbox <id> <x1> <z1> <x2> <z2> <y> |
OP |
无绘图的矩形区域:两个对角点坐标 + 顶部 Y 坐标(仅计算其下方的方块) |
/shapeboard rename <id> <name...> |
OP |
设置侧边栏上显示的显示名称 |
/shapeboard metric <id> <break|place|both> |
OP |
排行榜的统计依据:破坏方块数(默认)、放置方块数或两者之和。非常适合建造/装饰区域 |
/shapeboard total <id> <on|off> |
OP |
在侧边栏顶部显示一个 Total 行,展示所有人的累计总数(默认开启) |
/shapeboard delete <id> |
OP |
删除形状(记分板目标保留) |
/shapeboard list |
所有玩家 |
列出形状及其面积和标记信息 |
/shapeboard info <id> |
所有玩家 |
某个形状的详细信息 |
/shapeboard top [id] |
所有玩家 |
在聊天窗口中显示前 10 名及总数 |
/shapeboard hide / show |
所有玩家 |
按玩家切换侧边栏显示状态,跨会话记忆 |
/shapeboard view <break|place|both|reset> |
所有玩家 |
设置 你的 侧边栏统计依据,独立于区域设置。reset 使其重新跟随区域设置 |
/shapeboard quiet [on|off] |
所有玩家 |
静音进入/离开区域的聊天提示。侧边栏功能不受影响。不带参数可切换开关状态 |
/shapeboard suffix <id> <word|auto|off> |
OP |
设置在侧边栏标题中显示名称后的后缀词。auto 会根据当前统计类型自动变为 Dig / Build / Both |
/shapeboard prefix <id> <word|off> |
OP |
设置在显示名称前的前缀词 |
/shapeboard contains <id> <x> <z> |
OP |
调试:此列是否位于形状内部? |
/shapeboard scan <id> |
OP |
统计形状内仍存在的方块数量(参见 挖掘进度) |
/shapeboard progress [id] |
所有玩家 |
显示进度条及距离上次扫描后剩余的方块数量 |
| `/shapeboard layer [y] [id]$ |
所有玩家 |
查看特定 Y 层的数据,并与该层的初始状态进行对比 |
| `/shapeboard down <y> [id]$ |
所有玩家 |
从扫描最高点向下至指定 Y 坐标的所有剩余方块:即在形状完全清理至 y 之前还剩多少 |
| `/shapeboard blocks [id]$ |
所有玩家 |
列出所有仍存在的方块类型,按数量降序排列(即你需要搬运出的方块) |
| `/shapeboard range <id> <ymin> <ymax>$ |
OP |
定义扫描覆盖的 Y 轴范围(默认:基岩层之上至标记 Y 坐标) |
| `/shapeboard baseline <id> <blocks>|fromscan$ |
OP |
设定挖掘开始前的方块基数。fromscan 锁定最后一次扫描的结果,0 表示使用原始体积 |
| `/shapeboard untracked <id> <name>$ |
OP |
记录未被计入任何玩家的挖掘行为(如预挖、爆炸、世界编辑),归入一个假名之下,并在每次扫描后同步重置。设为 off 可移除该条目 |
双榜合一,同一区域
一个先被挖掘后被重建的区域需要两套排行榜。它已经具备这一功能:破坏与放置始终分别计入两个独立的目标,即 <id>_break 和 <id>_place。metric 命令仅决定侧边栏显示哪一个统计维度,因此无需重复创建,也不存在第二个形状的问题(重叠的形状本身也无法工作:一列方块归属于包含它的那个第一个形状)。
/shapeboard metric virusia break # 挖掘阶段,所有人看到的是挖掘数据
/shapeboard metric virusia place # 建造日,一条命令,同一区域
/shapeboard view place # 任意玩家,任意时间,仅对自己生效
/shapeboard view reset # 恢复为跟随区域设置的默认值
view 是按玩家独立的,且跨会话记忆,因此建造者可以在挖掘者查看自己榜单的同时,观察放置数据。为了让用户清楚自己正在查看哪个榜单,可以为形状设置自动后缀:
/shapeboard rename virusia Virusia
/shapeboard suffix virusia auto
此时侧边栏标题将显示为 Virusia Dig、Virusia Build 或 Virusia Both,具体取决于该观众当前的统计依据。你也可以使用固定文字(例如 /shapeboard suffix virusia Build),而 /shapeboard prefix 可用于添加前缀。
挖掘进度
破坏计数器回答的是“谁挖得最多”,但它无法回答“还剩多少”,因为 TNT 爆炸和世界编辑的方块不会被记在任何人名下。/shapeboard scan 直接解决这个问题:它统计形状内 仍然存在的 方块数量。
/shapeboard scan bigculo
/shapeboard progress bigculo
— Big Culo 进度 —
████████░░░░░░░░░░░░ 41.74%
进度:已清除 280,374 / 671,744 个方块,剩余 391,370 个
待挖掘:deepslate 202,334, stone 115,216, tuff 15,297, diorite 12,677
当一个方块是固体、可碰撞且可被破坏时,它才被计为“仍需挖掘”。空气、水、岩浆、树叶、草以及其他装饰性方块以及基岩都会被跳过,因此当坑洞真正完工时,进度条会达到 100%。
分母。 默认情况下,它是 Y 轴切片的原始体积(列数 × 高度)。这是精确的且无需额外设置,但天然洞穴和地形上方的空气会被视为“已被挖掘”,因此进度条起始值大于零。为了获得真实读数,请在开始挖掘前测量实际方块数量并手动设定:
/shapeboard baseline bigculo 148300000
你可以通过对未挖掘前的世界副本或具有相同种子号的 freshly generated world(新生成的世界)进行扫描来获取该数值。
让计分板数据准确无误。 玩家个人的计数器仅统计分配给玩家的贡献。在形状存在之前挖掘的方块、爆炸和世界编辑操作对它们来说是不可见的,因此排行榜总分可能远低于扫描测得的数值。将虚假名称指向差值部分,即可避免数据丢失:
/shapeboard untracked bigculo Untracked
该数值会在每次扫描后重新计算,因此计分板始终与实际挖掘量相符。执行 /shapeboard untracked <id> off 可移除该条目。
挖掘至目标 Y 坐标。 逐层挖掘使用 /shapeboard layer,一次性挖掘目标深度以上的所有区域使用 /shapeboard down。它会从扫描顶部开始向下累加直到该 Y 坐标的所有剩余方块,这正是团队真正关心的问题(“在达到 y-20 之前还需要挖多少?”):
/shapeboard down -20 bigculo
— Big Culo · down to y-20 —
███████░░░░░░░░░░░░░ 38.60%
Down to y-20: 210,455 / 545,180 blocks cleared, 334,725 remaining
Layers: 43 of 96 cleared from y99 down to y-20, highest one left is y41.
两者均读取上次扫描的数据,因此能即时回答且无需额外开销。
性能消耗。 扫描在后台线程运行,并直接从存储中读取区块数据,因此服务器仍可正常运行。一个 4,096 列的区域大约需要 ~50 毫秒;一个 800,000 列的周长区域则需要几秒。它会自动先保存世界,以确保 freshly dug chunks(新挖掘的区块)始终被包含在内。通过 cron 任务(每小时或每天)运行扫描,然后 /shapeboard progress 即可从存储的快照中即时获取进度。
工作原理
- 扫描: 从种子方块开始,ShapeBoard 沿着该精确 Y 坐标上的标记方块连线行走(仅加载连线穿过的区块),自动桥接最多 6 个方块的间隙,然后从外部进行泛洪填充。泛洪无法到达的所有区域即为内部。对角线能正确阻止填充,因此带有 45 度角的轮廓是可行的。
- 掩码: 结果以
world/shapeboard/shapes.json 中每 x 列的 z 区间形式存储。查询仅需几次整数比较,因此即使有数十名玩家同时挖掘,跟踪成本也几乎为零。
- 计数: 方块破坏通过 Fabric 的破坏事件进行计数,方块放置通过一个小混入(mixin)进行计数。只有位于形状内部且低于标记 Y 坐标的列才被计入分数。分数写入原版计分板目标(scoreboard objectives),因此服务器上的其他内容(命令、数据包、其他模组)均可读取它们。
- 侧边栏: 每位查看者通过定向数据包(
shapeboard_view)获得一个仅客户端的虚假目标,仅在数字变化时刷新。离开区域会将其移除,并恢复服务器原本显示的侧边栏目标。计分板上的玩家名称保持其队伍颜色。
常见问题
客户端需要安装任何东西吗? 不需要。原版玩家可以看到所有内容。
TNT 呢? 由爆炸破坏的方块不归属于任何人(游戏不会将它们归因于任何玩家)。手挖和使用工具正常计数。
地毯机器人(carpet bots)会被计入吗? 它们的破坏和放置操作会以机器人的名义计数,因此重度依赖机器人的挖掘仍能显示是谁在执行操作。机器人永远不会收到侧边栏或聊天消息。
多个形状? 是的,可以创建任意数量。站在其中一个形状内的玩家会看到该形状的计分板。
如果我的轮廓中间有空洞怎么办? 扫描失败并打印开放线条末端的坐标。修补它们(或留出最多 6 个方块的间隙,这些会自动桥接)并重新运行 create。
我可以跟踪没有轮廓的建筑或装饰区域吗? 可以,有两种方式。如果矩形足够,/shapeboard createbox <id> <x1> <z1> <x2> <z2> <y> 完全不需要方块。对于自定义形状,标记线仅在扫描期间需要:在建筑上方 Y 处用任何廉价方块绘制临时轮廓,运行 create,然后移除方块;形状将永久有效(掩码存储在 world/shapeboard/ 中)。无论哪种方式,设置 /shapeboard metric <id> place 以便排行榜按放置的方块排名而非挖掘的方块排名(或使用 both 计算总和)。
我可以跟踪已经进行过挖掘的区域吗? 当形状创建时,目标计数从零开始。如果你在另一个目标中有之前的数值,可以使用 /scoreboard players operation 将其复制过来。
扫描会让服务器卡顿吗? 它仅在创建时加载轮廓本身触及的区块,且只加载一次。在一个已加载的世界中,4,000 个方块的轮廓耗时远少于一秒。
从源码构建
./gradlew build
Jar 文件位于 build/libs/ 中。Java 21+ 即可,Gradle 会下载其余依赖。这构建的是 1.21 版本,即源码树所针对的版本。
对于其他 Minecraft 版本:
python3 tools/multiversion.py # 全部版本,输出到 build/multiversion/
python3 tools/multiversion.py 26.2 # 仅一个版本
python3 tools/multiversion.py 26.2 --errors # 仅编译,列出所有错误
单一源码树,无需为每个版本单独分支:Minecraft 发行版之间的差异主要是重命名,它们位于 tools/multiversion.py 顶部的替换表中。26 系列还需要自己的工具链,因为 Minecraft 自 26.1 起不再提供混淆代码,也没有映射可供查询,且该构建脚本由此衍生而非与其并列。在本地构建 26 系列的 Jar 包需要 JDK 25 以及 JDK 21。
许可证
MIT
Read this in Español.
Scoreboards for areas of ANY shape, not just boxes. Outline your dig zone, perimeter or build area with a line of marker blocks in the sky, run one command, and ShapeBoard tracks every block broken and placed inside that exact shape. When someone walks in, a leaderboard sidebar appears just for them. When they walk out, it goes away.
100% server-side. Players do not install anything.
See it in action

Full quality video with sound: shapeboard-demo.mp4
Why
Tools like buildevents can only track rectangular boxes. Real projects are not rectangles: perimeters have round corners, rivers you want to skip, weird bulges. If you track a box around a round perimeter, people mining outside the actual project still climb your leaderboard. ShapeBoard follows the exact outline you drew, so the count is fair.
The sidebar is also per-player for real. It is sent with targeted scoreboard packets, so only the people standing inside the shape see it. No teams are touched, no team colors are changed, and two players who happen to share a team color do not leak the board to each other. Whatever your server uses teams and colors for stays intact.
Install
- Fabric server with Fabric API, on any Minecraft from 1.21 to 26.3.
- Drop the jar for your Minecraft version into
mods/ (the table below says which one).
- Restart. Done: there is no config file to edit.
Which jar
Every version gets its own jar, compiled against that version. The name always ends in the Minecraft version it is for.
| Minecraft |
Jar |
Java |
| 1.21, 1.21.1 |
shapeboard-x.y.z+1.21.jar |
21 |
| 1.21.2 |
shapeboard-x.y.z+1.21.2.jar |
21 |
| 1.21.3 |
shapeboard-x.y.z+1.21.3.jar |
21 |
| 1.21.4 |
shapeboard-x.y.z+1.21.4.jar |
21 |
| 1.21.5 |
shapeboard-x.y.z+1.21.5.jar |
21 |
| 1.21.6 |
shapeboard-x.y.z+1.21.6.jar |
21 |
| 1.21.7 |
shapeboard-x.y.z+1.21.7.jar |
21 |
| 1.21.8 |
shapeboard-x.y.z+1.21.8.jar |
21 |
| 1.21.9 |
shapeboard-x.y.z+1.21.9.jar |
21 |
| 1.21.10 |
shapeboard-x.y.z+1.21.10.jar |
21 |
| 1.21.11 |
shapeboard-x.y.z+1.21.11.jar |
21 |
| 26.1, 26.1.1, 26.1.2 |
shapeboard-x.y.z+26.1.2.jar |
25 |
| 26.2 |
shapeboard-x.y.z+26.2.jar |
25 |
| 26.3 |
shapeboard-x.y.z+26.3.jar |
25 |
Minecraft 26.1 and up need Java 25: that is the game's requirement, not the mod's. The jar for a version will refuse to load on a different one rather than half work.
Minecraft 26.3 requires Fabric Loader 0.19.5 or newer and Fabric API for 26.3.
Updating an existing world
Stop the server cleanly and back up the world. Replace the old ShapeBoard jar with the jar for your target Minecraft version, update Fabric Loader and Fabric API as needed, then start the server again. Keep only one ShapeBoard jar in mods/.
Existing shapes and totals are retained when you keep the same world. Shape definitions, scan snapshots, baselines and player preferences live in world/shapeboard/; individual break and placement scores live in the world's vanilla scoreboard data. Keep both when copying a world. Shapes do not need to be recreated or scanned again to resume counting. If level-name is customized, use that world directory instead of world/.
Quick start
Say TVTvirus is admin and wants to track his server's perimeter dig:
-
Draw the outline. Fly to a Y above the build (for example y150) and draw one continuous line of a marker block (for example black concrete) tracing the shape of the project, until it closes on itself. Any shape works: circles, blobs, donut holes, cut corners. Small gaps up to 6 blocks are bridged automatically; bigger gaps make the scan fail and it tells you the exact coordinates of the open ends so you can go patch them.
-
Create the shape. Stand anywhere within 64 blocks of the line (or pass explicit coordinates from the console) and run:
/shapeboard create bigculo minecraft:black_concrete 150
ShapeBoard walks the whole line, closes the shape, and reports the area:
[ShapeBoard] Shape 'bigculo' created in 45 ms: 797,680 columns inside,
outline of 4,350 blocks. Objectives: bigculo_break / bigculo_place.
Just want a rectangle? Skip the drawing entirely: give it two opposite corners and the ceiling Y instead:
/shapeboard createbox spawnzone 30640 4768 31631 6079 150
-
Give it a pretty name. This is what players see on the sidebar:
/shapeboard rename bigculo Big Culo
-
Pick what the leaderboard ranks by. This is the step people miss: the sidebar ranks by blocks broken unless you say otherwise. Both breaks and placements are always counted, but only one of them drives the board.
/shapeboard metric bigculo break # digs (default)
/shapeboard metric bigculo place # builds and decoration
/shapeboard metric bigculo both # the sum
Building a project rather than digging one? Run the place line, or the board will sit at zero while everyone works.
Digging a place first and building it later? Leave metric on break for the dig phase, flip it to place on the day the building starts. Both counters ran all along, so nothing is lost, and anyone can watch the other one at any time with /shapeboard view (see Two boards, one zone).
-
That is it. From now on, everything mined or placed inside the shape and below the marker line counts into the vanilla scoreboard objectives bigculo_break and bigculo_place. Anyone who walks in gets:
[ShapeBoard] You entered Big Culo. Blocks you mine or place here count toward the leaderboard.
[ShapeBoard] Run /shapeboard hide to hide the sidebar, /shapeboard quiet to mute these messages.
Those two lines are shown once, not on every crossing: the same zone stays quiet for 15 minutes afterwards, and /shapeboard quiet mutes them for good.
with a live top 15 sidebar. If they are not in the top 15 but have a score, their own line is shown in the last slot so they always see where they stand.
Commands
| Command |
Who |
What |
/shapeboard create <id> <block> <y> [x z] |
OP |
Scan the marker line and create a shape. x z optional start point (required from console) |
/shapeboard createbox <id> <x1> <z1> <x2> <z2> <y> |
OP |
Rectangular zone with no drawing at all: two opposite corners + the ceiling Y (only blocks below it count) |
/shapeboard rename <id> <name...> |
OP |
Set the display name shown on the sidebar |
/shapeboard metric <id> <break|place|both> |
OP |
What the leaderboard ranks by: blocks broken (default), placed, or the sum. Perfect for build/decoration zones |
/shapeboard total <id> <on|off> |
OP |
Show a Total line at the top of the sidebar with everyone's combined count (on by default) |
/shapeboard delete <id> |
OP |
Delete the shape (scoreboard objectives are kept) |
/shapeboard list |
all |
List shapes with area and marker info |
/shapeboard info <id> |
all |
Details of one shape |
/shapeboard top [id] |
all |
Top 10 + totals in chat |
/shapeboard hide / show |
all |
Per-player sidebar toggle, remembered across sessions |
/shapeboard view <break|place|both|reset> |
all |
What your sidebar ranks by, whatever the zone is set to. reset follows the zone again |
/shapeboard quiet [on|off] |
all |
Mute the entered/left chat lines. The sidebar keeps working. No argument toggles it |
/shapeboard suffix <id> <word|auto|off> |
OP |
Word after the display name on the sidebar title. auto turns into Dig / Build / Both, following what is being ranked |
/shapeboard prefix <id> <word|off> |
OP |
Word before the display name |
/shapeboard contains <id> <x> <z> |
OP |
Debug: is this column inside the shape? |
/shapeboard scan <id> |
OP |
Count the blocks still standing inside the shape (see Dig progress) |
/shapeboard progress [id] |
all |
Progress bar and remaining block count from the last scan |
/shapeboard layer [y] [id] |
all |
One Y layer, measured against what that layer started with |
/shapeboard down <y> [id] |
all |
Everything still standing from the top of the scan down to that Y: how much is left before the shape is clear to y |
/shapeboard blocks [id] |
all |
Every block type still standing, best first (what you will be hauling out) |
/shapeboard range <id> <ymin> <ymax> |
OP |
Y slice the scan covers (default: above the bedrock floor, up to the marker Y) |
/shapeboard baseline <id> <blocks>|fromscan |
OP |
How many blocks were there before digging started. fromscan freezes the last scan, 0 = use the raw volume |
/shapeboard untracked <id> <name> |
OP |
Hold the digs nobody was credited for (pre-shape digs, explosions, world edits) under a fake name, resynced after every scan. off removes it |
Two boards, one zone
A zone that gets dug out first and built up later needs two leaderboards in the
same place. It already has them: breaks and placements are always counted into
two separate objectives, <id>_break and <id>_place. The metric only picks
which one the sidebar shows, so nothing has to be duplicated and there is no
second shape to create (overlapping shapes would not work anyway: a column
belongs to the first shape that contains it).
/shapeboard metric virusia break # dig phase, everyone sees the digs
/shapeboard metric virusia place # building day, one command, same zone
/shapeboard view place # any player, any time, just for them
/shapeboard view reset # back to whatever the zone shows
view is per player and remembered across sessions, so a builder can watch the
placements while the diggers keep their own board. To make it obvious which one
you are looking at, give the shape an auto suffix:
/shapeboard rename virusia Virusia
/shapeboard suffix virusia auto
The sidebar title then reads Virusia Dig, Virusia Build or Virusia
Both, following whatever that viewer is ranking by. A fixed word works too
(/shapeboard suffix virusia Build), and /shapeboard prefix puts one in front.
Dig progress
Break counters answer "who dug the most". They cannot answer "how much is left",
because TNT and world edits are not credited to anyone. /shapeboard scan answers
that directly: it counts the blocks still standing inside the shape.
/shapeboard scan bigculo
/shapeboard progress bigculo
— Big Culo progress —
████████░░░░░░░░░░░░ 41.74%
Progress: 280,374 / 671,744 blocks cleared, 391,370 remaining
Left to dig: deepslate 202,334, stone 115,216, tuff 15,297, diorite 12,677
A block counts as "still to dig" when it is solid, collidable and breakable.
Air, water, lava, leaves, grass and other decoration, and bedrock are all
skipped, so the bar reaches 100% when the hole is actually finished.
The denominator. By default it is the raw volume of the Y slice
(columns x height). That is exact and needs no setup, but natural caves and the
air above the terrain count as "already dug", so the bar starts above zero. For a
true reading, measure how many blocks were there before you started and set it:
/shapeboard baseline bigculo 148300000
You can get that number by scanning the same area on a copy of the world from
before the dig, or on a freshly generated world with the same seed.
Making the board add up. The per-player counters only see what players are
credited for. Blocks dug before the shape existed, explosions and world edits
are invisible to them, so the leaderboard total can sit well below what the scan
measured. Point a fake name at the difference and it stops getting lost:
/shapeboard untracked bigculo Untracked
It is recalculated after every scan, so the board always adds up to the real
hole. /shapeboard untracked <id> off removes it.
Digging to a target Y. Layer by layer is /shapeboard layer, and everything
above a target depth at once is /shapeboard down. It adds up every block still
standing from the top of the scan down to that Y, which is the question crews
actually ask ("how much before we are clear to y-20?"):
/shapeboard down -20 bigculo
— Big Culo · down to y-20 —
███████░░░░░░░░░░░░░ 38.60%
Down to y-20: 210,455 / 545,180 blocks cleared, 334,725 remaining
Layers: 43 of 96 cleared from y99 down to y-20, highest one left is y41.
Both read from the last scan, so they answer instantly and cost nothing.
Cost. The scan runs on a worker thread and reads chunk data straight from
storage, so the server keeps ticking. A 4,096 column zone takes ~50 ms; a
800,000 column perimeter takes a few seconds. It saves the world first, so
freshly dug chunks are always included. Run it from a cron job (hourly or daily)
and /shapeboard progress answers instantly from the stored snapshot.
How it works
- Scan: starting from a seed block, ShapeBoard walks the connected line of marker blocks at that exact Y (loading only the chunks the line passes through), auto-bridges gaps up to 6 blocks, then runs a flood fill from outside. Everything the flood cannot reach is inside. A diagonal line blocks the fill correctly, so outlines with 45 degree corners are fine.
- Mask: the result is stored as z-intervals per x column in
world/shapeboard/shapes.json. A lookup is a couple of integer comparisons, so tracking costs nothing even with dozens of players digging.
- Counting: block breaks are counted through Fabric's break event, block placements through a tiny mixin. Only columns inside the shape and below the marker Y count. Scores go to plain vanilla scoreboard objectives, so everything else on your server (commands, datapacks, other mods) can read them.
- Sidebar: each viewer gets a client-only fake objective through targeted packets (
shapeboard_view), refreshed only when the numbers change. Leaving the area removes it and restores whatever sidebar objective the server had displayed. Player names on the board keep their team colors.
FAQ
Does it need anything on the client? No. Vanilla players see everything.
What about TNT? Blocks broken by explosions are not credited to anyone (the game does not attribute them to a player). Hand mining and tools count normally.
Do carpet bots count? Their breaks and placements count under the bot's own name, so a bot-heavy dig still shows who ran what. Bots never receive sidebars or chat messages.
Multiple shapes? Yes, create as many as you want. A player standing inside one sees that shape's board.
What if my outline has a hole in it? The scan fails and prints the coordinates of the open line ends. Patch them (or leave up to 6 blocks, which bridge automatically) and rerun create.
Can I track a build or decoration area that has no outline? Yes, two ways. If a rectangle is enough, /shapeboard createbox <id> <x1> <z1> <x2> <z2> <y> needs no blocks at all. For a custom shape, the marker line is only needed during the scan: draw a temporary outline with any cheap block at a Y above the build, run create, then remove the blocks; the shape keeps working forever (the mask is stored in world/shapeboard/). Either way, set /shapeboard metric <id> place so the leaderboard ranks by blocks placed instead of dug (or both for the sum).
Can I track an area that already had digging? Objectives start at zero when the shape is created. If you have previous numbers in another objective, copy them in with /scoreboard players operation.
Does the scan lag the server? It loads only the chunks the outline itself touches, once, at create time. A 4,000 block outline takes well under a second on a loaded world.
Building from source
./gradlew build
The jar lands in build/libs/. Java 21+, Gradle downloads everything else. That builds for 1.21, which is the version the source tree is written against.
For every other Minecraft version:
python3 tools/multiversion.py # all of them, into build/multiversion/
python3 tools/multiversion.py 26.2 # just one
python3 tools/multiversion.py 26.2 --errors # compile only, list every error
One source tree, no branch per version: the differences between Minecraft releases are renames, and they live in a substitution table at the top of tools/multiversion.py. The 26 series also needs its own toolchain, since Minecraft stopped shipping obfuscated in 26.1 and there are no mappings to ask for any more, and that build script is derived from this one rather than kept beside it. Building the 26 jars locally needs a JDK 25 as well as the 21.
License
MIT
评论 0
登录后参与评分
还没有评论,来抢沙发吧