世界生成
世界生成
在区块生成期间生成自定义 ItemsAdder 家具。
Since v1.0.8
两种世界生成模式可以在新生成的区块中生成自定义家具。二者都直接在 ItemsAdder 内容 YML 文件中定义。
| World Populator | Surface Decorator | |
|---|---|---|
| YAML key | blocks_populators | surface_decorators |
| 放置方式 | Vein-based(成簇) | 表面散布 |
| 密度控制 | vein_blocks + chunk_veins | amount |
| 表面配置 key | replaceable_blocks | bottom_blocks |
World Populator 适合成簇生成(蘑菇、类似矿脉的组合)。Surface Decorator 适合均匀散布在表面的物体(花、小石头)。
World Populator
在区块生成期间以 vein 风格簇状生成家具。使用 blocks_populators key(也接受旧 key worlds_populators)。
info:
namespace: my_pack
blocks_populators:
big_mushroom:
enabled: true
furniture: "my_pack:big_mushroom"
worlds:
- world
biomes:
- minecraft:dark_forest
replaceable_blocks:
- GRASS_BLOCK
- DIRT
vein_blocks: 1
chunk_veins: 3
chunk_chance: 25.0
min_height: 60
max_height: 100| 键 | 类型 | 默认值 | 描述 |
|---|---|---|---|
enabled | boolean | true | 设为 false 可跳过且不删除条目。 |
furniture | namespace:id | (必填) | 要生成的 ItemsAdder 家具。见 ID。 |
worlds | list | (全部) | 限定世界名称。支持 world_* 等 wildcard pattern。 |
biomes | list | (全部) | 生物群系 ID(如 minecraft:forest)。所有 ID 都必须有效,否则跳过该条目。 |
replaceable_blocks | list | (任意) | 生成点正下方方块允许使用的材质。 |
vein_blocks | integer | 1 | 每次 vein 尝试生成的家具数量。 |
chunk_veins | integer | 4 | 每个区块的 vein 尝试次数。 |
chunk_chance | double | -1 | 每个区块 0-100 的概率。-1 = 总是生成。 |
min_height | integer | 60 | 最小 Y 高度。必须小于 max_height。 |
max_height | integer | 80 | 最大 Y 高度。 |
allow_liquid_placement | boolean | false | 允许生成在水或岩浆中。 |
仍接受旧别名:worlds_populators 对应 blocks_populators,amount 对应 vein_blocks,iterations 对应 chunk_veins,chance 对应 chunk_chance。
Surface Decorator
将家具散布在新生成地形的表面。使用 surface_decorators key。
info:
namespace: my_pack
surface_decorators:
small_flower:
enabled: true
furniture: "my_pack:small_flower"
worlds:
- world
biomes:
- minecraft:plains
- minecraft:sunflower_plains
bottom_blocks:
- GRASS_BLOCK
amount: 4
chunk_chance: 50.0
min_height: 60
max_height: 120| 键 | 类型 | 默认值 | 描述 |
|---|---|---|---|
enabled | boolean | true | 设为 false 可跳过且不删除条目。 |
furniture | namespace:id | (必填) | 要生成的 ItemsAdder 家具。见 ID。 |
worlds | list | (全部) | 限定世界名称。支持 world_* 等 wildcard pattern。 |
biomes | list | (全部) | 生物群系 ID(如 minecraft:plains)。所有 ID 都必须有效,否则跳过该条目。 |
bottom_blocks | list | (任意) | 生成点正下方方块允许使用的材质。 |
amount | integer | 4 | 每个区块的放置尝试次数。 |
chunk_chance | double | -1 | 每个区块 0-100 的概率。-1 = 总是生成。 |
min_height | integer | 60 | 最小 Y 高度。必须小于 max_height。 |
max_height | integer | 80 | 最大 Y 高度。 |
allow_liquid_surface | boolean | false | 允许生成点下方的液体方块作为有效表面。 |
allow_liquid_placement | boolean | false | 允许生成在水或岩浆中。 |
旧别名 chance 可用于 chunk_chance。
备注
- 只有新生成的区块会触发生成。已有区块不受影响。
- 家具必须在条目加载前已由 ItemsAdder 注册。
- 无效生物群系 ID 会导致整个条目被跳过。
- Nether 中的 surface decorators 会从
max_height向下扫描到min_height。 - 启用
allow_liquid_placement时,普通维度的表面装饰会使用 ocean-floor heightmap,以便找到水下表面。