Struct level_lib::structs::level::Level

source ·
pub struct Level {
Show 42 fields pub allow_cheats: bool, pub border_center_x: f64, pub border_center_y: f64, pub border_damage_per_block: f64, pub border_size: f64, pub border_safe_zone: f64, pub boder_size_lerp_target: f64, pub border_size_lerp_time: i64, pub border_warning_blocks: f64, pub border_warning_time: f64, pub clear_weather_time: i32, pub custom_boss_events: Vec<CustomBossEvent>, pub disabled: Vec<String>, pub enabled: Vec<String>, pub data_version: i32, pub day_time: i64, pub difficulty: Difficulty, pub difficulty_locked: bool, pub end_data: Option<EndData>, pub game_rules: HashMap<String, String>, pub world_gen_settings: WorldGenSettings, pub default_game_mode: GameMode, pub hardcore: bool, pub initialized: bool, pub last_played: SystemTime, pub level_name: String, pub map_features: bool, pub raining: bool, pub rain_time: i32, pub random_seed: i64, pub size_on_disk: i64, pub spawn_x: i32, pub spawn_y: i32, pub spawn_z: i32, pub thundering: bool, pub thunder_time: i32, pub version: i32, pub mc_version: Version, pub wandering_trader_id: u128, pub wandering_trader_spawn_chance: f64, pub wandering_trader_spawn_delay: i32, pub was_modified: bool,
}
Expand description

Structure to hold the imporant but basic Level data

Fields§

§allow_cheats: bool

If cheats are enabled

§border_center_x: f64

The x position of the center of the border

§border_center_y: f64

The y position of the center of the border

§border_damage_per_block: f64

The damage dealt by the border per block outside

§border_size: f64

The size of the border

§border_safe_zone: f64

The safe zone of the border

§boder_size_lerp_target: f64

The lerp target size

§border_size_lerp_time: i64

The lerp target time

§border_warning_blocks: f64

The block length of the warning

§border_warning_time: f64

The time of the warning

§clear_weather_time: i32

The time until clear weather has ended

§custom_boss_events: Vec<CustomBossEvent>

A vollection of active bossbars

§disabled: Vec<String>

List of disabled datapacks

§enabled: Vec<String>

List of enabled datapacks

§data_version: i32

The Data version

§day_time: i64

The time of the day

§Note

This counts continiously up to determine the day

§difficulty: Difficulty

The difficulty

§difficulty_locked: bool

If the difficulty is locked

§end_data: Option<EndData>

End data

§Note

This is only existent, after the end is entered for the first time

§game_rules: HashMap<String, String>

A list of the used game rules

§world_gen_settings: WorldGenSettings

The world generation settings for every dimension

§default_game_mode: GameMode

The default game mode of players

§hardcore: bool

Wether the player is allowed to respawn after the death

§initialized: bool

Whether the world was initiated right or not

§last_played: SystemTime

The timestamp, when this map was last loaded

§Note

Saved as Unix time in milliseconds

§level_name: String

The name of the level

§map_features: bool

Wether structures should be generated or not

§raining: bool

Whether it is raining or not

§rain_time: i32

Time until the state of raining is toggled again

§random_seed: i64

The seed used for continueus level generation

§size_on_disk: i64

An estimated size, currently unused, so null in this implementation

§spawn_x: i32

The x coordinate of the spawn

§spawn_y: i32

The y coordinate of the spawn

§spawn_z: i32

The z coordinate of the spawn

§thundering: bool

Whether it is thundering or not

§Note

This only applies, if raining is true and it is dark enough so that monsters are able to spawn below the sky

§thunder_time: i32

The time until thundering is toggled again

§version: i32

The NBT version of the level

§mc_version: Version

The minecraft version, the world was saved in

§wandering_trader_id: u128

Id of the current wandering traider in the world

§wandering_trader_spawn_chance: f64

The current chance of a wandering trader spawning

§wandering_trader_spawn_delay: i32

The amount of ticks until the next wandering trader spawn try is triggered

§was_modified: bool

If the was saved in a modified version or not

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

§

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.