pub(super) struct PlayerTickState {
tick_count: i32,
attack_strength_ticker: i32,
take_xp_delay: i32,
last_level_up_time: i32,
ack_block_changes_up_to: i32,
}Expand description
Per-player tick counters and once-per-tick packet state.
Fields§
§tick_count: i32§attack_strength_ticker: i32§take_xp_delay: i32§last_level_up_time: i32§ack_block_changes_up_to: i32Implementations§
Source§impl PlayerTickState
impl PlayerTickState
pub(super) const fn new() -> Self
pub(super) const fn tick_count(self) -> i32
pub(super) const fn attack_strength_ticker(self) -> i32
pub(super) const fn take_xp_delay(self) -> i32
pub(super) const fn set_take_xp_delay(&mut self, delay: i32)
pub(super) fn mark_level_up_sound_if_due(&mut self) -> bool
pub(super) const fn advance_tick(&mut self)
pub(super) const fn advance_attack_strength_ticker(&mut self)
pub(super) const fn reset_attack_strength_ticker(&mut self)
pub(super) const fn ack_block_changes_up_to(&mut self, sequence: i32)
pub(super) const fn take_ack_block_changes_up_to(&mut self) -> i32
Trait Implementations§
Source§impl Clone for PlayerTickState
impl Clone for PlayerTickState
Source§fn clone(&self) -> PlayerTickState
fn clone(&self) -> PlayerTickState
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 PlayerTickState
Auto Trait Implementations§
impl Freeze for PlayerTickState
impl RefUnwindSafe for PlayerTickState
impl Send for PlayerTickState
impl Sync for PlayerTickState
impl Unpin for PlayerTickState
impl UnsafeUnpin for PlayerTickState
impl UnwindSafe for PlayerTickState
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<>>