Skip to main content

IGenerator

An interface in Root.Township, Alta.Caves.

What a cave layer's generator exposes to its plugins while building the layer: seed, noise, entrance, chunk size and the plugin list. GenerationBase implements it.

Properties​

MemberWhat it is
int ChunkSize { get; }Size of each map chunk the layer is built from.
Vector2 Entrance { get; }Where the layer's entrance is, as x and z.
Vector2 EntranceDirection { get; }Direction the entrance faces, as x and z.
HashFunction HashFunction { get; }Seeded hash for repeatable random values.
bool IsGeneratingDynamic { get; }True when dynamic plugins should run: the first time the layer is ever generated on the server.
int Layer { get; }The layer number.
CaveLayerStreamer LayerStreamer { get; }The CaveLayerStreamer for this layer.
List<PluginInstance> PluginInstances { get; }The running plugin instances.
PluginList PluginList { get; }The plugin list asset the layer is built with.
int Seed { get; }The layer's seed.
SimplexNoise SimplexNoise { get; }Seeded simplex noise for the layer.
Vector2 Snap { get; set; }Grid snap offset used while generating.
SpawnData SpawnData { get; }Spawn data used for things the generator spawns.

Methods​

MemberWhat it is
void DecrementGenerating()Marks one chunk as done generating.
void StartRendering(MapChunk chunk)Queues a map chunk to be rendered.

Used in​

Members of other types that take, return or hold a IGenerator: