跳到正文

Spawn C2ME Fix

作者:Bramblejack

Fixes chunk deadlock and game crash when using Spawn and C2ME together.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Description

This mod patches AnimalVariantManager.chooseWeightedVariant() in the Spawn mod to use the entity’s own thread-safe RandomSource instead of Level.random.

This prevents a ConcurrentModificationException when C2ME calls finalizeSpawn from a worker thread during chunk generation, which would otherwise deadlock further chunk loading.

Additonally, it also fixes a threading conflict that could deadlock or crash the server during chunk autosave. Spawn’s block variant-assignment code (Moray Crevice, sea life decorations, sea urchins) occasionally performed unsafe world queries such as biome lookups, neighbor-block updates, from contexts where C2ME’s async chunk system could no longer guarantee they’d complete, causing server hangs. Block variant assignment is now deferred to run on a normal tick instead of during chunk autosave, and its biome lookup no longer forces a chunk load.

Known issues

The original approach was meant to make the animal variants deterministic, meaning you would always encounter the same variant in the same place in the world in the same seed. The fix breaks this behaviour and makes the variants completely random. Generating a world with the same seed will give you a different outcome each time.

There probably is a way to solve this more gracefully, but it would require much deeper integration which for me personally is out of scope.

常见问题

Spawn C2ME Fix 支持哪些 Minecraft 版本?

Spawn C2ME Fix 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

Spawn C2ME Fix 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

Bramblejack 的其他作品

查看全部 →