pub(super) struct MultifaceSpreader {
block: BlockRef,
}Fields§
§block: BlockRefImplementations§
Source§impl MultifaceSpreader
impl MultifaceSpreader
const SPREAD_TYPES: [MultifaceSpreadType; 3]
pub(super) const fn new(block: BlockRef) -> Self
pub(super) fn can_spread_in_any_direction( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, starting_face: Direction, ) -> bool
pub(super) fn spread_from_random_face_toward_random_direction<W: LevelAccessor>( &self, state: BlockStateId, world: &W, pos: BlockPos, rng: &mut dyn Rng, ) -> Option<MultifaceSpreadPos>
pub(super) fn spread_from_face_toward_direction<W: LevelAccessor>( &self, state: BlockStateId, world: &W, pos: BlockPos, starting_face: Direction, spread_direction: Direction, ) -> Option<MultifaceSpreadPos>
fn get_spread_from_face_toward_direction( &self, state: BlockStateId, world: &dyn LevelReader, pos: BlockPos, starting_face: Direction, spread_direction: Direction, ) -> Option<MultifaceSpreadPos>
fn can_spread_into( &self, world: &dyn LevelReader, spread_pos: MultifaceSpreadPos, ) -> bool
fn shuffle_directions(directions: &mut [Direction; 6], rng: &mut dyn Rng)
Auto Trait Implementations§
impl !RefUnwindSafe for MultifaceSpreader
impl !UnwindSafe for MultifaceSpreader
impl Freeze for MultifaceSpreader
impl Send for MultifaceSpreader
impl Sync for MultifaceSpreader
impl Unpin for MultifaceSpreader
impl UnsafeUnpin for MultifaceSpreader
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<>>