Namespace Shard.Gameplay.Universe.World.Chunks.Palettes
Classes
- BitFieldArray
A packed array of
lengthfixed-width unsigned indices,bitseach, laid out LSB-first across a byte stream (Java:BitFieldArr). Indexi's low bit sits at bit(ibits) % 8of 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 isceil(length*bits / 8)bytes.
- ColumnBytePalette
A per-column palette of one value per
(x,z)cell over a 32×32 column (Java:IntBytePalettefor tints,ShortBytePalettefor 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
IntBytePaletteformat:[u16 count][count × i32 key][i32 packedByteLength][packed indices], little-endian.