API reference / @jsprismarine/prismarine / world/chunk/biomePalette
world/chunk/biomePalette
Interfaces
PackedBiomePalette
Defined in: packages/prismarine/src/world/chunk/biomePalette.ts:19
A section's distinct biomes in first-seen order, and its indices packed into 32 bit words.
Properties
bitsPerBlock
readonlybitsPerBlock:number
Defined in: packages/prismarine/src/world/chunk/biomePalette.ts:21
palette
readonlypalette: readonlynumber[]
Defined in: packages/prismarine/src/world/chunk/biomePalette.ts:20
words
readonlywords:Uint32Array
Defined in: packages/prismarine/src/world/chunk/biomePalette.ts:23
Empty when bitsPerBlock is zero.
Functions
packBiomePalette()
packBiomePalette(
biomes):PackedBiomePalette
Defined in: packages/prismarine/src/world/chunk/biomePalette.ts:32
Packs one section's 4096 biome ids, in XZY order with y fastest.
Neighboring blocks almost always share a biome, so a run of equal ids reuses the previous palette slot instead of looking it up again.
Parameters
biomes
ArrayLike<number>