[][src]Function fastanvil::expand_blockstates

pub fn expand_blockstates(data: &[i64], palette_len: usize) -> Vec<u16>

Expand blockstate data so each block is an element of a Vec.

This requires the number of items in the palette of the section the blockstates came from. This is because blockstate is packed with on a bit-level granularity. If the maximum index in the palette fits in 5 bits, then every 5 bits of the blockstates will represent a block. In 1.15 there is no padding, so blocks bleed into one another, so remainder bits are tracked and handled for you. In 1.16 padding bits are used so that a block is always in a single 64-bit int.