Struct Level

Source
pub struct Level {
    pub seed: i32,
    pub spawn_x: i32,
    pub spawn_y: i32,
    pub spawn_z: i32,
    pub world_size: u64,
    pub last_played: i32,
    pub world_name: Vec<u8>,
}
Available on crate features be and dev-be-legacy-alpha only.

Fields§

§seed: i32

The level’s seed for generation

§spawn_x: i32

The x coordinate of the world spawn

§spawn_y: i32

The y coordinate of the world spawn

§spawn_z: i32

The z coordinate of the world spawn

§world_size: u64

Estimated world size in bits (not a verified field)

§last_played: i32

32bit unix timestamp of when the world was last played

§world_name: Vec<u8>

The name of the world, uses CP437 characters

Trait Implementations§

Source§

impl BinaryFile for Level

Source§

fn from_reader<R: Read>(reader: R) -> Result<Self>

Reads a binary stream and returns an instance of Self
Source§

fn to_writer<W: Write>(&self, writer: W) -> Result<()>

Writes the strut as a binary stream
Source§

impl Debug for Level

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Level

§

impl RefUnwindSafe for Level

§

impl Send for Level

§

impl Sync for Level

§

impl Unpin for Level

§

impl UnwindSafe for Level

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>,

Source§

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>,

Source§

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.