Skip to main content

BiomeModifierOperation

Enum BiomeModifierOperation 

#[non_exhaustive]
pub enum BiomeModifierOperation { AddFeatures { features: Vec<String>, step: String, }, RemoveFeatures { features: Vec<String>, steps: Vec<String>, }, AddSpawns { spawners: Vec<BiomeModifierSpawner>, }, RemoveSpawns { entity_types: Vec<String>, }, AddSpawnCosts { entity_types: Vec<String>, energy_budget: f64, charge: f64, }, RemoveSpawnCosts { entity_types: Vec<String>, }, AddCarvers { carvers: Vec<String>, }, RemoveCarvers { carvers: Vec<String>, }, ModifyBiome {
Show 17 fields temperature: Option<f64>, downfall: Option<f64>, has_precipitation: Option<bool>, temperature_modifier: Option<String>, sky_color: Option<u32>, fog_color: Option<u32>, water_color: Option<u32>, water_fog_color: Option<u32>, foliage_color: Option<BiomeColourChange>, dry_foliage_color: Option<BiomeColourChange>, grass_color: Option<BiomeColourChange>, ambient_particles: Option<Vec<BiomeAmbientParticle>>, ambient_loop: Option<String>, ambient_additions: Option<Vec<BiomeAmbientAddition>>, ambient_mood: Option<BiomeAmbientMood>, background_music: Option<BiomeMusic>, music_volume: Option<f64>,
}, }
Expand description

What a biome modifier does to its biomes.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AddFeatures

add_features: append placed features to one generation step.

Fields

§features: Vec<String>

Placed feature ids (mymod:ore) or tags (#mymod:tag).

§step: String

The generation step (underground_ores, …).

§

RemoveFeatures

remove_features: take placed features out of generation steps.

Fields

§features: Vec<String>

Placed feature ids or tags.

§steps: Vec<String>

The steps to take them out of; none means every step.

§

AddSpawns

add_spawns: append spawners to their entity types’ spawn categories.

Fields

§spawners: Vec<BiomeModifierSpawner>

The spawners to add.

§

RemoveSpawns

remove_spawns: take entity types out of every spawn category.

Fields

§entity_types: Vec<String>

Entity type ids or tags.

§

AddSpawnCosts

add_spawn_costs: set the spawn cost of entity types.

Fields

§entity_types: Vec<String>

Entity type ids or tags.

§energy_budget: f64

The energy_budget of the cost.

§charge: f64

The charge of the cost.

§

RemoveSpawnCosts

remove_spawn_costs: take entity types out of spawn_costs.

Fields

§entity_types: Vec<String>

Entity type ids or tags.

§

AddCarvers

add_carvers: append configured carvers to the biome’s carvers.

Fields

§carvers: Vec<String>

Configured carver ids (mymod:pit) or tags.

§

RemoveCarvers

remove_carvers: take configured carvers out of the biome’s carvers.

Fields

§carvers: Vec<String>

Configured carver ids or tags.

§

ModifyBiome

horizon:modify_biome (NeoForge’s MODIFY phase): set single values of the biome, after every addition and removal. A None leaves the value as it is.

Fields

§temperature: Option<f64>

temperature.

§downfall: Option<f64>

downfall.

§has_precipitation: Option<bool>

has_precipitation.

§temperature_modifier: Option<String>

temperature_modifier: none or frozen.

§sky_color: Option<u32>

effects.sky_color, 24-bit RGB (0..=0xFFFFFF).

§fog_color: Option<u32>

effects.fog_color, 24-bit RGB.

§water_color: Option<u32>

effects.water_color, 24-bit RGB.

§water_fog_color: Option<u32>

effects.water_fog_color, 24-bit RGB.

§foliage_color: Option<BiomeColourChange>

effects.foliage_color: set it or remove the override.

§dry_foliage_color: Option<BiomeColourChange>

effects.dry_foliage_color: set it or remove the override.

§grass_color: Option<BiomeColourChange>

effects.grass_color: set it or remove the override.

§ambient_particles: Option<Vec<BiomeAmbientParticle>>

minecraft:visual/ambient_particles: replaces the biome’s particles (an empty list removes them).

§ambient_loop: Option<String>

loop of minecraft:audio/ambient_sounds. Setting this, ambient_mood or ambient_additions replaces the biome’s whole ambient sounds value with the ones set.

§ambient_additions: Option<Vec<BiomeAmbientAddition>>

additions of minecraft:audio/ambient_sounds.

§ambient_mood: Option<BiomeAmbientMood>

mood of minecraft:audio/ambient_sounds.

§background_music: Option<BiomeMusic>

default of minecraft:audio/background_music; replaces the whole value, so the biome’s creative and underwater music go.

§music_volume: Option<f64>

minecraft:audio/music_volume, 0.0..=1.0.

Trait Implementations§

§

impl Clone for BiomeModifierOperation

§

fn clone(&self) -> BiomeModifierOperation

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 BiomeModifierOperation

§

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

Formats the value using the given formatter. Read more
§

impl PartialEq for BiomeModifierOperation

§

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

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

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

Inequality operator !=. Read more
§

impl StructuralPartialEq for BiomeModifierOperation

§

impl Wire for BiomeModifierOperation

§

const MIN: usize = 4usize

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