pub struct DamageSourcePredicate {
pub tags: &'static [DamageTagPredicate],
pub source_entity: Option<EntityPredicate>,
pub direct_entity: Option<EntityPredicate>,
pub is_direct: Option<bool>,
}Expand description
Predicate for checking damage source properties.
Fields§
Tags that must be present on the damage source.
source_entity: Option<EntityPredicate>Source entity predicate (e.g., the player/mob that caused damage).
direct_entity: Option<EntityPredicate>Direct entity predicate (e.g., the arrow/fireball).
is_direct: Option<bool>Whether damage bypasses armor.
Trait Implementations§
Source§impl Clone for DamageSourcePredicate
impl Clone for DamageSourcePredicate
Source§fn clone(&self) -> DamageSourcePredicate
fn clone(&self) -> DamageSourcePredicate
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 DamageSourcePredicate
impl RefUnwindSafe for DamageSourcePredicate
impl Send for DamageSourcePredicate
impl Sync for DamageSourcePredicate
impl Unpin for DamageSourcePredicate
impl UnsafeUnpin for DamageSourcePredicate
impl UnwindSafe for DamageSourcePredicate
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