pub struct NetherClimateSampler {
noises: Box<NetherNoises>,
}Expand description
Climate sampler for the nether using compiled density functions.
Only evaluates temperature and vegetation from the nether noise router. Continentalness, erosion, depth, and weirdness are always 0 in the nether.
Fields§
§noises: Box<NetherNoises>Noise generators needed by the nether density functions.
Implementations§
Source§impl NetherClimateSampler
impl NetherClimateSampler
Sourcepub fn new(seed: u64) -> Self
pub fn new(seed: u64) -> Self
Create a new nether climate sampler with the given seed.
Uses the legacy random source path matching vanilla’s RandomState with
useLegacyRandomSource=true:
- Temperature:
LegacyRandomSource(seed + 0),createLegacyNetherBiome, params(-7, [1.0, 1.0]) - Vegetation:
LegacyRandomSource(seed + 1),createLegacyNetherBiome, params(-7, [1.0, 1.0]) - Offset (shift):
random.fromHashOf("minecraft:offset"), regular create, params(0, [0.0])
Sourcepub fn init_column_grid(
&self,
cache: &mut NetherColumnCache,
chunk_block_x: i32,
chunk_block_z: i32,
)
pub fn init_column_grid( &self, cache: &mut NetherColumnCache, chunk_block_x: i32, chunk_block_z: i32, )
Pre-populate a column cache’s flat-noise grid for a chunk’s quart columns.
Mirrors [OverworldClimateSampler::init_column_grid]: lets the biome
stage reuse vanilla’s NoiseChunk.FlatCache grid instead of recomputing
flat (xz-only) climate noise for every quart cell.
Auto Trait Implementations§
impl Freeze for NetherClimateSampler
impl RefUnwindSafe for NetherClimateSampler
impl Send for NetherClimateSampler
impl Sync for NetherClimateSampler
impl Unpin for NetherClimateSampler
impl UnsafeUnpin for NetherClimateSampler
impl UnwindSafe for NetherClimateSampler
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
§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<>>