Skip to main content

LevelDimensionType

Struct LevelDimensionType 

pub struct LevelDimensionType {
Show 33 fields pub id: String, pub min_y: i32, pub height: i32, pub logical_height: i32, pub has_skylight: bool, pub has_ceiling: bool, pub has_fixed_time: bool, pub has_ender_dragon_fight: bool, pub coordinate_scale: f64, pub ambient_light: f32, pub infiniburn: String, pub monster_spawn_light_level: Option<(i32, i32)>, pub monster_spawn_block_light_limit: i32, pub skybox: String, pub cardinal_light: String, pub water_evaporates: bool, pub fast_lava: bool, pub respawn_anchor_works: bool, pub nether_portal_spawns_piglin: bool, pub piglins_zombify: bool, pub snow_golem_melts: bool, pub can_start_raid: bool, pub sky_light_level: f32, pub timelines: Vec<String>, pub default_clock: Option<String>, pub bed_can_sleep: String, pub bed_can_set_spawn: String, pub bed_destroy_on_use: bool, pub bed_destroy_on_leave: bool, pub straw_bed_can_sleep: String, pub straw_bed_can_set_spawn: String, pub straw_bed_destroy_on_use: bool, pub straw_bed_destroy_on_leave: bool,
}
Expand description

A level’s dimension type as the game uses it (Level.dimensionType() and the gameplay attributes of its environment), as level.dimension_type(host) reads it: the fields of DimensionSettings that apply, plus the type’s id.

Fields§

§id: String

The dimension type’s id (minecraft:the_nether, or a mod’s or pack’s).

§min_y: i32

The lowest buildable block Y.

§height: i32

The build height in blocks.

§logical_height: i32

How far up portals and chorus fruit reach.

§has_skylight: bool

Whether the sky lights the level.

§has_ceiling: bool

Whether the level has a bedrock ceiling.

§has_fixed_time: bool

Whether the sky’s time does not advance.

§has_ender_dragon_fight: bool

Whether the level runs the End’s dragon fight.

§coordinate_scale: f64

What a portal divides this level’s coordinates by.

§ambient_light: f32

The light every block gets, 0 to 1.

§infiniburn: String

The block tag whose blocks burn forever.

§monster_spawn_light_level: Option<(i32, i32)>

The range monsters’ spawn light is drawn from, when it is a constant or a uniform range.

§monster_spawn_block_light_limit: i32

The block light above which monsters do not spawn.

§skybox: String

overworld, end or none.

§cardinal_light: String

default or nether.

§water_evaporates: bool

Whether water placed here boils away.

§fast_lava: bool

Whether lava flows at the Nether’s speed.

§respawn_anchor_works: bool

Whether respawn anchors can be used.

§nether_portal_spawns_piglin: bool

Whether nether portals spawn zombified piglins.

§piglins_zombify: bool

Whether piglins turn into zombified piglins here.

§snow_golem_melts: bool

Whether snow golems take damage here.

§can_start_raid: bool

Whether a bad omen can start a raid here.

§sky_light_level: f32

The sky light that daylight is measured against, 0 to 15.

§timelines: Vec<String>

The timelines the dimension type names, as ids (minecraft:day).

§default_clock: Option<String>

The clock /time reads here, if the dimension type has a default one.

§bed_can_sleep: String

When a player can sleep in a bed: always, when_dark or never.

§bed_can_set_spawn: String

When a bed sets the respawn point: always, when_dark or never.

§bed_destroy_on_use: bool

Whether a bed explodes when a player tries to use it.

§bed_destroy_on_leave: bool

Whether a bed is destroyed when the player leaves it.

§straw_bed_can_sleep: String

When a player can sleep in a straw bed: always, when_dark or never.

§straw_bed_can_set_spawn: String

When a straw bed sets the respawn point: always, when_dark or never.

§straw_bed_destroy_on_use: bool

Whether a straw bed explodes when a player tries to use it.

§straw_bed_destroy_on_leave: bool

Whether a straw bed is destroyed when the player leaves it.

Trait Implementations§

§

impl Clone for LevelDimensionType

§

fn clone(&self) -> LevelDimensionType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for LevelDimensionType

§

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

Formats the value using the given formatter. Read more
§

impl PartialEq for LevelDimensionType

§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
§

impl StructuralPartialEq for LevelDimensionType

§

impl Wire for LevelDimensionType

§

const MIN: usize

Minimum encoded size, used to reject impossible collection lengths.
§

fn put(&self, out: &mut Writer)

Encodes this value, recording failures on the writer.
§

fn put_owned(self, out: &mut Writer)

Consumes owned data when a resource’s ownership must cross the boundary.
§

fn take(input: &mut Reader<'_>) -> Result<LevelDimensionType, WireError>

Decodes one value, leaving any following bytes for the caller.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.

§

impl<T> Put for T
where T: Wire,

§

fn put_to(&self, out: &mut Writer)

Writes it.
§

impl<T> Record for T
where T: Wire,

§

fn encode(&self, out: &mut Writer)

Writes the argument into a hook call.
§

fn apply(&mut self, bytes: &[u8]) -> Result<(), WireError>

Applies one complete reply, refusing malformed or trailing bytes atomically.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.