pub struct VanillaGenerator<N: DimensionNoises> {Show 13 fields
biome_source: BiomeSourceKind,
uniform_carver_biome: Option<BiomeRef>,
noises: Box<N>,
splitter: RandomSplitter,
ore_veinifier: Option<OreVeinifier>,
surface_system: SurfaceSystem,
surface_extension_biomes: SurfaceExtensionBiomes,
default_block_id: BlockStateId,
biome_zoom_seed: i64,
seed: i64,
structure_generator: StructureGenerator,
feature_runner: FeatureDecorationRunner,
_phantom: PhantomData<N>,
}Expand description
A chunk generator for vanilla (normal) world generation.
Matches vanilla’s NoiseBasedChunkGenerator. The biome source is pluggable
per-dimension — overworld, nether, and end each provide a different
BiomeSourceKind variant.
Generic over N: DimensionNoises to support different dimensions with
their own transpiled density functions and noise settings.
Fields§
§biome_source: BiomeSourceKindBiome source for this dimension. Determines biomes at each quart position.
uniform_carver_biome: Option<BiomeRef>Representative biome for source-carver lookup when every possible
biome from biome_source has the same carver list.
Vanilla still samples each source biome in apply_carvers; Steel skips
that sampling only when the source’s full possible-biome set proves the
carver list is uniform. If future biome sources can produce mixed
carver lists this remains None and the vanilla per-source lookup is
used.
noises: Box<N>Noise generators for this dimension’s density functions. Boxed because noise structs can be large.
splitter: RandomSplitterSeed positional splitter for per-chunk construction of aquifers.
ore_veinifier: Option<OreVeinifier>Ore vein generator for replacing stone with ore blocks.
surface_system: SurfaceSystemSurface system for biome-specific block replacement.
surface_extension_biomes: SurfaceExtensionBiomesWhich vanilla surface extension biomes this source can produce.
default_block_id: BlockStateIdBlock state ID for the default block, cached at construction time.
biome_zoom_seed: i64Obfuscated seed for BiomeManager biome zoom fuzzing.
seed: i64World seed as i64 (matching Java’s long), used for structures and carver seeding.
structure_generator: StructureGeneratorShared structure placement/selection engine.
feature_runner: FeatureDecorationRunnerCached placed-feature order for biome decoration.
_phantom: PhantomData<N>Implementations§
Source§impl<N: DimensionNoises> VanillaGenerator<N>
impl<N: DimensionNoises> VanillaGenerator<N>
Sourcepub fn new(
world_path: Option<&Path>,
biome_source: BiomeSourceKind,
seed: u64,
thread_pool: &ThreadPool,
) -> Self
pub fn new( world_path: Option<&Path>, biome_source: BiomeSourceKind, seed: u64, thread_pool: &ThreadPool, ) -> Self
Creates a new VanillaGenerator with the given biome source and seed.
§Panics
Panics if SHA-256 hash output is shorter than 8 bytes (cannot happen).
fn uniform_carver_biome( possible_biomes: &FxHashSet<Identifier>, ) -> Option<BiomeRef>
Source§impl<N: VanillaPostNoiseStateType> VanillaGenerator<N>
impl<N: VanillaPostNoiseStateType> VanillaGenerator<N>
fn preliminary_surface_corners( &self, chunk: GenerationChunk<'_, SurfacePhase>, chunk_min_x: i32, chunk_min_z: i32, ) -> PreliminarySurfaceCorners
Trait Implementations§
Source§impl<N: VanillaPostNoiseStateType> ChunkGenerator for VanillaGenerator<N>
impl<N: VanillaPostNoiseStateType> ChunkGenerator for VanillaGenerator<N>
Source§fn noise_biome(&self, quart_x: i32, quart_y: i32, quart_z: i32) -> BiomeRef
fn noise_biome(&self, quart_x: i32, quart_y: i32, quart_z: i32) -> BiomeRef
Source§fn initial_spawn_search_origin(&self) -> BlockPos
fn initial_spawn_search_origin(&self) -> BlockPos
Source§fn structure_generator(&self) -> Option<&StructureGenerator>
fn structure_generator(&self) -> Option<&StructureGenerator>
Source§fn create_structures(&self, chunk: &Chunk)
fn create_structures(&self, chunk: &Chunk)
Source§fn create_biomes(&self, chunk: &Chunk)
fn create_biomes(&self, chunk: &Chunk)
Source§fn fill_from_noise(
&self,
chunk: GenerationChunk<'_, NoisePhase>,
beardifier: Option<&Beardifier>,
)
fn fill_from_noise( &self, chunk: GenerationChunk<'_, NoisePhase>, beardifier: Option<&Beardifier>, )
Source§fn build_surface(
&self,
chunk: GenerationChunk<'_, SurfacePhase>,
neighbor_biomes: &dyn Fn(IVec3) -> u16,
)
fn build_surface( &self, chunk: GenerationChunk<'_, SurfacePhase>, neighbor_biomes: &dyn Fn(IVec3) -> u16, )
Source§fn apply_carvers(&self, chunk: GenerationChunk<'_, CarversPhase>)
fn apply_carvers(&self, chunk: GenerationChunk<'_, CarversPhase>)
Source§fn create_worldgen_region_random(
&self,
_world_seed: i64,
center: ChunkPos,
) -> RandomSource
fn create_worldgen_region_random( &self, _world_seed: i64, center: ChunkPos, ) -> RandomSource
WorldGenRegion.getRandom().Source§fn apply_biome_decorations(&self, region: &mut WorldGenRegion<'_>)
fn apply_biome_decorations(&self, region: &mut WorldGenRegion<'_>)
Source§impl From<VanillaGenerator<EndNoises>> for ChunkGeneratorType
impl From<VanillaGenerator<EndNoises>> for ChunkGeneratorType
Source§fn from(v: EndGenerator) -> ChunkGeneratorType
fn from(v: EndGenerator) -> ChunkGeneratorType
Source§impl From<VanillaGenerator<NetherNoises>> for ChunkGeneratorType
impl From<VanillaGenerator<NetherNoises>> for ChunkGeneratorType
Source§fn from(v: NetherGenerator) -> ChunkGeneratorType
fn from(v: NetherGenerator) -> ChunkGeneratorType
Source§impl From<VanillaGenerator<OverworldNoises>> for ChunkGeneratorType
impl From<VanillaGenerator<OverworldNoises>> for ChunkGeneratorType
Source§fn from(v: OverworldGenerator) -> ChunkGeneratorType
fn from(v: OverworldGenerator) -> ChunkGeneratorType
Auto Trait Implementations§
impl<N> !RefUnwindSafe for VanillaGenerator<N>
impl<N> !UnwindSafe for VanillaGenerator<N>
impl<N> Freeze for VanillaGenerator<N>
impl<N> Send for VanillaGenerator<N>
impl<N> Sync for VanillaGenerator<N>
impl<N> Unpin for VanillaGenerator<N>where
N: Unpin,
impl<N> UnsafeUnpin for VanillaGenerator<N>
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
§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> ⓘ
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> ⓘ
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 moreArc<SyncMutex<>>