Chunksmith
预生成你的世界——并亲眼看见它。
Chunksmith 会提前生成区块,让玩家无需等待世界生成。它的独特之处在于,同一遍运行 也会为 Distant Horizons 或 voxy 构建远景数据。一次运行,双重效果:一个即装即玩的即时加载世界,以及一个能一直看到地平线尽头的世界。
最初源自 pop4959 的 Chunky;此后独立开发。Chunky 具备的所有功能,Chunksmith 依然保留。
完整文档位于 Wiki —— 涵盖每一项设置、每一个命令,以及预生成、裁剪和配置多人 LOD 的工作指南。
报告错误或提出问题
Chunksmith 新增的功能
它在预生成的同时构建你的 LOD 数据
无需第二遍运行。无需重新读取区域文件。无需事后单独进行 LOD 预生成。安装 Distant Horizons 或 voxy,运行一次预生成,远景地形便自然呈现。
自动启用。 如果安装了渲染器,LOD 生成就已开启。无需寻找任何配置项。
已经预生成过? 再次运行相同的预生成。Chunksmith 会从已有的区块中构建 LOD —— 它不会重新生成这些区块,且会跳过所有已完成的部分。今天预生成,下个月安装渲染器,毫无损失。
无需辅助模组的多人 LOD。 加入服务器的玩家会下载预生成的 LOD 数据,并在未实际探索的情况下看到整个世界的远景。同一个 jar 包同时承担服务端和客户端的功能。Paper/Spigot 插件也能提供该服务,因此模组客户端连接插件服务器也能正常工作。
无磁盘占用的 LOD(4.4.0)。 /cs horizon <radius> 会在指定半径内正常预生成,而在半径之外,它会构建 LOD 并将区块丢弃而非保存。原本可能达到数百 GB 的世界现在仅保留玩家实际游玩的区域,而远处的地形依然可见 —— 在单人游戏中以及对每位加入的玩家都有效。玩家接近的区块始终会被保留。此功能不与 Moonrise 兼容;在 Paper 上,完全生成的区块会被丢弃,但边缘处部分生成的区块仍会被写入。
它在玩家游戏的同时继续生成
大多数预生成工具让你必须在速度和可玩性之间做出选择。Chunksmith 测量的是它对刻时间 增加 的量,而非基于绝对刻时间进行控制 —— 因此,如果一个服务器本身就已经因为其他原因负载较高,它不会将 Chunksmith 限制到几乎无法运作的地步,因为这些负载并非由 Chunksmith 引起。
每个在线玩家都会进一步缩减允许使用的资源额度,所以空服时全速运行,而繁忙时主动让步。如果服务器仍然无法维持,运行过程 会自动暂停并说明原因,待情况恢复后继续。你执行的 /cs pause 始终拥有最高优先级。
性能提升显著
dispatchMaxConcurrent 控制着同时处于传输状态的区块请求数量,它会根据你的 CPU 核心数进行扩展,而不是使用固定的上限。在一台 8 核专用服务器上,将其从旧的固定值 50 提高到 200,实测速度提升了 +39% -- 从每秒 31.6 个区块提升至 43.9 个区块。该参数支持热重载(Live)。
其他模组的结构能够正常生成
如果预生成器在区块生成的瞬间就将其丢弃,会破坏所有那些响应“新区块出现”并在后续刻中构建结构的模组——当它们查看时,地面已经消失了。在使用 Millenaire 模组对 1.21.1 版本进行预生成测试时:309 次放置尝试,309 次延迟处理,零村庄生成。
Chunksmith 会在所有八个相邻区块都存在之前保留当前区块,然后再释放它。这里没有任何针对特定模组的内容——规则基于区块本身,因此任何依赖新土地构建的模组都能受益。
它能提示你世界生成出现了问题
通过过度覆盖检测和结构故障归因,让你能够识别出损坏的世界生成模组,而不仅仅是忍受其带来的后果。
全部支持热重载
所有设置均可实时读取和修改——无需重启、无需编辑文件、无需服务器停机。服务器设置使用 /cs set;属于你客户端的设置使用 /csclient set。这是该项目坚持的原则之一:如果添加了一个设置却没有为其提供对应的命令,测试就会失败。
Chunky 曾经具备的功能
灵活的地形形状(方形、圆形、菱形、三角形、星形等),可围绕坐标、世界出生点或世界边界居中。支持多世界。实时进度、速率、预计完成时间以及可选的 Boss 栏。暂停、继续、取消以及重启后继续。世界修剪。用于进度和完成事件的开发者 API。
安装说明
服务器端必需——或者在单人游戏中(此时你的游戏即充当服务器)。客户端安装是可选的。
你仅在客户端需要安装它以实现**多人 LOD(细节层次)**功能:以便看到你尚未行走过的服务器上的预生成远处地形。仅进行预生成则不需要客户端安装任何东西。
本模组以 Fabric、Forge 和 NeoForge 模组 以及 Paper / Spigot 插件 的形式发布。(不支持 Folia。从 4.0.0 版本开始,插件将完全无法在 Folia 上加载——因为它不再声明 folia-supported,所以 Folia 会拒绝加载它,而不是运行一个未经测试的平台。一个不可验证的声明比没有声明更糟糕。)
服务器和客户端必须运行相同的主版本号。 4.0.0 更改了 LOD 的网络协议,混合使用 3.x/4.x 版本会导致双向 LOD 关闭:客户端不会获取数据,服务器也不会提供服务。其他一切照常工作——只是远处的地形不再到达,双方都会明确提示这一情况,而不是出现奇怪的错误。
值得提前了解的是:启动器会向任何处于 3.x 版本的玩家提供 4.0.0 版本的更新,因此客户端可能会在不触碰服务器的情况下被更新到不匹配的版本。请确保两者同步更新。
将渲染器仅安装在客户端。 Distant Horizons 和 Voxy 负责绘制远处的地形,而只有客户端才会进行任何绘制——服务器只是传输数据。强烈不建议在服务器上安装渲染器;从 3.18.1 版本开始,服务器会在启动时以红色字体明确告知你这一点。它在 CPU 资源上与 Chunksmith 预生成的区块竞争,并重复发送玩家已经收到的 LOD(细节层次)数据;此外,在服务端运行 Distant Horizons 还会导致控制台充满 [SharedApi] No DH level provided ... 的警告信息。这样做没有任何好处。如果你的服务器上 LOD 出现问题,首先应检查的就是这一点。
各加载器和 Minecraft 版本的渲染器支持情况见 Supported renderers 页面 —— 包括 voxy 的分叉版本,以及 Chunksmith 拒绝与之共存的模组列表。
快速入门
/cs world <world> # 选择世界
/cs spawn # 以出生点为中心
/cs radius 5000 # 生成范围半径
/cs start # 开始生成
使用 /cs progress 查看进度,根据需要暂停(/cs pause)和继续(/cs continue)。其余操作请参考 wiki。
源码
CSv3-Current —— 3.x 和 4.x 分支,当前开发在此进行。2.x 分支已冻结于 CSv2_archive。
许可证
GPL-3.0-only。原始 Chunky 版权归 pop4959 所有。Chunksmith 修改部分版权归 Kishku7 所有。
Chunksmith
Pre-generate your world -- and see it.
Chunksmith generates chunks ahead of time so players never wait on worldgen. What makes it different
is that the same pass also builds the distant-horizon data for Distant Horizons or voxy. One run,
two results: a world that loads instantly, and a world you can see to the edge of.
Originally derived from Chunky by pop4959; developed
independently since. Everything Chunky did, Chunksmith still does.
Full documentation is on the wiki -- every
setting, every command, and walkthroughs for pregenerating, trimming, and getting multiplayer LOD
working.
Report a bug or ask a question
What Chunksmith adds
It builds your LOD data while it pregenerates
No second pass. No re-reading region files. No separate LOD pregen afterwards. Install Distant
Horizons or voxy, run a pregen, and the distant terrain is simply there.
It turns itself on. If a renderer is installed, LOD generation is on. There is no config key to
hunt for.
Already pregenerated? Run the same pregen again. Chunksmith builds LODs from the chunks it
already has -- it does not regenerate them, and it skips everything already done. Pregenerate today,
install a renderer next month, lose nothing.
Multiplayer LOD, with no companion mod. Players joining your server download the pregenerated LOD
data and see the whole world at distance without ever having walked it. The same jar is both halves --
server and client. The Paper/Spigot plugin serves it too, so a modded client against a plugin server
works.
LOD without the disk (4.4.0). /cs horizon <radius> pregenerates normally inside the radius and,
past it, builds the LOD and throws the chunk away instead of saving it. A world that would have been
hundreds of gigabytes keeps only the area people actually play in, and the distant terrain still shows
-- in single-player and for every player who joins. Chunks a player goes near are always kept. Not
available with Moonrise; on Paper, the fully generated chunks are dropped but some partly generated
ones at the edges are still written.
It keeps generating while people are playing
Most pregenerators make you choose between speed and a playable server. Chunksmith measures what it
adds to tick time rather than steering on absolute tick time -- so a server already running hot for
its own reasons doesn't throttle Chunksmith to nothing for load it didn't cause.
Every online player shrinks the allowance further, so an empty server runs flat out and a busy one
actively gives ground. If the server still can't sustain it, the run pauses itself with a stated
reason and resumes when things recover. Your /cs pause always outranks it.
It is measurably faster
dispatchMaxConcurrent controls how many chunk requests stay in flight, and it scales to your CPU
instead of a fixed cap. On an 8-core dedicated server, raising it from the old fixed 50 to 200
measured +39% -- 31.6 to 43.9 chunks/sec. Settable live.
Other mods' structures actually get built
A pregenerator that drops each chunk the instant it's generated breaks every mod that reacts to "a
new chunk appeared" and then builds on a later tick -- the ground is already gone by the time it
looks. Measured with Millenaire on a 1.21.1 pregen: 309 placement attempts, 309 deferrals, zero
villages.
Chunksmith holds each chunk until all eight neighbours exist, then releases it. Nothing here is
mod-specific -- the rule is about chunks, so anything that builds on new land benefits.
It tells you when worldgen misbehaves
Overreach detection and structure-fault attribution, so a broken worldgen mod is something you can
identify rather than something you merely suffer.
Everything is live
Every setting is readable and settable live -- no restart, no editing files, no server downtime.
Server settings are /cs set; the ones that belong to your own client are /csclient set. That's a
rule the project holds itself to, with a test that fails if a setting is added without a command for
it.
Everything Chunky did
Flexible shapes (square, circle, diamond, triangle, star, and more), centred on coordinates, world
spawn, or the world border. Multi-world. Live progress, rate, ETA and an optional boss bar. Pause,
continue, cancel, and continue-on-restart. World trimming. A developer API for progress and
completion events.
Installing
Required on the server -- or in single-player, where your own game is the server. The client
install is optional.
You only need it on the client for multiplayer LOD: to see pregenerated distant terrain on a
server you haven't walked. Pre-generation alone needs nothing on the client.
Ships as a Fabric, Forge, and NeoForge mod and a Paper / Spigot plugin. (Folia is not
supported. From 4.0.0 the plugin will not load on Folia at all -- it no longer declares
folia-supported, so Folia refuses it rather than running a platform nothing tests. An unverifiable
claim is worse than an absent one.)
Server and client must run the same major version. 4.0.0 changed the LOD wire protocol, and a
mixed 3.x/4.x pair turns LOD off in both directions: the client will not fetch and the server will
not serve. Everything else keeps working -- it is the distant terrain that stops arriving, and both
sides say so plainly rather than failing strangely.
Worth knowing before you update: a launcher will offer 4.0.0 to anyone on 3.x, so a client can be
updated into that mismatch without the server being touched. Move both together.
Put the renderer on the client, and only on the client. Distant Horizons and Voxy draw distant
terrain, and only a client draws anything -- the server just ships the data. A renderer installed on
a server is strongly discouraged and, from 3.18.1, the server tells you so in red at startup. It
competes for the same CPU Chunksmith is pre-generating on and duplicates the LOD your players are
already being sent; a server-side Distant Horizons also fills the console with
[SharedApi] No DH level provided ... warnings. Nothing is gained. If LOD is misbehaving on your
server, this is the first thing to check.
Renderer support, per loader and Minecraft version, is on the
Supported renderers page --
including the voxy forks, and which mods Chunksmith refuses to load beside.
Quick start
/cs world <world> # pick the world
/cs spawn # centre on spawn
/cs radius 5000 # how far out
/cs start # go
/cs progress to watch it, /cs pause and /cs continue as needed. The
wiki has the rest.
Source
CSv3-Current -- the 3.x and 4.x lines,
where current development happens. The 2.x line is frozen on
CSv2_archive.
License
GPL-3.0-only. Original Chunky (c) pop4959. Chunksmith modifications (c) Kishku7.
评论 0
登录后参与评分
还没有评论,来抢沙发吧