Skip to content

API reference Obsidian.API

IChunk interface

public interface IChunk : IAttachmentHolder

In Obsidian.API.

Properties

ChunkGenStage ChunkStatus { get; }

Height

int Height { get; }

The number of block layers in the chunk, i.e. its dimension's build height.

IDictionary<HeightmapType, Heightmap> Heightmaps { get; }bool IsGenerated { get; }

MinY

int MinY { get; }

The lowest block Y of the chunk, i.e. its dimension's minimum build height.

Sections

ReadOnlySpan<IChunkSection> Sections { get; }

The chunk's sections from the bottom up. This is a view of the chunk's own sections, not a copy.

int X { get; }int Z { get; }

Methods

IChunk Clone(int x, int z);BiomeCodec GetBiome(int x, int y, int z);BiomeCodec GetBiome(Vector position);IBlock GetBlock(int x, int y, int z);IBlock GetBlock(Vector position);

GetBlockEntities()

IReadOnlyCollection<IBlockEntity> GetBlockEntities();

Every block entity in the chunk.

IBlockEntity GetBlockEntity(int x, int y, int z);int GetLightLevel(int x, int y, int z, LightType lt);int GetLightLevel(Vector position, LightType lt);void RemoveBlockEntity(int x, int y, int z);void SetBiome(int x, int y, int z, BiomeCodec biome);void SetBiome(Vector position, BiomeCodec biome);void SetBlock(int x, int y, int z, IBlock block);void SetBlock(Vector position, IBlock block);void SetBlockEntity(int x, int y, int z, IBlockEntity tileEntityData);void SetChunkStatus(ChunkGenStage status);void SetLightLevel(int x, int y, int z, LightType lt, int level);void SetLightLevel(Vector position, LightType lt, int light);void WriteEmptyLightMaskTo(INetStreamWriter writer, LightType lt);void WriteLightMaskTo(INetStreamWriter writer, LightType lt);void WriteLightTo(INetStreamWriter writer, LightType lt);

On this page