pub struct ServerEntityMovementSyncState {
position: EntityPositionSyncState,
rotation: EntityRotationSyncState,
velocity: EntityVelocitySyncState,
update_interval: i32,
track_delta: bool,
tick_count: i32,
teleport_delay: i32,
was_riding: bool,
was_on_ground: bool,
}Expand description
Per-tracked-entity movement state owned by the entity tracker.
Fields§
§position: EntityPositionSyncState§rotation: EntityRotationSyncState§velocity: EntityVelocitySyncState§update_interval: i32§track_delta: bool§tick_count: i32§teleport_delay: i32§was_riding: bool§was_on_ground: boolImplementations§
Source§impl ServerEntityMovementSyncState
impl ServerEntityMovementSyncState
Sourcepub const fn new(
position: DVec3,
velocity: DVec3,
on_ground: bool,
body_rotation: (f32, f32),
head_yaw: f32,
update_interval: i32,
track_delta: bool,
) -> Self
pub const fn new( position: DVec3, velocity: DVec3, on_ground: bool, body_rotation: (f32, f32), head_yaw: f32, update_interval: i32, track_delta: bool, ) -> Self
Creates movement sync state for a newly tracked entity.
Sourcepub fn record_send_changes(
&mut self,
update: ServerEntityMovementSyncUpdate,
) -> ServerEntityMovementSyncResult
pub fn record_send_changes( &mut self, update: ServerEntityMovementSyncUpdate, ) -> ServerEntityMovementSyncResult
Selects packets for a vanilla ServerEntity.sendChanges movement pass.
const fn should_process( self, needs_velocity_sync: bool, has_dirty_entity_data: bool, ) -> bool
fn record_passenger_update( &mut self, update: ServerEntityMovementSyncUpdate, should_send_rotation: bool, result: &mut ServerEntityMovementSyncResult, )
fn record_non_passenger_update( &mut self, update: ServerEntityMovementSyncUpdate, should_send_rotation: bool, result: &mut ServerEntityMovementSyncResult, )
Trait Implementations§
Source§impl Clone for ServerEntityMovementSyncState
impl Clone for ServerEntityMovementSyncState
Source§fn clone(&self) -> ServerEntityMovementSyncState
fn clone(&self) -> ServerEntityMovementSyncState
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 ServerEntityMovementSyncState
impl StructuralPartialEq for ServerEntityMovementSyncState
Auto Trait Implementations§
impl Freeze for ServerEntityMovementSyncState
impl RefUnwindSafe for ServerEntityMovementSyncState
impl Send for ServerEntityMovementSyncState
impl Sync for ServerEntityMovementSyncState
impl Unpin for ServerEntityMovementSyncState
impl UnsafeUnpin for ServerEntityMovementSyncState
impl UnwindSafe for ServerEntityMovementSyncState
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<>>