Table of Contents

Struct ColumnCarvingContext

Namespace
WorldgenLib
Assembly
WorldgenLib.VintageStory.dll

Per-column context for step 10 hooks. Full block accessor available.

public ref struct ColumnCarvingContext
Inherited Members

Constructors

ColumnCarvingContext(int, int, int, int, int)

public ColumnCarvingContext(int worldX, int worldZ, int seaLevel, int mapSizeY, int waterBlockId)

Parameters

worldX int
worldZ int
seaLevel int
mapSizeY int
waterBlockId int

Properties

BlockData

Read/write access to the bottom vertical chunk for compatibility. For higher Y values, use GetBlockDataAtY(int) and pass a chunk-local Y to ChunkIndex3d(int, int, int).

public IChunkBlocks BlockData { get; }

Property Value

IChunkBlocks

Chunks

All vertical chunks in this generated column.

public readonly IServerChunk[] Chunks { get; }

Property Value

IServerChunk[]

ColumnBlockSolidities

Column solidity results from steps 7–9.

public readonly BitArray ColumnBlockSolidities { get; }

Property Value

BitArray

LocalX

public readonly int LocalX { get; }

Property Value

int

LocalZ

public readonly int LocalZ { get; }

Property Value

int

MapChunk

The map chunk associated with this column.

public readonly IMapChunk MapChunk { get; }

Property Value

IMapChunk

MapSizeY

public readonly int MapSizeY { get; }

Property Value

int

RainHeightMap

Rain heightmap. Mutable.

public readonly ushort[] RainHeightMap { get; }

Property Value

ushort[]

SeaLevel

public readonly int SeaLevel { get; }

Property Value

int

TerrainHeightMap

Terrain heightmap. Mutable.

public readonly ushort[] TerrainHeightMap { get; }

Property Value

ushort[]

WaterBlockId

public readonly int WaterBlockId { get; }

Property Value

int

WorldX

public readonly int WorldX { get; }

Property Value

int

WorldZ

public readonly int WorldZ { get; }

Property Value

int

Methods

ChunkIndex3d(int, int, int)

Build an index from local X/Y/Z coordinates in one vertical chunk.

public int ChunkIndex3d(int x, int y, int z)

Parameters

x int
y int
z int

Returns

int

GetBlockDataAtY(int)

Get the chunk storage containing a global Y coordinate.

public IChunkBlocks GetBlockDataAtY(int y)

Parameters

y int

Returns

IChunkBlocks

SetChunkModdata(string, byte[])

Write permanently stored data to the generated chunk column.

public void SetChunkModdata(string key, byte[] data)

Parameters

key string
data byte[]

SetChunkModdata<T>(string, T)

Write generic moddata to the generated chunk column.

public void SetChunkModdata<T>(string key, T data)

Parameters

key string
data T

Type Parameters

T

SetFluid(int, int, int, int)

Set a fluid block using local X/Z and global Y.

public void SetFluid(int x, int y, int z, int blockId)

Parameters

x int
y int
z int
blockId int

SetMapChunkModdata(string, byte[])

Write permanently stored data to the generated map chunk.

public void SetMapChunkModdata(string key, byte[] data)

Parameters

key string
data byte[]

SetMapChunkModdata<T>(string, T)

Write generic moddata to the generated map chunk.

public void SetMapChunkModdata<T>(string key, T data)

Parameters

key string
data T

Type Parameters

T