pub struct CanyonShapeConfiguration {
pub distance_factor: FloatProvider,
pub thickness: FloatProvider,
pub width_smoothness: i32,
pub horizontal_radius_factor: FloatProvider,
pub vertical_radius_default_factor: f32,
pub vertical_radius_center_factor: f32,
}Expand description
Canyon shape parameters — controls tunnel shape and width-per-height variation.
Mirrors vanilla’s CanyonCarverConfiguration.CanyonShapeConfiguration.
Fields§
§distance_factor: FloatProviderFraction of the max carving distance used as the actual tunnel length.
thickness: FloatProviderOverall tunnel thickness.
width_smoothness: i32Lower values = fresher width noise each step; higher = smoother.
horizontal_radius_factor: FloatProviderPer-step horizontal-radius multiplier.
vertical_radius_default_factor: f32Baseline vertical-radius multiplier applied along the whole tunnel.
vertical_radius_center_factor: f32Extra vertical-radius multiplier that peaks at the tunnel midpoint.
Implementations§
Source§impl CanyonShapeConfiguration
impl CanyonShapeConfiguration
Sourcepub fn init_width_factors(
&self,
gen_depth: i32,
random: &mut LegacyRandom,
) -> Vec<f32>
pub fn init_width_factors( &self, gen_depth: i32, random: &mut LegacyRandom, ) -> Vec<f32>
Mirrors vanilla CanyonWorldCarver.initWidthFactors — fresh squared
width factor at every width_smoothness-th Y level, otherwise
repeating the previous value.
Sourcepub fn update_vertical_radius(
&self,
random: &mut LegacyRandom,
vertical_radius: f64,
distance: f32,
current_step: f32,
) -> f64
pub fn update_vertical_radius( &self, random: &mut LegacyRandom, vertical_radius: f64, distance: f32, current_step: f32, ) -> f64
Mirrors vanilla CanyonWorldCarver.updateVerticalRadius — applies the
shape’s default/center factors plus a Mth.randomBetween(0.75, 1.0)
jitter.
Trait Implementations§
Source§impl Clone for CanyonShapeConfiguration
impl Clone for CanyonShapeConfiguration
Source§fn clone(&self) -> CanyonShapeConfiguration
fn clone(&self) -> CanyonShapeConfiguration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more