IAF Dragon Den Fix
一款轻量级的 Forge Mixin 模组,修复了因冰与火之歌(Ice and Fire)的龙巢和龙穴在可用区块范围外生成而导致的服务器/客户端崩溃问题。
问题所在
冰与火之歌中的龙巢和龙穴在世界生成期间会在较大半径内放置方块(洞穴为 30+ 格,龙穴为 20+ 格)。当这些结构在世界边界或区块加载边界附近生成时,生成代码会尝试访问 WorldGenRegion 缓存中未加载的区块,从而抛出 RuntimeException:“We are asking a region for a chunk out of bound”(我们请求的区域超出了区块边界),并导致存档损坏。
工作原理
本模组使用 Mixin 拦截 WorldGenRegion 中的两个方法:
getBlockState —— 当特性试图从区域缓存之外的区块读取方块时,返回空气而非崩溃。
addFreshEntity —— 当目标位置超出可用区块范围时,静默取消实体生成(例如龙本身)。
龙巢和龙穴仍会正常生成。仅将超出已加载区域的部分进行优雅截断。不会跳过任何结构,且正常的世界生成(树木、矿石等)完全不受影响。
安装
将 iafdragonfix-1.0.0.jar 放入你的 mods 文件夹。
要求
Minecraft 1.20.1
Forge 47+
兼容性
已与 Ice and Fire 2.1.13-1.20.1-beta-5 测试兼容
不修改 Ice and Fire 本体——与其他 IAF 附加模组兼容
可随时添加或移除,安全无忧
IAF Dragon Den Fix
A lightweight Forge mixin mod that fixes a server/client crash caused by Ice and Fire's Dragon Dens and Dragon Roosts generating outside the available chunk region.
The Problem
Ice and Fire's dragon dens and roosts place blocks across a large radius (30+ blocks for caves, 20+ for roosts) during world generation. When these structures generate near the world border or chunk loading boundary, the generation code attempts to access chunks that are not loaded in the WorldGenRegion cache, throwing RuntimeException: We are asking a region for a chunk out of bound and corrupting the save.
How It Works
This mod uses Mixin to intercept two methods in WorldGenRegion:
getBlockState — Returns air instead of crashing when a feature tries to read a block from a chunk outside the region's cache.
addFreshEntity — Silently cancels entity spawning (e.g. the dragon itself) when the target position is outside the available chunks.
Dragon dens and roosts still generate normally. Only the portions that extend beyond the loaded region are gracefully truncated. No structures are skipped, and normal world generation (trees, ores, etc.) is completely unaffected.
Installation
Drop iafdragonfix-1.0.0.jar into your mods folder.
Requirements
Minecraft 1.20.1
Forge 47+
Compatibility
Tested with Ice and Fire 2.1.13-1.20.1-beta-5
Does not modify Ice and Fire itself — compatible with other IAF addons
Safe to add or remove at any time
评论 0
登录后参与评分
还没有评论,来抢沙发吧