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
Returns vanilla AgeableMob.forcedAge.
Sourcepub fn set_forced_age(&self, forced_age: i32)
pub fn set_forced_age(&self, forced_age: i32)
Sets vanilla AgeableMob.forcedAge.
Sourcepub fn forced_age_timer(&self) -> i32
pub fn forced_age_timer(&self) -> i32
Returns vanilla AgeableMob.forcedAgeTimer.
Sourcepub fn set_forced_age_timer(&self, forced_age_timer: i32)
pub fn set_forced_age_timer(&self, forced_age_timer: i32)
Sets vanilla AgeableMob.forcedAgeTimer.
Sourcepub fn age_lock_particle_timer(&self) -> i32
pub fn age_lock_particle_timer(&self) -> i32
Returns vanilla AgeableMob.ageLockParticleTimer.
Sourcepub fn set_age_lock_particle_timer(&self, timer: i32)
pub fn set_age_lock_particle_timer(&self, timer: i32)
Sets vanilla AgeableMob.ageLockParticleTimer.
Sourcepub fn add_forced_age(&self, delta: i32)
pub fn add_forced_age(&self, delta: i32)
Adds to vanilla AgeableMob.forcedAge.
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
Returns vanilla AgeableMob.getSpeedUpSecondsWhenFeeding.
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<>>