pub struct EntityDamageEvent {
pub entity_type: String,
pub uuid: String,
pub amount: f32,
pub source: String,
}Expand description
Fired after a living entity takes damage (server side).
Fields§
§entity_type: StringRegistry id of the entity, e.g. minecraft:zombie.
uuid: String§amount: f32Amount of damage dealt (hit points).
source: StringIdentifier of the damage source, e.g. minecraft:player, fall.
Trait Implementations§
Source§impl Clone for EntityDamageEvent
impl Clone for EntityDamageEvent
Source§fn clone(&self) -> EntityDamageEvent
fn clone(&self) -> EntityDamageEvent
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 EntityDamageEvent
impl RefUnwindSafe for EntityDamageEvent
impl Send for EntityDamageEvent
impl Sync for EntityDamageEvent
impl Unpin for EntityDamageEvent
impl UnsafeUnpin for EntityDamageEvent
impl UnwindSafe for EntityDamageEvent
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