浮空岛生成
基本信息
天境的地形生成走原版下界(Hell)的区块管理器:
public class WorldChunkManagerAether extends WorldChunkManagerHell {
(WorldChunkManagerAether.java:5)
因此天境没有基岩层、没有洞穴系统(canDoLightning 与 canDoRainSnowIce 均为 false,AetherWorldProvider.java:146-151、:150),也没有原版的矿脉生成 —— 所有装饰由自写的 AetherBiomeDecorator 完成。
装饰器入口:AetherBiome.createBiomeDecorator() 返回 new AetherBiomeDecorator()(AetherBiome.java:103-105)。
境云生成
genDecorations(AetherBiomeDecorator.java:70)第一步生成 3 层境云(:71-73):
| 调用 | 云 meta | 数量 | 概率 | Y 高度范围 |
|---|---|---|---|---|
generateClouds(2, 4, 50, ...) |
2(金黄境云) | 4 | 1/50 | nextInt(64) + 96 → 96–159 |
generateClouds(1, 8, 26, ...) |
1(天蓝境云) | 8 | 1/26 | nextInt(64) + 32 → 32–95 |
generateClouds(0, 16, 14, ...) |
0(寒风境云) | 16 | 1/14 | nextInt(64) + 64 → 64–127 |
generateClouds(AetherBiomeDecorator.java:186-198)先按 chance 判定是否生成(shouldSpawn 即 rand.nextInt(chance) == 0,:170-172),再设置云的 meta 与数量并调用生成器。
三层的概率与密度设计明显不同:寒风境云最多最常见,金黄境云最少最稀有且位置最高。
天蓝境云(meta 1)是唯一有碰撞的境云(BlockAercloud.java:167-168),因此是唯一可站立的云层。
岛屿与地形
浮空岛
AetherGenFloatingIsland 在每区块有 1/37 的概率生成一座水晶浮空岛(AetherBiomeDecorator.java:75-78):
if (this.shouldSpawn(37)) {
this.crystal_island.generate(this.world, this.rand, this.chunk_X + 8, this.nextInt(64) + 32, this.chunk_Z + 8);
}
坐标固定在区块中心 (8, 8),Y 为 nextInt(64) + 32 → 32–95。
树
每区块生成 3 棵树(AetherBiomeDecorator.java:94-100),位置在区块内随机,Y 取该处地表高度。
树种由 getTree()(AetherBiomeDecorator.java:169-171)决定:
return this.shouldSpawn(30) ? new AetherGenOakTree() : new AetherGenSkyrootTree(true);
即 1/30 概率为黄金橡树,29/30 为天根树。注意这与生物群系层面的 5%(nextInt(20) == 0)是两个独立且不同的判定 —— 群系 func_150567_a 用于原版的树替换逻辑,装饰器的 getTree() 用于实际生成。
地牢内的黄金橡树
每区块额外生成 25 次 AetherGenDungeonOakTree(AetherBiomeDecorator.java:115-120),位置完全随机(含 Y)。这是地牢结构的植被铺垫。
矿脉生成
spawnOre(AetherBiomeDecorator.java:200-213)设好方块与矿脉大小后,循环 chance 次在区块内随机位置生成。
| 矿脉 | 大小 | 生成次数 | Y 范围 | 源码行 |
|---|---|---|---|---|
天壤 aether_dirt |
32 | 20 | 0–127 | :82-84 |
冰石 icestone |
16 | 10 | 0–127 | :88 |
神能晶矿 ambrosium_ore |
16 | 15 | 0–127 | :89 |
紫晶矿 zanite_ore |
8 | 12 | 0–63 | :90 |
重力矿 gravitite_ore |
6 | 8 | 0–31 | :91 |
天壤矿脉额外受 shouldSpawn(3) 保护(AetherBiomeDecorator.java:80-83),即每区块 1/3 概率才生成。
矿脉按阶越高分布越低越少:神能晶矿在 0–127 的大范围高频生成,重力矿只在 0–31 的最低处稀疏生成。
矿石的采集等级见天境矿石。
植物与水
| 生成物 | 条件 | 源码行 |
|---|---|---|
白玫瑰 white_flower |
无条件 | :86 |
幻紫花 purple_flower |
无条件 | :87 |
蓝莓灌木 berry_bush |
无条件 | :93 |
节日树 holiday_tree |
内容开关 + 1/15 概率 | :109-118 |
湖泊 WorldGenLakes(Blocks.water) |
1/10 概率,Y 0–255 | :157-163 |
速沙 AetherGenQuicksoil |
由 quicksoil_patches 字段持有 |
:35 |
节日树条件(AetherBiomeDecorator.java:105-112):
AetherConfig.shouldLoadHolidayContent()
|| (AetherConfig.allowSeasonalChristmas() && (月份 == 12 || 月份 == 1))
即手动开启圣诞内容,或自动模式且当前是 12 月 / 1 月。
高草
高草受 AetherConfig.tallgrassEnabled() 开关控制(默认 false,AetherConfig.java:73-74)。开启后(AetherBiomeDecorator.java:118-154):
- 生成 10 簇原版高草(用
aetherBiome.getRandomWorldGenForGrass) - 触发 Forge 的
DecorateBiomeEvent.Decorate.EventType.GRASS - 再生成 7 株
WorldGenDoublePlant高度 2 的双叶植物
数值
| 数值名 | 值 | 来源 |
|---|---|---|
| 区块管理器基类 | WorldChunkManagerHell |
WorldChunkManagerAether.java:5 |
| 寒风境云数量 / 概率 | 16 / 1/14 | AetherBiomeDecorator.java:73 |
| 天蓝境云数量 / 概率 | 8 / 1/26 | AetherBiomeDecorator.java:72 |
| 金黄境云数量 / 概率 | 4 / 1/50 | AetherBiomeDecorator.java:71 |
| 浮空岛概率 | 1/37 | AetherBiomeDecorator.java:75 |
| 每区块树数量 | 3 | AetherBiomeDecorator.java:94 |
| 黄金橡树概率(装饰器) | 1/30 | AetherBiomeDecorator.java:170 |
| 每区块地牢橡树次数 | 25 | AetherBiomeDecorator.java:115 |
| 天壤矿脉概率 | 1/3 | AetherBiomeDecorator.java:81 |
| 湖泊概率 | 1/10 | AetherBiomeDecorator.java:151 |
| 节日树概率 | 1/15 | AetherBiomeDecorator.java:107 |
| 浮空岛 Y 范围 | 32–95 | AetherBiomeDecorator.java:77 |
| 紫晶矿 Y 范围 | 0–63 | AetherBiomeDecorator.java:89 |
| 重力矿 Y 范围 | 0–31 | AetherBiomeDecorator.java:90 |
shouldSpawn 判定 |
rand.nextInt(chance) == 0 |
AetherBiomeDecorator.java:170-172 |