pub struct EntityMovement {
from: DVec3,
to: DVec3,
axis_dependent_original_movement: Option<DVec3>,
}Expand description
A vanilla movement segment used by block-contact effects.
Fields§
§from: DVec3§to: DVec3§axis_dependent_original_movement: Option<DVec3>Implementations§
Source§impl EntityMovement
impl EntityMovement
Sourcepub const fn new(from: DVec3, to: DVec3) -> Self
pub const fn new(from: DVec3, to: DVec3) -> Self
Creates a movement segment without axis-dependent original movement.
Sourcepub const fn with_axis_dependent_original_movement(
from: DVec3,
to: DVec3,
axis_dependent_original_movement: DVec3,
) -> Self
pub const fn with_axis_dependent_original_movement( from: DVec3, to: DVec3, axis_dependent_original_movement: DVec3, ) -> Self
Creates a movement segment with the original requested movement.
Sourcepub const fn axis_dependent_original_movement(self) -> Option<DVec3>
pub const fn axis_dependent_original_movement(self) -> Option<DVec3>
Returns the requested movement used for vanilla axis-ordered scans.
Trait Implementations§
Source§impl Clone for EntityMovement
impl Clone for EntityMovement
Source§fn clone(&self) -> EntityMovement
fn clone(&self) -> EntityMovement
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 moreimpl Copy for EntityMovement
Source§impl Debug for EntityMovement
impl Debug for EntityMovement
Source§impl PartialEq for EntityMovement
impl PartialEq for EntityMovement
impl StructuralPartialEq for EntityMovement
Auto Trait Implementations§
impl Freeze for EntityMovement
impl RefUnwindSafe for EntityMovement
impl Send for EntityMovement
impl Sync for EntityMovement
impl Unpin for EntityMovement
impl UnsafeUnpin for EntityMovement
impl UnwindSafe for EntityMovement
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<>>