pub struct EntityFallDamage {
pub fall_distance: f64,
pub damage_modifier: f32,
pub source: DamageSource,
}Expand description
Fall damage requested by a block landing hook.
Fields§
§fall_distance: f64Fall distance to pass to Entity.causeFallDamage.
damage_modifier: f32Block-specific damage multiplier.
source: DamageSourceDamage source for this landing.
Implementations§
Source§impl EntityFallDamage
impl EntityFallDamage
Sourcepub const fn new(
fall_distance: f64,
damage_modifier: f32,
source: DamageSource,
) -> Self
pub const fn new( fall_distance: f64, damage_modifier: f32, source: DamageSource, ) -> Self
Creates a fall-damage action.
Trait Implementations§
Source§impl Clone for EntityFallDamage
impl Clone for EntityFallDamage
Source§fn clone(&self) -> EntityFallDamage
fn clone(&self) -> EntityFallDamage
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 moreAuto Trait Implementations§
impl Freeze for EntityFallDamage
impl RefUnwindSafe for EntityFallDamage
impl Send for EntityFallDamage
impl Sync for EntityFallDamage
impl Unpin for EntityFallDamage
impl UnsafeUnpin for EntityFallDamage
impl UnwindSafe for EntityFallDamage
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<>>