struct FlatGenerationContext<'a> {Show 15 fields
seed: i64,
chunk_x: i32,
chunk_z: i32,
chunk_min_x: i32,
chunk_min_z: i32,
center_block_x: i32,
center_block_z: i32,
sea_level: i32,
min_y: i32,
height: i32,
layers: &'a [BlockStateId],
biome: BiomeRef,
template_pools: &'a FxHashMap<Identifier, TemplatePoolData>,
templates: &'a FxHashMap<Identifier, TemplateData>,
surface_y_cache: Option<i32>,
}Fields§
§seed: i64§chunk_x: i32§chunk_z: i32§chunk_min_x: i32§chunk_min_z: i32§center_block_x: i32§center_block_z: i32§sea_level: i32§min_y: i32§height: i32§layers: &'a [BlockStateId]§biome: BiomeRef§template_pools: &'a FxHashMap<Identifier, TemplatePoolData>§templates: &'a FxHashMap<Identifier, TemplateData>§surface_y_cache: Option<i32>Implementations§
Source§impl FlatGenerationContext<'_>
impl FlatGenerationContext<'_>
fn state_at_y(&self, y: i32) -> Option<BlockStateId>
fn is_opaque_at_y(&self, y: i32, ocean_floor: bool) -> bool
fn base_height_flat(&self, ocean_floor: bool) -> i32
Trait Implementations§
Source§impl StructureGenerationContext for FlatGenerationContext<'_>
impl StructureGenerationContext for FlatGenerationContext<'_>
Source§fn chunk_min_x(&self) -> i32
fn chunk_min_x(&self) -> i32
Minimum block X of the chunk.
Source§fn chunk_min_z(&self) -> i32
fn chunk_min_z(&self) -> i32
Minimum block Z of the chunk.
Source§fn center_block_x(&self) -> i32
fn center_block_x(&self) -> i32
Center block X of the chunk.
Source§fn center_block_z(&self) -> i32
fn center_block_z(&self) -> i32
Center block Z of the chunk.
Source§fn template_pools(&self) -> &FxHashMap<Identifier, TemplatePoolData>
fn template_pools(&self) -> &FxHashMap<Identifier, TemplatePoolData>
Template pool registry for jigsaw assembly.
Source§fn templates(&self) -> &FxHashMap<Identifier, TemplateData>
fn templates(&self) -> &FxHashMap<Identifier, TemplateData>
Structure templates (piece definitions + sizes).
Source§fn base_height(&mut self, _x: i32, _z: i32, ocean_floor: bool) -> i32
fn base_height(&mut self, _x: i32, _z: i32, ocean_floor: bool) -> i32
Base height at a column.
Source§fn base_height_full(&mut self, _x: i32, _z: i32, ocean_floor: bool) -> i32
fn base_height_full(&mut self, _x: i32, _z: i32, ocean_floor: bool) -> i32
Full-column base height scan.
Source§fn biome_at(&mut self, _block_x: i32, _block_y: i32, _block_z: i32) -> BiomeRef
fn biome_at(&mut self, _block_x: i32, _block_y: i32, _block_z: i32) -> BiomeRef
Biome at a block position.
Source§fn column_state(&mut self, _x: i32, y: i32, _z: i32) -> ColumnBlock
fn column_state(&mut self, _x: i32, y: i32, _z: i32) -> ColumnBlock
Classify a block in the generator’s base terrain.
Source§fn terrain_surface_height(&self, _x: i32, _z: i32, ocean_floor: bool) -> i32
fn terrain_surface_height(&self, _x: i32, _z: i32, ocean_floor: bool) -> i32
Surface height for off-chunk terrain queries used by piece placement.
Auto Trait Implementations§
impl<'a> Freeze for FlatGenerationContext<'a>
impl<'a> RefUnwindSafe for FlatGenerationContext<'a>
impl<'a> Send for FlatGenerationContext<'a>
impl<'a> Sync for FlatGenerationContext<'a>
impl<'a> Unpin for FlatGenerationContext<'a>
impl<'a> UnsafeUnpin for FlatGenerationContext<'a>
impl<'a> UnwindSafe for FlatGenerationContext<'a>
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<>>