pub struct EntityMovementProgress {
pub(super) move_dist: f32,
pub(super) fly_dist: f32,
pub(super) next_step: f32,
pub(super) crystal_sound_intensity: f32,
pub(super) last_crystal_sound_play_tick: i32,
}Expand description
Vanilla movement distance counters used by step, swim, and flap side effects.
Fields§
§move_dist: f32§fly_dist: f32§next_step: f32§crystal_sound_intensity: f32§last_crystal_sound_play_tick: i32Implementations§
Source§impl EntityMovementProgress
impl EntityMovementProgress
Sourcepub fn add_movement(&mut self, clipped_movement: DVec3, climbing: bool)
pub fn add_movement(&mut self, clipped_movement: DVec3, climbing: bool)
Adds movement distance from a completed movement pass.
Sourcepub const fn crossed_next_step(self) -> bool
pub const fn crossed_next_step(self) -> bool
Returns whether movement crossed the next step threshold.
Trait Implementations§
Source§impl Clone for EntityMovementProgress
impl Clone for EntityMovementProgress
Source§fn clone(&self) -> EntityMovementProgress
fn clone(&self) -> EntityMovementProgress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EntityMovementProgress
Source§impl Debug for EntityMovementProgress
impl Debug for EntityMovementProgress
Source§impl Default for EntityMovementProgress
impl Default for EntityMovementProgress
Source§impl PartialEq for EntityMovementProgress
impl PartialEq for EntityMovementProgress
impl StructuralPartialEq for EntityMovementProgress
Auto Trait Implementations§
impl Freeze for EntityMovementProgress
impl RefUnwindSafe for EntityMovementProgress
impl Send for EntityMovementProgress
impl Sync for EntityMovementProgress
impl Unpin for EntityMovementProgress
impl UnsafeUnpin for EntityMovementProgress
impl UnwindSafe for EntityMovementProgress
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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<>>