Nether Garden Generation
基本信息
| 属性 | 值 |
|---|---|
| 类型 | IWorldGenerator — 仅下界维度 |
| 触发阶段 | FMLPostInitializationEvent(依据 FetherConfig.gardenRarity/glowFlowerRarity/treeRarity 注册) |
| 3 个生成源 | Nether Garden、Glow Flower、Nether Tree |
行为
WorldGeneratorNether 在 Fether.postInit 中按 0 优先级注册(先于玩家生成),每 chunk 重复多次调用底层生成器:
gardenRarity > 0→WorldGeneratorNether(FetherConfig.gardenRarity, new WorldGenNetherFlowers(false, FetherBlocks.blockNetherGarden))—— 每 chunk 最多 4 次(默认)调用WorldGenNetherFlowers.generate。generate内部循环 8 次,每次尝试在 ±15×±7×±15 内、flower.canPlaceBlockAt通过的空气块放置 1 个 Nether Garden。所有位置rng.setSeed(rng.nextLong() ^ this.salt)防止相同位置生成相同状态(salt = hash(flower.delegate.name()) 两次)。glowFlowerRarity > 0→ 同上但目标是blockGlowFlower。treeRarity > 0→WorldGeneratorNether(FetherConfig.treeRarity, new WorldGenNetherTree(false))—— 调用WorldGenNetherTree.generate:高度 5–7、原木 meta 在 0 与 1 之间随机 1/8 替换,leaves 球半径 1/2/3;每片叶子的下方有 25% 概率生成 1 个 Ignis Fruit(要求下方 2 空气)。
数值
| 类别 | 键 | 默认 | 范围 |
|---|---|---|---|
| Garden | gardenRarity |
4 | [0, 1000] |
| Garden | gardenSpreadRate |
100 | [0, MAX_INT] |
| Glow Flower | glowFlowerRarity |
4 | [0, 1000] |
| Glow Flower | glowFlowerSpreadRate |
100 | [0, MAX_INT] |
| Tree | treeRarity |
15 | [0, 1000] |
相关条目
- FetherConfig
- Nether Garden
- Glow Flower
- Nether Sapling - 触发 WorldGenNetherTree