pub struct LivingSwingState {
swinging: bool,
swinging_arm: Option<InteractionHand>,
swing_time: i32,
old_attack_anim: f32,
attack_anim: f32,
}Expand description
Vanilla arm-swing animation state stored on LivingEntity.
Fields§
§swinging: bool§swinging_arm: Option<InteractionHand>§swing_time: i32§old_attack_anim: f32§attack_anim: f32Implementations§
Source§impl LivingSwingState
impl LivingSwingState
Sourcepub const fn swinging_arm(self) -> Option<InteractionHand>
pub const fn swinging_arm(self) -> Option<InteractionHand>
Returns vanilla LivingEntity.swingingArm.
Sourcepub const fn swing_time(self) -> i32
pub const fn swing_time(self) -> i32
Returns vanilla LivingEntity.swingTime.
Sourcepub const fn old_attack_anim(self) -> f32
pub const fn old_attack_anim(self) -> f32
Returns vanilla LivingEntity.oAttackAnim.
Sourcepub const fn attack_anim(self) -> f32
pub const fn attack_anim(self) -> f32
Returns vanilla LivingEntity.attackAnim.
Trait Implementations§
Source§impl Clone for LivingSwingState
impl Clone for LivingSwingState
Source§fn clone(&self) -> LivingSwingState
fn clone(&self) -> LivingSwingState
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 LivingSwingState
Source§impl Debug for LivingSwingState
impl Debug for LivingSwingState
Source§impl Default for LivingSwingState
impl Default for LivingSwingState
Source§impl PartialEq for LivingSwingState
impl PartialEq for LivingSwingState
impl StructuralPartialEq for LivingSwingState
Auto Trait Implementations§
impl Freeze for LivingSwingState
impl RefUnwindSafe for LivingSwingState
impl Send for LivingSwingState
impl Sync for LivingSwingState
impl Unpin for LivingSwingState
impl UnsafeUnpin for LivingSwingState
impl UnwindSafe for LivingSwingState
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<>>