Skip to content

API reference Obsidian.API.World.Structures

StructureStartContext class

What a CustomStructure sees while it decides whether and how it starts in a chunk, before any chunk exists. Only the server creates contexts.

public abstract class StructureStartContext

In Obsidian.API.

Properties

public abstract int ChunkX { get; }public abstract int ChunkZ { get; }

Generation

public abstract WorldGenerationContext Generation { get; }

The vertical range height providers and vertical anchors resolve in.

Height

public abstract int Height { get; }

The dimension's height.

MinY

public abstract int MinY { get; }

The dimension's lowest Y.

Random

public abstract IRandomSource Random { get; }

Seeded from the seed and the chunk, like vanilla's structures' random, so a start is the same every time.

public abstract int SeaLevel { get; }

Seed

public abstract long Seed { get; }

The world seed.

Methods

GetBaseHeight(int, int, HeightmapType)

public abstract int GetBaseHeight(int x, int z, HeightmapType heightmap);

The first free Y above the highest block matching heightmap at a column, from the terrain's noise alone (structures start before chunks are generated).

On this page