pub(super) struct TargetGoalBase {
must_see: bool,
must_reach: bool,
reach_cache: ReachCache,
reach_cache_time: i32,
unseen_ticks: i32,
target_mob: Option<SharedEntity>,
unseen_memory_ticks: i32,
}Fields§
§must_see: bool§must_reach: bool§reach_cache: ReachCache§reach_cache_time: i32§unseen_ticks: i32§target_mob: Option<SharedEntity>§unseen_memory_ticks: i32Implementations§
Source§impl TargetGoalBase
impl TargetGoalBase
pub(super) const fn new(must_see: bool, must_reach: bool) -> Self
pub(super) const fn set_unseen_memory_ticks(&mut self, unseen_memory_ticks: i32)
pub(super) fn set_target_mob(&mut self, target_mob: Option<SharedEntity>)
pub(super) fn can_continue_to_use(&mut self, mob: &dyn PathfinderMob) -> bool
pub(super) const fn start(&mut self)
pub(super) fn stop(&mut self, mob: &dyn PathfinderMob)
pub(super) fn can_attack( &mut self, mob: &dyn PathfinderMob, target: Option<&dyn LivingEntity>, target_conditions: &TargetingConditions, ) -> bool
fn update_unseen_ticks( &mut self, mob: &dyn PathfinderMob, target: &dyn LivingEntity, ) -> bool
fn can_reach( &mut self, mob: &dyn PathfinderMob, target: &dyn LivingEntity, ) -> bool
fn check_reach( &mut self, mob: &dyn PathfinderMob, target: &dyn LivingEntity, ) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for TargetGoalBase
impl !UnwindSafe for TargetGoalBase
impl Freeze for TargetGoalBase
impl Send for TargetGoalBase
impl Sync for TargetGoalBase
impl Unpin for TargetGoalBase
impl UnsafeUnpin for TargetGoalBase
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<>>