pub struct BlockStates {
pub palette: Vec<BlockState>,
pub data: Option<LongArray>,
}
Expand description
Fields§
§palette: Vec<BlockState>
Set of different block states used in this particular section.
data: Option<LongArray>
A packed array of 4096 indices pointing to the palette
If only one block state is present in the palette, this field is not required and the block fills the whole section.
All indices are the same length. This length is set to the minimum amount of bits required to represent the largest index in the palette, and then set to a minimum size of 4 bits.
The indices are not packed across multiple elements of the array, meaning that if there is no more space in a given 64-bit integer for the whole next index, it starts instead at the first (lowest) bit of the next 64-bit integer. Different sections of a chunk can have different lengths for the indices.
Trait Implementations§
Source§impl Clone for BlockStates
impl Clone for BlockStates
Source§fn clone(&self) -> BlockStates
fn clone(&self) -> BlockStates
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BlockStates
impl Debug for BlockStates
Source§impl<'de> Deserialize<'de> for BlockStates
impl<'de> Deserialize<'de> for BlockStates
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BlockStates
impl PartialEq for BlockStates
impl StructuralPartialEq for BlockStates
Auto Trait Implementations§
impl Freeze for BlockStates
impl RefUnwindSafe for BlockStates
impl Send for BlockStates
impl Sync for BlockStates
impl Unpin for BlockStates
impl UnwindSafe for BlockStates
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more