pub struct AnimalBase {
state: SyncMutex<AnimalState>,
}Expand description
Runtime fields shared by vanilla animals.
Fields§
§state: SyncMutex<AnimalState>Implementations§
Source§impl AnimalBase
impl AnimalBase
pub fn initialize_pathfinding_malus(mob_base: &MobBase)
Sourcepub fn in_love_time(&self) -> i32
pub fn in_love_time(&self) -> i32
Ticks remaining in this animal’s in-love state.
Sourcepub fn set_in_love_time(&self, in_love: i32)
pub fn set_in_love_time(&self, in_love: i32)
Sets the ticks remaining in this animal’s in-love state.
Sourcepub fn tick_in_love_time(&self)
pub fn tick_in_love_time(&self)
Decrements vanilla Animal.inLove when it is active.
Sourcepub fn love_cause_uuid(&self) -> Option<Uuid>
pub fn love_cause_uuid(&self) -> Option<Uuid>
Returns the UUID of the player who caused this animal to fall in love, if any.
Sourcepub fn set_love_cause_uuid(&self, love_cause: Option<Uuid>)
pub fn set_love_cause_uuid(&self, love_cause: Option<Uuid>)
Sets the UUID of the player who caused this animal to fall in love.
Trait Implementations§
Source§impl Debug for AnimalBase
impl Debug for AnimalBase
Auto Trait Implementations§
impl !Freeze for AnimalBase
impl !RefUnwindSafe for AnimalBase
impl Send for AnimalBase
impl Sync for AnimalBase
impl Unpin for AnimalBase
impl UnsafeUnpin for AnimalBase
impl UnwindSafe for AnimalBase
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<>>