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: boolIf cheats are enabled
border_center_x: f64The x position of the center of the border
border_center_y: f64The y position of the center of the border
border_damage_per_block: f64The damage dealt by the border per block outside
border_size: f64The size of the border
border_safe_zone: f64The safe zone of the border
boder_size_lerp_target: f64The lerp target size
border_size_lerp_time: i64The lerp target time
border_warning_blocks: f64The block length of the warning
border_warning_time: f64The time of the warning
clear_weather_time: i32The 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: i32The Data version
day_time: i64§difficulty: DifficultyThe difficulty
difficulty_locked: boolIf the difficulty is locked
end_data: Option<EndData>§game_rules: HashMap<String, String>A list of the used game rules
world_gen_settings: WorldGenSettingsThe world generation settings for every dimension
default_game_mode: GameModeThe default game mode of players
hardcore: boolWether the player is allowed to respawn after the death
initialized: boolWhether the world was initiated right or not
last_played: SystemTime§level_name: StringThe name of the level
map_features: boolWether structures should be generated or not
raining: boolWhether it is raining or not
rain_time: i32Time until the state of raining is toggled again
random_seed: i64The seed used for continueus level generation
size_on_disk: i64An estimated size, currently unused, so null in this implementation
spawn_x: i32The x coordinate of the spawn
spawn_y: i32The y coordinate of the spawn
spawn_z: i32The z coordinate of the spawn
thundering: boolWhether 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: i32The time until thundering is toggled again
version: i32The NBT version of the level
mc_version: VersionThe minecraft version, the world was saved in
wandering_trader_id: u128Id of the current wandering traider in the world
wandering_trader_spawn_chance: f64The current chance of a wandering trader spawning
wandering_trader_spawn_delay: i32The amount of ticks until the next wandering trader spawn try is triggered
was_modified: boolIf the was saved in a modified version or not