Table of Contents

Interface IChunkProvider

Namespace
Vintagestory.API.Server
Assembly
VintagestoryAPI.dll
public interface IChunkProvider

Properties

Logger

ILogger Logger { get; }

Property Value

ILogger

Methods

ChunkIndex3D(int, int, int)

Index for a chunk coordinate

long ChunkIndex3D(int chunkX, int chunkY, int chunkZ)

Parameters

chunkX int
chunkY int
chunkZ int

Returns

long

GetChunk(int, int, int)

IWorldChunk GetChunk(int chunkX, int chunkY, int chunkZ)

Parameters

chunkX int
chunkY int
chunkZ int

Returns

IWorldChunk

GetUnpackedChunkFast(int, int, int, bool)

Like GetChunk() but includes a cache of the last chunk fetched - use this in a loop where getting the chunk for neighbouring blockPos, so most will be in the same chunk This always unpacks the chunk, unless it is null. Implementing code must ensure the chunk is unpacked before returning it, unless returning the cached chunk and notRecentlyAccessed is false (i.e. if the cache chunk was recently accessed then it's safe to assume it was already unpacked)

IWorldChunk GetUnpackedChunkFast(int chunkX, int chunkY, int chunkZ, bool notRecentlyAccessed = false)

Parameters

chunkX int
chunkY int
chunkZ int
notRecentlyAccessed bool

Returns

IWorldChunk