pub(super) struct ScatteredFeaturePlacer<'a, 'world> {
region: &'a mut WorldGenRegion<'world>,
registry: &'a Registry,
bounding_box: &'a mut BoundingBox,
orientation: Option<Direction>,
clip: BoundingBox,
}Fields§
§region: &'a mut WorldGenRegion<'world>§registry: &'a Registry§bounding_box: &'a mut BoundingBox§orientation: Option<Direction>§clip: BoundingBoxImplementations§
Source§impl<'a, 'world> ScatteredFeaturePlacer<'a, 'world>
impl<'a, 'world> ScatteredFeaturePlacer<'a, 'world>
pub(super) const fn new( region: &'a mut WorldGenRegion<'world>, registry: &'a Registry, bounding_box: &'a mut BoundingBox, orientation: Option<Direction>, clip: BoundingBox, ) -> Self
pub(super) fn update_average_ground_height( &mut self, height_position: &mut Option<i32>, offset: i32, ) -> bool
pub(super) fn generate_box( &mut self, x0: i32, y0: i32, z0: i32, x1: i32, y1: i32, z1: i32, edge: BlockStateId, fill: BlockStateId, skip_air: bool, )
pub(super) fn generate_box_with_selector( &mut self, x0: i32, y0: i32, z0: i32, x1: i32, y1: i32, z1: i32, skip_air: bool, random: &mut WorldgenRandom, selector: impl FnMut(&mut WorldgenRandom, i32, i32, i32, bool) -> BlockStateId, )
pub(super) fn generate_air_box( &mut self, x0: i32, y0: i32, z0: i32, x1: i32, y1: i32, z1: i32, )
pub(super) fn fill_column_down( &mut self, state: BlockStateId, x: i32, start_y: i32, z: i32, )
pub(super) fn place_block( &mut self, state: BlockStateId, x: i32, y: i32, z: i32, )
pub(super) fn create_chest( &mut self, random: &mut WorldgenRandom, x: i32, y: i32, z: i32, loot_table: &'static str, ) -> bool
pub(super) fn create_dispenser( &mut self, random: &mut WorldgenRandom, x: i32, y: i32, z: i32, facing: Direction, loot_table: &'static str, ) -> bool
pub(super) fn create_spawner( &mut self, x: i32, y: i32, z: i32, entity_id: &'static str, ) -> bool
pub(super) const fn world_pos(&self, x: i32, y: i32, z: i32) -> BlockPos
pub(super) const fn clip(&self) -> BoundingBox
pub(super) const fn sea_level(&self) -> i32
pub(super) fn block_at(&self, x: i32, y: i32, z: i32) -> BlockStateId
pub(super) fn chunk_intersects( &self, x0: i32, z0: i32, x1: i32, z1: i32, ) -> bool
pub(super) fn weak_world(&self) -> Weak<World>
pub(super) fn add_fresh_entity(&mut self, entity: SharedEntity) -> bool
fn get_block(&self, x: i32, y: i32, z: i32) -> BlockStateId
fn transform_state(&self, state: BlockStateId) -> BlockStateId
fn is_replaceable_by_structures(state: BlockStateId) -> bool
Auto Trait Implementations§
impl<'a, 'world> !RefUnwindSafe for ScatteredFeaturePlacer<'a, 'world>
impl<'a, 'world> !Sync for ScatteredFeaturePlacer<'a, 'world>
impl<'a, 'world> !UnwindSafe for ScatteredFeaturePlacer<'a, 'world>
impl<'a, 'world> Freeze for ScatteredFeaturePlacer<'a, 'world>
impl<'a, 'world> Send for ScatteredFeaturePlacer<'a, 'world>
impl<'a, 'world> Unpin for ScatteredFeaturePlacer<'a, 'world>
impl<'a, 'world> UnsafeUnpin for ScatteredFeaturePlacer<'a, 'world>
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<>>