Skip to content

Class: AnvilWorldSource ​

Defined in: packages/minerender/src/world/AnvilWorldSource.ts:45

Reads selected Java Anvil chunk columns and caches raw regions within count and byte limits.

Implements ​

Constructors ​

Constructor ​

ts
new AnvilWorldSource(readRegion, options?): AnvilWorldSource;

Defined in: packages/minerender/src/world/AnvilWorldSource.ts:54

Parameters ​

ParameterType
readRegionAnvilRegionReader
optionsAnvilWorldSourceOptions

Returns ​

AnvilWorldSource

Methods ​

clearCache() ​

ts
clearCache(): void;

Defined in: packages/minerender/src/world/AnvilWorldSource.ts:111

Releases cached regions. Reads already in progress finish without repopulating this cache.

Returns ​

void


getChunk() ​

ts
getChunk(
   x, 
   z, 
   signal?
): Promise<AnvilChunk | undefined>;

Defined in: packages/minerender/src/world/AnvilWorldSource.ts:69

Decodes a column at absolute chunk coordinates, including entity-only columns. A separate entity record replaces embedded entities, even when its list is empty. Missing entity files or records leave embedded entities intact. Aborting a caller leaves other shared readers active.

Parameters ​

ParameterType
xnumber
znumber
signal?AbortSignal

Returns ​

Promise<AnvilChunk | undefined>

Implementation of ​

WorldChunkSource.getChunk