pub struct SpreadingGrassBlock {}Expand description
A structure implementing the spreading of grass blocks and its variants
Implementations§
Source§impl SpreadingGrassBlock
impl SpreadingGrassBlock
fn can_stay_alive( state: BlockStateId, level: &Arc<World>, pos: BlockPos, ) -> bool
fn can_propagate(state: BlockStateId, level: &Arc<World>, pos: BlockPos) -> bool
Sourcepub fn random_tick(
own: BlockRef,
base: BlockRef,
state: BlockStateId,
world: &Arc<World>,
pos: BlockPos,
)
pub fn random_tick( own: BlockRef, base: BlockRef, state: BlockStateId, world: &Arc<World>, pos: BlockPos, )
Implements random tick for grass block and its variants (like mycelium) It allows blocks to spread to base blocks, and will make them disappear if there is any block ontop of them
Auto Trait Implementations§
impl Freeze for SpreadingGrassBlock
impl RefUnwindSafe for SpreadingGrassBlock
impl Send for SpreadingGrassBlock
impl Sync for SpreadingGrassBlock
impl Unpin for SpreadingGrassBlock
impl UnsafeUnpin for SpreadingGrassBlock
impl UnwindSafe for SpreadingGrassBlock
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<>>