fix: many generation fixes
This commit is contained in:
1 parent
8d4639e25a
commit
df983f8477
38 files changed
+23699
-415
No files matched your search
@@ -8,25 +8,30 @@ use pumpkin_util::math::int_provider::{
|
||||
UniformIntProvider, VeryBiasedToBottomIntProvider,
|
||||
};
|
||||
use pumpkin_util::y_offset::{AboveBottom, Absolute, BelowTop, YOffset};
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum HeightProvider {
|
||||
Uniform(UniformHeightProvider),
|
||||
Trapezoid(TrapezoidHeightProvider),
|
||||
VeryBiasedToBottom(VeryBiasedToBottomHeightProvider),
|
||||
}
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct UniformHeightProvider {
|
||||
pub min_inclusive: YOffset,
|
||||
pub max_inclusive: YOffset,
|
||||
}
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct TrapezoidHeightProvider {
|
||||
pub min_inclusive: YOffset,
|
||||
pub max_inclusive: YOffset,
|
||||
pub plateau: Option<i32>,
|
||||
}
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct VeryBiasedToBottomHeightProvider {
|
||||
pub min_inclusive: YOffset,
|
||||
pub max_inclusive: YOffset,
|
||||
pub inner: Option<std::num::NonZero<u32>>,
|
||||
}
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct CaveCarverConfig {
|
||||
pub count: IntProvider,
|
||||
pub horizontal_radius_multiplier: FloatProvider,
|
||||
@@ -52,6 +57,7 @@ impl CaveCarverConfig {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct CanyonShapeConfig {
|
||||
pub distance_factor: FloatProvider,
|
||||
pub thickness: FloatProvider,
|
||||
@@ -61,14 +67,17 @@ pub struct CanyonShapeConfig {
|
||||
pub vertical_radius_center_factor: f32,
|
||||
pub y_scale: f32,
|
||||
}
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct CanyonCarverConfig {
|
||||
pub vertical_rotation: FloatProvider,
|
||||
pub shape: CanyonShapeConfig,
|
||||
}
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum CarverAdditionalConfig {
|
||||
Cave(CaveCarverConfig),
|
||||
Canyon(CanyonCarverConfig),
|
||||
}
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct CarverConfig {
|
||||
pub probability: f32,
|
||||
pub y: HeightProvider,
|
||||
|
||||
Reference in new issue
Block a user