API reference / @jsprismarine/prismarine / world/chunk/BlockStorage
world/chunk/BlockStorage
Classes
Interfaces
BlockStorageData
Defined in: packages/prismarine/src/world/chunk/BlockStorage.ts:11
The contents a block storage starts from: palette indices and the palette they index.
Properties
[OWNED_INDICES]?
optional[OWNED_INDICES]?:true
Defined in: packages/prismarine/src/world/chunk/BlockStorage.ts:15
blocks?
optionalblocks?:ArrayLike<number>
Defined in: packages/prismarine/src/world/chunk/BlockStorage.ts:13
One palette index per block, in XZY order. Copied, so the caller may reuse its buffer.
palette?
optionalpalette?:number[]
Defined in: packages/prismarine/src/world/chunk/BlockStorage.ts:14
Type Aliases
ReadonlyBlockStorage
ReadonlyBlockStorage =
Pick<BlockStorage,"getBlock"|"getRevision"|"getRuntimeId"|"getIndexStorageByteLength"|"getRetainedIndexStorageByteLength"|"getPalette"|"getPaletteIndexAt"|"getPaletteIndexAtIndex"|"getPackedIndexWords"|"networkSerialize"|"isEmpty">
Defined in: packages/prismarine/src/world/chunk/BlockStorage.ts:129
A block storage that can be read and not written.
What a chunk hands out once it is in a world: a write has to go through the chunk, so the save cut hears of it before it lands (ADR 0018). A list of what may be read rather than of what may not, so a mutator added to BlockStorage later stays out of it.