pub struct OreVeinifier {
ore_splitter: RandomSplitter,
copper: VeinType,
iron: VeinType,
}Expand description
Ore vein generator. Holds cached block state IDs and the positional random splitter used for per-block randomness.
Fields§
§ore_splitter: RandomSplitter§copper: VeinType§iron: VeinTypeImplementations§
Source§impl OreVeinifier
impl OreVeinifier
Sourcepub fn new(splitter: &RandomSplitter) -> Self
pub fn new(splitter: &RandomSplitter) -> Self
Create a new ore veinifier from the seed’s positional splitter.
The splitter should be the same one used to create OverworldNoises
(i.e. from Xoroshiro::from_seed(seed).next_positional()).
Sourcepub fn compute_interpolated<N: DimensionNoises>(
&self,
noises: &N,
cache: &mut N::ColumnCache,
interpolated: &[f64],
world_x: i32,
world_y: i32,
world_z: i32,
) -> Option<BlockStateId>
pub fn compute_interpolated<N: DimensionNoises>( &self, noises: &N, cache: &mut N::ColumnCache, interpolated: &[f64], world_x: i32, world_y: i32, world_z: i32, ) -> Option<BlockStateId>
Check if this solid block should be replaced with an ore vein block, using trilinearly interpolated vein density values.
interpolated contains all interpolated channel values from the noise
chunk. combine_vein_toggle and combine_vein_ridged extract the
vein-specific channels and apply outer operations.
vein_gap has no Interpolated marker so is evaluated directly.
Auto Trait Implementations§
impl Freeze for OreVeinifier
impl RefUnwindSafe for OreVeinifier
impl Send for OreVeinifier
impl Sync for OreVeinifier
impl Unpin for OreVeinifier
impl UnsafeUnpin for OreVeinifier
impl UnwindSafe for OreVeinifier
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<>>