User Tools

Site Tools


zh_cn:tutorial:dimensionconcepts

This is an old revision of the document!


维度概念

FIXME 创建维度是个高级的概念,需要很长时间才能够理解。简单的维度很容易创建,但是如果你深入下去,你可能会难以处理一大堆的类。本教程提供了创建维度需要的概念的概览。Categories are titled with relevant class names.

维度

Dimension 类是新维度的核心,处理围绕你的维度的总体逻辑。玩家能否在此维度使用床?有没有世界边界?玩家能否看见天空?It also is responsible for creating your ChunkGenerator to generate land.

维度类型

DimensionType 是维度的注册容器。维度类型也有 ID,添加维度时需要将其注册。It's also responsible for saving and loading your dimension from a file.

区块生成器

ChunkGenerator 负责使用噪声函数以在世界中放置方块。不负责(或者不应该负责)实际装饰并选择分开方块——大多数情况下,你只需要放置石头并选择另一个基础方块。如果此后没有装饰或其他额外步骤,主世界理论上将会成为完全由石头、没有其他东西做成的景观。

生成器类型

GeneratorType 是你的 ChunkGenerator 的注册容器。Can't be registered and requires hacks to use– a fix is majorly needed for this.

生物群系

Biome is a section of your dimension that chooses how that area looks. It is responsible for mob spawns, plants, lakes and rivers, caves, grass color, and much more. In a proper setup, it is also responsible for replacing already generated stone with proper blocks, such as top grass/dirt and ores.

BiomeSource

When creating a dimension, you can either choose to use a single biome everywhere or use a BiomeSource. BiomeSource is used to pick randomly from several different biomes.

SurfaceBuilder

A SurfaceBuilder is responsible for replacing the stone we mentioned earlier with other blocks. Each biome has a SurfaceBuilder attached to it. As an example, Plains & Forest both use the DEFAULT SurfaceBuilder, because they both want grass and dirt as their top block. They are different because the biome can still choose to set trees or different height scaling– in other words, a SurfaceBuilder is semi-reusable depending on the situation.

zh_cn/tutorial/dimensionconcepts.1631855436.txt.gz · Last modified: 2021/09/17 05:10 by solidblock