Table of Contents

Namespace Shard.Gameplay.Universe.World.Chunks.Palettes

Classes

BitFieldArray

A packed array of length fixed-width unsigned indices, bits each, laid out LSB-first across a byte stream (Java: BitFieldArr). Index i's low bit sits at bit (ibits) % 8 of byte (ibits) / 8; a value that straddles a byte boundary spills its remaining high bits into the next byte starting at bit 0. Backing size is ceil(length*bits / 8) bytes.

ColumnBytePalette

A per-column palette of one value per (x,z) cell over a 32×32 column (Java: IntBytePalette for tints, ShortBytePalette for heights). Distinct values are interned into a key table and each of the 1024 cells stores a 10-bit index into it (via BitFieldArray). Cell 0 defaults to key 0.

The direct serialization returns one value per cell for the heightmap packet field. The tint packet field uses the Hytale IntBytePalette format: [u16 count][count × i32 key][i32 packedByteLength][packed indices], little-endian.