WorldGenFeatureFix
提示:Mojang 已在 26.1 Snapshot 6 中标记此问题为已修复,因此在 26.1 中你可能不再需要此模组。
此模组修复了什么?
当自定义世界生成数据包使用 minecraft:lake 或 minecraft:snow_and_freeze 放置特性并配合水使用时,区块生成器会崩溃。(更多详情请参阅 MC-273228 或 MC-272370)。
受 此拉取请求 启发,本模组通过应用 mixins 使其正常工作。
技术细节
在 1.21 版本中,区块生成得到了高度优化,这无意中破坏了湖特性的冻结检测,因为它可能会尝试访问无法访问的区块。然而,由于 Mojang 目前仅将湖特性用于熔岩湖,因此该问题在原版 Minecraft 中不会出现——但它会影响自定义世界生成器!本模组应用了回退至 getUncachedNoiseChunk 的 mixins,使湖特性能够再次正常工作。
免责声明
然而,该 PR 也提到 LakeFeature 已被弃用,原版已不再除熔岩湖外使用它。
此处移除不安全区块获取的错误是一个有意为之的安全措施,旨在防止不良代码(例如 LakeFeature 中创建水湖时的死路径中的代码)。虽然它可能看似“解决”了眼前的问题,但这并非正确的解决方案,会导致其他更严重的问题被忽略。请自行承担风险。(至少在我的服务器上运行完美)
WorldGenFeatureFix
Tips: Mojang has marked this problem as fixed since 26.1 Snapshot 6, you may don't need this mod in 26.1 anymore.
What this mod fixes?
When custom world generation datapack uses minecraft:lake or minecraft:snow_and_freeze placed feature with water, The chunk generator crashes. (See MC-273228 or MC-272370 for more details).
Inspired by This pull request, This mod apply mixins to make them work.
Techinal Details
In version 1.21, chunk generation has been highly optimized, which unintentionally breaks the freeze detection of the lake feature since it may trying to access inaccessible chunks. However, since Mojang only uses the lake feature for lava lakes at now, this issue does not occur in vanilla Minecraft — but it does affect custom world generators! This mod applies mixins that fallback to getUncachedNoiseChunk, allowing the lake feature to work correctly again.
Disclaimer
However, The PR also mentioned that LakeFeature is deprecated and vanilla has moved away from using it for anything except for lava lakes.
The error for unsafe chunk gets removing here is an intentional safeguard against bad code, such as that in the dead path in LakeFeature when creating water lakes. While it may appear to 'fix' the problem at hand it is not a proper solution and will cause other more serious problems to go undetected. Use at your own risk. (At least it works perfect in my server)
评论 0
登录后参与评分
还没有评论,来抢沙发吧