API reference / @jsprismarine/prismarine / world/chunk/ChunkBiomes
world/chunk/ChunkBiomes
Classes
Type Aliases
BiomeSection
BiomeSection =
number|Int32Array
Defined in: packages/prismarine/src/world/chunk/ChunkBiomes.ts:50
One sub chunk's biomes as the disk codec hands them over: a single id for a uniform section, or one id per block.
Almost every section of almost every column is uniform, and spelling those out was the single most expensive thing a chunk read did - 24 arrays of 4096 built and scanned per column, only to collapse back to one number. The format already distinguishes the two cases, with a zero bit width and a one entry palette, so the exchange type says so too.
ReadonlyChunkBiomes
ReadonlyChunkBiomes =
Pick<ChunkBiomes,"getRevision"|"get"|"sectionIds"|"toSectionIds"|"sectionsToEncode"|"networkSerialize">
Defined in: packages/prismarine/src/world/chunk/ChunkBiomes.ts:61
A biome column that can be read and not written, which is what a chunk hands out.
A write goes through the chunk, which tells a save cut holding the column before the write lands (ADR 0018).
Variables
PLAINS_BIOME
constPLAINS_BIOME:1=1
Defined in: packages/prismarine/src/world/chunk/ChunkBiomes.ts:33
minecraft:plains, the biome a column falls back to.
The id the client knows the biome by, not a registry position: the numbers are Mojang's and the client resolves grass color, fog and ambient sound from them.