Skip to main content

DimensionSettings

Struct DimensionSettings 

pub struct DimensionSettings {
Show 43 fields pub min_y: i32, pub height: i32, pub logical_height: i32, pub has_skylight: bool, pub has_ceiling: bool, pub generator: String, pub noise_settings: String, pub biome: String, pub biome_source: BiomeSourceKind, pub biomes: Vec<String>, pub biome_points: Vec<BiomePoint>, pub biome_scale: u32, pub biome_preset: String, 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: (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 sea_level: Option<i32>, 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, pub sky_color: Option<String>, pub fog_color: Option<String>, pub cloud_height: Option<f32>, pub day_cycle: String,
}
Expand description

What a mod’s dimension is made of. The default is the Overworld’s shape and terrain over plains; the parts of a dimension type not named here are the Overworld’s.

Fields§

§min_y: i32

The lowest block’s y: a multiple of 16, from -2032.

§height: i32

The build height: a multiple of 16, at least 16, reaching no higher than 2031.

§logical_height: i32

How far up portals and chorus fruit reach, at most height.

§has_skylight: bool

Whether the sky lights the level.

§has_ceiling: bool

Whether the level has a bedrock ceiling, as the Nether does.

§generator: String

The chunk generator’s id: minecraft:noise, or one a mod registered with register_chunk_generator, which takes no noise settings.

§noise_settings: String

The noise settings’ id (minecraft:overworld, or a data pack’s).

§biome: String

The one biome the level has, with the Fixed biome source.

§biome_source: BiomeSourceKind

How the level chooses its biomes. Only Fixed suits a mod’s own chunk generator, which writes terrain only.

§biomes: Vec<String>

The biomes a Checkerboard source alternates, at least one (vanilla sets no maximum).

§biome_points: Vec<BiomePoint>

A Points source’s biomes and the climate each is chosen for, at least one.

§biome_scale: u32

A Checkerboard’s cell size as a power of two of chunks, 0 to 62 (vanilla’s default is 2).

§biome_preset: String

A MultiNoise source’s preset: minecraft:overworld or minecraft:nether.

§has_fixed_time: bool

DimensionType.hasFixedTime: the sky’s time does not advance (the Nether’s and the End’s).

§has_ender_dragon_fight: bool

DimensionType.hasEnderDragonFight: the level runs the End’s dragon fight.

§coordinate_scale: f64

DimensionType.coordinateScale: what a portal divides this level’s coordinates by (the Nether’s is 8); above 0 and at most 30,000,000.

§ambient_light: f32

DimensionType.ambientLight: the light every block gets, 0 to 1.

§infiniburn: String

DimensionType.infiniburn: the block tag (#minecraft:infiniburn_overworld) whose blocks burn forever.

§monster_spawn_light_level: (i32, i32)

DimensionType.monsterSpawnLightTest: the highest light a monster spawns in is drawn from this range, both ends 0 to 15.

§monster_spawn_block_light_limit: i32

DimensionType.monsterSpawnBlockLightLimit: the block light above which monsters do not spawn, 0 to 15.

§skybox: String

The sky drawn: overworld, end or none (DimensionType.skybox).

§cardinal_light: String

How block faces are lit by direction: default or nether (DimensionType.cardinalLightType).

§water_evaporates: bool

minecraft:gameplay/water_evaporates: water placed here boils away, as in the Nether.

§fast_lava: bool

minecraft:gameplay/fast_lava: lava flows at the Nether’s speed.

§respawn_anchor_works: bool

minecraft:gameplay/respawn_anchor_works: respawn anchors can be charged and used.

§nether_portal_spawns_piglin: bool

minecraft:gameplay/nether_portal_spawns_piglin: nether portals spawn zombified piglins.

§piglins_zombify: bool

minecraft:gameplay/piglins_zombify: piglins turn into zombified piglins here.

§snow_golem_melts: bool

minecraft:gameplay/snow_golem_melts: snow golems take damage here.

§can_start_raid: bool

minecraft:gameplay/can_start_raid: a bad omen can start a raid here.

§sky_light_level: f32

minecraft:gameplay/sky_light_level: the sky light that daylight is measured against, 0 to 15.

§sea_level: Option<i32>

Level.getSeaLevel: the sea level mob spawning, rain and snow, maps and phantoms use. With None it is the noise settings’ own for minecraft:noise, and the Overworld’s 63 for a chunk generator a mod registered, which reads none; Some is for that generator, whose terrain the game cannot read a sea level from. A level of minecraft:noise keeps its noise settings’ sea level, which the terrain is built with.

§bed_can_sleep: String

When a player can sleep in a bed here (BedRule.canSleep): always, when_dark or never.

§bed_can_set_spawn: String

When a bed sets the player’s respawn point here (BedRule.canSetSpawn): always, when_dark or never.

§bed_destroy_on_use: bool

Whether a bed explodes when a player tries to use it (BedRule.explodes), as in the Nether.

§bed_destroy_on_leave: bool

Whether a bed is destroyed when the player leaves it (BedRule.destroyOnLeave).

§straw_bed_can_sleep: String

The same four for a straw bed (minecraft:gameplay/straw_bed_rule): when a player can sleep in one, 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.

§sky_color: Option<String>

minecraft:visual/sky_color as #rrggbb: the sky overhead; None is the Overworld’s.

§fog_color: Option<String>

minecraft:visual/fog_color as #rrggbb: the fog at the horizon; None is the Overworld’s.

§cloud_height: Option<f32>

minecraft:visual/cloud_height: the clouds’ height in blocks; None is the Overworld’s.

§day_cycle: String

The timelines and default clock the dimension type names: overworld (the day and moon cycles, the villagers’ schedule and the Overworld’s clock), nether (the villagers’ schedule only, no clock), end (the End’s timeline and clock) or none. They set the level’s sky over the day, whether monsters burn in daylight, and the clock /time reads.

Implementations§

§

impl DimensionSettings

pub fn invalid_biome_source(&self) -> Option<String>

What the biome source’s codec refuses, if anything.

pub fn invalid_field(&self) -> Option<String>

What the dimension type’s codec refuses in the fields besides the build height, if anything: a value out of its range, or a name the game has no such sky or lighting for.

Trait Implementations§

§

impl Clone for DimensionSettings

§

fn clone(&self) -> DimensionSettings

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 DimensionSettings

§

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

Formats the value using the given formatter. Read more
§

impl Default for DimensionSettings

§

fn default() -> DimensionSettings

Returns the “default value” for a type. Read more
§

impl PartialEq for DimensionSettings

§

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

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

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

Inequality operator !=. Read more
§

impl StructuralPartialEq for DimensionSettings

§

impl Wire for DimensionSettings

§

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