Struct LivingKnockbackEvent
pub struct LivingKnockbackEvent<'a> {
pub entity: i32,
pub kind: &'a str,
pub source: &'a HurtSource<'a>,
pub attacker: i32,
pub attacker_main: Option<&'a ItemStack>,
pub attacker_off: Option<&'a ItemStack>,
pub strength: f64,
pub x: f64,
pub z: f64,
pub cancelled: bool,
}Expand description
What Hooks::living_knockback is told. Each field is that hook’s argument of the same name, described in the hook’s doc.
Fields§
§entity: i32§kind: &'a str§source: &'a HurtSource<'a>§attacker: i32§attacker_main: Option<&'a ItemStack>§attacker_off: Option<&'a ItemStack>§strength: f64§x: f64§z: f64§cancelled: boolWhether the event is cancelled: by the game or an earlier listener, or by this one
setting it. Only a listener that receives cancelled events (#[listener(receive_cancelled)])
sees true, and setting it back to false lets the game’s behaviour run.
Auto Trait Implementations§
impl<'a> Freeze for LivingKnockbackEvent<'a>
impl<'a> RefUnwindSafe for LivingKnockbackEvent<'a>
impl<'a> Send for LivingKnockbackEvent<'a>
impl<'a> Sync for LivingKnockbackEvent<'a>
impl<'a> Unpin for LivingKnockbackEvent<'a>
impl<'a> UnsafeUnpin for LivingKnockbackEvent<'a>
impl<'a> UnwindSafe for LivingKnockbackEvent<'a>
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