pub(super) struct WorldTickSchedulerState {
pub(super) chunks: FxHashMap<ChunkPos, RegisteredChunkTicks>,
pub(super) active_block_deadlines: BTreeSet<(i64, PackedChunkPos)>,
active_fluid_deadlines: BTreeSet<(i64, PackedChunkPos)>,
pub(super) active_generation: u64,
}Fields§
§chunks: FxHashMap<ChunkPos, RegisteredChunkTicks>§active_block_deadlines: BTreeSet<(i64, PackedChunkPos)>§active_fluid_deadlines: BTreeSet<(i64, PackedChunkPos)>§active_generation: u64Implementations§
Source§impl WorldTickSchedulerState
impl WorldTickSchedulerState
fn advance_active_generation(&mut self) -> u64
const fn deadlines(&self, kind: TickKind) -> &BTreeSet<(i64, PackedChunkPos)>
const fn deadlines_mut( &mut self, kind: TickKind, ) -> &mut BTreeSet<(i64, PackedChunkPos)>
pub(super) fn set_head( &mut self, pos: ChunkPos, kind: TickKind, trigger_tick: Option<i64>, ) -> Result<(), TickSchedulerError>
fn take_due( &mut self, kind: TickKind, current_tick: i64, ) -> Vec<ActiveTickContainer>
Trait Implementations§
Source§impl Debug for WorldTickSchedulerState
impl Debug for WorldTickSchedulerState
Source§impl Default for WorldTickSchedulerState
impl Default for WorldTickSchedulerState
Source§fn default() -> WorldTickSchedulerState
fn default() -> WorldTickSchedulerState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for WorldTickSchedulerState
impl !UnwindSafe for WorldTickSchedulerState
impl Freeze for WorldTickSchedulerState
impl Send for WorldTickSchedulerState
impl Sync for WorldTickSchedulerState
impl Unpin for WorldTickSchedulerState
impl UnsafeUnpin for WorldTickSchedulerState
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<>>