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
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
LocalX
public readonly int LocalX { get; }
Property Value
LocalZ
public readonly int LocalZ { get; }
Property Value
MapChunk
The map chunk associated with this column.
public readonly IMapChunk MapChunk { get; }
Property Value
- IMapChunk
MapSizeY
public readonly int MapSizeY { get; }
Property Value
RainHeightMap
Rain heightmap. Mutable.
public readonly ushort[] RainHeightMap { get; }
Property Value
- ushort[]
SeaLevel
public readonly int SeaLevel { get; }
Property Value
TerrainHeightMap
Terrain heightmap. Mutable.
public readonly ushort[] TerrainHeightMap { get; }
Property Value
- ushort[]
WaterBlockId
public readonly int WaterBlockId { get; }
Property Value
WorldX
public readonly int WorldX { get; }
Property Value
WorldZ
public readonly int WorldZ { get; }
Property Value
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
Returns
GetBlockDataAtY(int)
Get the chunk storage containing a global Y coordinate.
public IChunkBlocks GetBlockDataAtY(int y)
Parameters
yint
Returns
- IChunkBlocks
SetChunkModdata(string, byte[])
Write permanently stored data to the generated chunk column.
public void SetChunkModdata(string key, byte[] data)
Parameters
SetChunkModdata<T>(string, T)
Write generic moddata to the generated chunk column.
public void SetChunkModdata<T>(string key, T data)
Parameters
keystringdataT
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
SetMapChunkModdata(string, byte[])
Write permanently stored data to the generated map chunk.
public void SetMapChunkModdata(string key, byte[] data)
Parameters
SetMapChunkModdata<T>(string, T)
Write generic moddata to the generated map chunk.
public void SetMapChunkModdata<T>(string key, T data)
Parameters
keystringdataT
Type Parameters
T