#[non_exhaustive]pub struct Knockback {
pub motion: Vec3,
pub explosion: bool,
}Expand description
A push of the server on the player (crate::TickEvents::knockback): our own entity’s
velocity packet (an attack’s knockback, a launch, any velocity the server sets) or an
explosion’s push.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.motion: Vec3The motion per tick: the velocity the client takes over (a velocity packet) or the one it adds to its own (an explosion).
explosion: boolAn explosion’s push (added), not a velocity packet (set).
Trait Implementations§
impl Copy for Knockback
impl StructuralPartialEq for Knockback
Auto Trait Implementations§
impl Forget for Knockback
impl Freeze for Knockback
impl Move for Knockback
impl RefUnwindSafe for Knockback
impl Send for Knockback
impl Sync for Knockback
impl Unpin for Knockback
impl UnsafeUnpin for Knockback
impl UnwindSafe for Knockback
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