默认情况下,Minecraft 会将整个区块与玩家同步,当使用使世界变高的模组或数据包时,这就会成为问题。例如 Big Globe 将主世界的高度增加到了 2048 个方块。之所以成问题,原因有二:
- 这意味着在多人游戏中,从服务器同步到客户端的数据量大大增加,从而提高了带宽需求。
- 这意味着客户端需要跟踪的方块更多,从而增加了内存占用。
Minecraft 从 1.21 版本开始延迟区块同步以适应玩家的互联网连接,虽然这确实有很大帮助,但:
- 许多模组仍然停留在 MC 1.20.1,并且
- 问题仍未得到彻底解决。玩家现在不太容易超时,但整体区块同步速度更慢了。
我在简短的搜索中没有找到能解决上述所有问题的模组,所以我决定自己制作一个。
Vertigo 尝试通过仅同步垂直方向上靠近玩家的区块部分来解决这些问题。换句话说,就是向客户端隐瞒某些方块的实际位置。如果某个区块部分距离玩家垂直方向过远,服务器会告知客户端该部分是空的。或者说,全是空气。
模组兼容性
由于客户端并不知晓区块中的所有方块,其他模组可能会尝试在客户端不知晓的部分同步数据,从而导致未定义的结果。为了减轻部分此类问题,Vertigo 执行以下操作:
- 覆盖 Fabric 网络 API 中的
PlayerLookup.tracking(ServerWorld, BlockPos),使其不包含不在输入位置垂直范围内的玩家。如果你的模组使用此方法向玩家发送更新数据包,它应该能正常工作。PlayerLookup.tracking(BlockEntity)委托调用tracking(ServerWorld, BlockPos),因此这种追踪方法也应该能正常工作。- 所有其他追踪方法保持不变。
- 包含一个 API,允许:
- 查询特定玩家是否知晓特定的区块部分。
- 列出知晓特定区块部分的玩家。
尽管如此,我仍预计一些模组会出现问题。如果你是最终用户,请不要期望此模组能立即与其他所有模组开箱即用。一些模组需要进行修改才能与 Vertigo 配合工作。如果你是模组开发者并认为冲突是我的责任,欢迎就此提交 Issue。
Q&A
问:Vertigo 对原版/非高维度世界有帮助吗? 答:并没有太大帮助,除非你的视距非常小。
问:Vertigo 对单人游戏有帮助吗? 答:它可以减少单人游戏的内存占用,但仅在高维度世界或短视距的情况下有效。它不会改善单人游戏中的卡顿或延迟,因为在那里网络并不是瓶颈,即使在高维度世界中也是如此。
问:Vergito 需要在客户端和服务端都安装才能生效吗? 答:是的。
问:如果我只在一侧安装会发生什么破坏性的后果吗? 答:希望不会。如果只在一侧安装,Vertigo 应该会回退到原版的区块同步协议。
问:Vertigo 会影响任何服务端机制吗?比如生物生成或方块刻? 答:不会。
问:什么是“垂直方向上靠近玩家”? 答:垂直同步距离与水平同步距离相同,也就是等于你的视距(或服务端的视距;取两者中较小的一个)。
By default, Minecraft keeps entire chunks synced with players, which is problematic when using mods or data packs which make the world taller. Big Globe for example makes the overworld 2048 blocks tall. The reason why this is problematic is two-fold:
- It means there's a lot more data to sync from the server to the client in multiplayer, which increases bandwidth requirements.
- It means there's more blocks the client needs to keep track of, which increases memory usage.
Minecraft started delaying chunk syncing in 1.21 to adapt to the player's internet connection, and while this does help a lot,
- A lot of mods are still on MC 1.20.1, and
- The problem is still not solved completely. The player is less likely to time out now, but chunk syncing is overall slower.
I didn't find a mod that can solve all of the above problems during my brief search, so I made my own.
Vertigo attempts to solve these issues by only syncing chunk sections that are near the player vertically. In other words, by lying to the client about what blocks are where. If a chunk section is too far above or below the player, the server will tell the client that the section is empty. Or in other words, full of air.
Mod compatibility
Because the client does not know about all the blocks in a chunk, it is expected that other mods may try to sync data in sections the client doesn't know about, with undefined results. To help reduce some of these problems, Vertigo does the following:
- Overwrite
PlayerLookup.tracking(ServerWorld, BlockPos)in Fabric's networking API to not include players which are out of vertical range of the input position. If your mod uses this method to send update packets to players, it will probably work just fine.PlayerLookup.tracking(BlockEntity)delegates totracking(ServerWorld, BlockPos), so this tracking method should work just fine too.- All other tracking methods are unchanged.
- Include an API which allows:
- Querying whether or not a specific player knows about a specific chunk section.
- Listing players which know about a specific chunk section.
Despite this, I do expect some mods to have issues still. If you are an end user, please do not expect this mod to work out-of-the-box with every other mod just yet. Some mods will need to make changes in order to work with Vertigo. If you are a mod developer and think that a conflict is on my end, feel free to open an issue about it.
Q&A
Q: Does Vertigo help with vanilla/non-tall worlds?
A: Not really, unless you have a very small view distance.
Q: Does Vertigo help in singleplayer? A: It can reduce memory usage in singleplayer, but only with tall worlds or short view distances. It will not help with lag or latency in singleplayer because networking is not the bottleneck there, even in tall worlds.
Q: Does Vergito need to be installed on both the client and the server to work?
A: Yes.
Q: Will things break if I only have it installed on one side?
A: Hopefully not. Vertigo should fallback on the vanilla chunk syncing protocol if it's only installed on one side.
Q: Does Vertigo affect any server-side mechanics? Like mob spawning or block ticking?
A: No.
Q: What counts as "near the player vertically"?
A: The vertical sync distance is the same as the horizontal sync distance, which is the same as your view distance (or the server's view distance; whichever one is smaller).
下载 Vertigo
下载 Vertigo
下载 Vertigo
下载 Vertigo
下载 Vertigo
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Vertigo
下载 Vertigo
下载 Vertigo
下载 Vertigo
下载 Vertigo
- 移植至 MC 26.2 和 MC 26.3。
- 修复与 ScalableLux 0.3.0+ 的 mixin 错误。
- 仍然支持旧版本的 ScalableLux。
修复了与 ScalableLux 的兼容性问题。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
评论 0
登录后参与评分
还没有评论,来抢沙发吧