Climate Control

[!INFO] Git Commit: aa1bda3 | Updated: 2026-10-02

Climate Control(modid climatecontrol)是 GTNewHorizons 维护的 GTNH 整合包成员模组,由原作者 zeno410 开发,目标是让玩家改写 1.7.10 的气候带划分、海洋大小、生物群系频率与大陆尺寸,且不产生区块边界(chunk boundary)。仓库地址见 src/main/resources/mcmod.info 记录的 https://github.com/GTNewHorizons/Climate-Control,作者 zeno410,许可证 LGPL-3.0。

这是一个纯世界生成模组,不注册任何方块、物品、实体、TileEntity、附魔、维度或指令。证据:

$ grep -rE 'GameRegistry\.(register(Block|Item|Entity|TileEntity)|registerWorldGenerator|registerWorldProvider|registerFuelHandler)' --include=*.java src/
(0 命中)
$ grep -rn 'ItemStack' --include=*.java src/ | wc -l
0

grep -rn 'registerWorldProvider' --include=*.java src/ 同样 0 命中——模组不创建新维度,维度筛选 只是决定在哪些已有维度中接管生成。

实现方式

模组不注册 IWorldGenerator,而是在 Forge 的 WorldTypeEvent.InitBiomeGens 事件(优先级 LOWEST)中,用反射把 WorldChunkManager 的 genBiomes(SRG field_76944_d)与 biomeIndexLayer(SRG field_76945_e)字段替换成自己的 GenLayer 栈(GenLayerUpdater.java:18-34)。customGenLayer/ 与 genLayerPack/ 两个包共提供 67 个自定义 GenLayer 实现。

默认生效的生成器是 CorrectedContinentsGenerator(因为 VanillaLandAndClimate 默认为 false),VanillaCompatibleGenerator 需要显式开启该开关才会被使用,OneSixCompatibleGenerator 对应 1.6Compatibility 模式。详见 GenLayer 生成栈。

模组还支持 9 个第三方生物群系 mod 的适配包(全部 compileOnly 依赖 + NoClassDefFoundError 探测),并对 Mystcraft 做 GenLayer 层的深度改造,详见 外部模组生物群系包。

配置列表

配置写入 config/climatecontrol.cfg(49 个设置项,分 4 个分类),各附属包的配置写入 config/ClimateControl/<名称>.cfg。

  • 气候带参数 - Climate Zone Parameters,11 项:气候带尺寸(全尺寸/半尺寸/1/4 尺寸)与纬向气候带
  • 气候带出现率 - Climate Incidences,4 项:Hot/Warm/Cool/Snowy 四带的相对出现率
  • 海洋控制参数 - Ocean Control Parameters,7 项:大陆与岛屿种子的千分之一频率、陆块是否合并
  • 综合参数 - Assorted Parameters,27 项:生成总开关、缓存、外部包与各世界类型接管策略
  • 维度筛选 - CCDimensions.cfg,2 项:按维度 ID 决定是否接管(默认只含 dimension 0)

世界生成列表

生物群系列表

扩展 API 列表

  • 附属模组 API - BiomePackage、BiomeSettings 与 DimensionalSettingsModifier 两种扩展方式