pub struct EntityChunkCallback {
entity_id: i32,
world: Weak<World>,
}Expand description
Callback attached to each entity for tracking chunk/section movement.
Mirrors vanilla’s PersistentEntitySectionManager.Callback.
Fields§
§entity_id: i32§world: Weak<World>Implementations§
Trait Implementations§
Source§impl EntityLevelCallback for EntityChunkCallback
impl EntityLevelCallback for EntityChunkCallback
Source§fn validate_move(
&self,
old_pos: DVec3,
new_pos: DVec3,
) -> Result<(), EntityMoveError>
fn validate_move( &self, old_pos: DVec3, new_pos: DVec3, ) -> Result<(), EntityMoveError>
Called before an entity position change is committed.
Source§fn on_move_committed(
&self,
old_pos: DVec3,
new_pos: DVec3,
) -> Result<(), EntityMoveError>
fn on_move_committed( &self, old_pos: DVec3, new_pos: DVec3, ) -> Result<(), EntityMoveError>
Called after an entity position change has been committed.
Source§fn on_bounding_box_changed(&self, _bounding_box: WorldAabb)
fn on_bounding_box_changed(&self, _bounding_box: WorldAabb)
Called after an entity’s collision bounds change without a position change.
Source§fn on_remove(&self, reason: RemovalReason)
fn on_remove(&self, reason: RemovalReason)
Called when entity is removed from the world.
Source§fn allows_local_position_update(&self) -> bool
fn allows_local_position_update(&self) -> bool
Returns whether direct local position writes may bypass lifecycle callbacks.
Auto Trait Implementations§
impl !RefUnwindSafe for EntityChunkCallback
impl !UnwindSafe for EntityChunkCallback
impl Freeze for EntityChunkCallback
impl Send for EntityChunkCallback
impl Sync for EntityChunkCallback
impl Unpin for EntityChunkCallback
impl UnsafeUnpin for EntityChunkCallback
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
§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<>>