Struct level_lib::anvil::region::chunk::chunk_data::ChunkData

source ·
pub struct ChunkData {
    pub x_pos: i32,
    pub z_pos: i32,
    pub y_pos: i32,
    pub status: GenerationStatus,
    pub last_update: i64,
    pub sections: Vec<ChunkSection>,
    pub block_entities: Vec<BlockEntity>,
    pub heightmaps: Heightmaps,
    pub fluid_ticks: Vec<TileTick>,
    pub block_ticks: Vec<TileTick>,
    pub inhabited_time: i64,
    pub structure_data_list: StructureDataList,
}
Expand description

A struct holding all chunk data

§Source

§Info

Everything, taged as “Not confirmed for 1.18 format” is not implemented, but will be if it turnes out to be neccessarry

Fields§

§x_pos: i32

The real x position of the chunk

§z_pos: i32

The read z position of the chunk

§y_pos: i32

The lowest y sector position in the chunk

§status: GenerationStatus

The generation status of the chunk

§last_update: i64

The last tick that the chunk was updated

§sections: Vec<ChunkSection>

A list of all sections of the chunk

§block_entities: Vec<BlockEntity>

A list of all block entities in a chunk

§heightmaps: Heightmaps

All heightmaps of the section

§fluid_ticks: Vec<TileTick>

A list of “active” liquid tiles in the chunk

§block_ticks: Vec<TileTick>

A list of “active” blocks in the chunk

§inhabited_time: i64

This variable increases tick by the amount of players inside of it

§structure_data_list: StructureDataList

A list of all structures and their data

Implementations§

source§

impl ChunkData

source

pub fn new( heightmap: [[u16; 16]; 16], filler: &str, x: i64, z: i64, current_tick: i64 ) -> Self

creates a new instance

Trait Implementations§

source§

impl AsNbtValue for ChunkData

source§

fn as_nbt_value(&self) -> Result<NbtValue, ()>

converts the struct to a NbtValue
source§

impl Debug for ChunkData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromNbtValue for ChunkData

source§

fn from_nbt_value(value: NbtValue) -> Result<Self, ()>
where Self: Sized,

converts the struct to a NbtValue
source§

impl IntoNbt for ChunkData

source§

fn to_nbt(&self) -> NbtValue

Converts this struct into a NbtValue
source§

impl PartialEq for ChunkData

source§

fn eq(&self, other: &ChunkData) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for ChunkData

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.