pub struct AgeableMobBase {
state: SyncMutex<AgeableMobState>,
}Expand description
Runtime fields shared by vanilla ageable mobs.
Fields§
§state: SyncMutex<AgeableMobState>Implementations§
Source§impl AgeableMobBase
impl AgeableMobBase
Sourcepub fn set_age(&self, age: i32) -> bool
pub fn set_age(&self, age: i32) -> bool
Sets vanilla AgeableMob.age, returning whether the baby/adult boundary changed.
Sourcepub fn forced_age(&self) -> i32
pub fn forced_age(&self) -> i32
Extra age credited by forced growth, reapplied once natural age reaches zero.
Sourcepub fn set_forced_age(&self, forced_age: i32)
pub fn set_forced_age(&self, forced_age: i32)
Sets the extra age credited by forced growth.
Sourcepub fn forced_age_timer(&self) -> i32
pub fn forced_age_timer(&self) -> i32
Ticks remaining in the forced-growth particle effect.
Sourcepub fn set_forced_age_timer(&self, forced_age_timer: i32)
pub fn set_forced_age_timer(&self, forced_age_timer: i32)
Sets the ticks remaining in the forced-growth particle effect.
Sourcepub fn age_lock_particle_timer(&self) -> i32
pub fn age_lock_particle_timer(&self) -> i32
Ticks remaining before this mob’s age-lock state can be toggled again.
Sourcepub fn set_age_lock_particle_timer(&self, timer: i32)
pub fn set_age_lock_particle_timer(&self, timer: i32)
Sets the cooldown before this mob’s age-lock state can be toggled again.
Sourcepub fn add_forced_age(&self, delta: i32)
pub fn add_forced_age(&self, delta: i32)
Adds delta to the extra age credited by forced growth.
Sourcepub fn get_speed_up_seconds_when_feeding(ticks_until_adult: i32) -> i32
pub fn get_speed_up_seconds_when_feeding(ticks_until_adult: i32) -> i32
Seconds to reduce the remaining growth time by when fed, roughly a tenth of the time left in seconds.
Trait Implementations§
Source§impl Debug for AgeableMobBase
impl Debug for AgeableMobBase
Auto Trait Implementations§
impl !Freeze for AgeableMobBase
impl !RefUnwindSafe for AgeableMobBase
impl Send for AgeableMobBase
impl Sync for AgeableMobBase
impl Unpin for AgeableMobBase
impl UnsafeUnpin for AgeableMobBase
impl UnwindSafe for AgeableMobBase
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<>>