pub(in worldgen::feature) struct NormalNoise {
layers: Box<[Layer]>,
max_value: f64,
}Expand description
Vanilla’s 26.3 normal-noise sampler.
Fields§
§layers: Box<[Layer]>§max_value: f64Implementations§
Source§impl NormalNoise
impl NormalNoise
Sourcepub fn create(
splitter: &RandomSplitter,
noise_id: &str,
first_octave: i32,
amplitudes: &[f64],
) -> NormalNoise
pub fn create( splitter: &RandomSplitter, noise_id: &str, first_octave: i32, amplitudes: &[f64], ) -> NormalNoise
Creates parity noise from a positional worldgen splitter.
Sourcepub fn create_from_random(
random: &mut RandomSource,
first_octave: i32,
amplitudes: &[f64],
) -> NormalNoise
pub fn create_from_random( random: &mut RandomSource, first_octave: i32, amplitudes: &[f64], ) -> NormalNoise
Creates parity noise from a vanilla random source.
Sourcepub fn create_legacy_nether_biome(
random: &mut RandomSource,
first_octave: i32,
amplitudes: &[f64],
) -> NormalNoise
pub fn create_legacy_nether_biome( random: &mut RandomSource, first_octave: i32, amplitudes: &[f64], ) -> NormalNoise
Creates the legacy-Nether variant, whose octave sources are sequentially seeded.
§Panics
Panics if no octaves are provided or a positive octave is requested.
Sourcepub fn create_with_params(
splitter: &RandomSplitter,
noise_id: &str,
base_octave: i32,
base_amplitude: f64,
octave_count: i32,
normalize: bool,
amplitude_modifiers: &[f64],
) -> NormalNoise
pub fn create_with_params( splitter: &RandomSplitter, noise_id: &str, base_octave: i32, base_amplitude: f64, octave_count: i32, normalize: bool, amplitude_modifiers: &[f64], ) -> NormalNoise
Creates current datapack noise from a positional worldgen splitter.
Sourcepub fn create_from_random_with_params(
random: &mut RandomSource,
base_octave: i32,
base_amplitude: f64,
octave_count: i32,
normalize: bool,
amplitude_modifiers: &[f64],
) -> NormalNoise
pub fn create_from_random_with_params( random: &mut RandomSource, base_octave: i32, base_amplitude: f64, octave_count: i32, normalize: bool, amplitude_modifiers: &[f64], ) -> NormalNoise
Creates current datapack noise from a vanilla random source.
Sourcepub fn get_value(&self, x: f64, y: f64, z: f64) -> f32
pub fn get_value(&self, x: f64, y: f64, z: f64) -> f32
Samples the float-valued vanilla noise stack.
Sourcepub fn get_value_xz(&self, x: f64, z: f64) -> f32
pub fn get_value_xz(&self, x: f64, z: f64) -> f32
Samples the float-valued vanilla noise stack with a fixed Y coordinate.
Sourcepub fn get_value_xy(&self, x: f64, y: f64) -> f32
pub fn get_value_xy(&self, x: f64, y: f64) -> f32
Samples the float-valued vanilla noise stack with a fixed Z coordinate.
Trait Implementations§
Source§impl Clone for NormalNoise
impl Clone for NormalNoise
Source§fn clone(&self) -> NormalNoise
fn clone(&self) -> NormalNoise
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NormalNoise
impl RefUnwindSafe for NormalNoise
impl Send for NormalNoise
impl Sync for NormalNoise
impl Unpin for NormalNoise
impl UnsafeUnpin for NormalNoise
impl UnwindSafe for NormalNoise
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>