Expand description
Scheduled tick storage and selection for deterministic block and fluid updates.
Scheduled ticks are stored in per-chunk priority queues against absolute world
game time. Within a chunk, the queue follows vanilla’s
ScheduledTick.DRAIN_ORDER: trigger time, priority, then sub-tick order. Across
chunks, only each ready queue head participates in selection, following
vanilla’s LevelTicks container-draining behavior.
Saved and proto-chunk ticks remain pending until the chunk first reaches
confirmed block-ticking readiness. That transition anchors their saved delays
to the current game time, matching LevelChunkTicks.unpack. Later readiness
demotions do not pause or re-anchor those deadlines.
§Exact cross-chunk ties
Each loaded chunk reconstructs saved ticks with its own negative sub-tick
order range, so two ready chunk heads can have the same priority and
sub-tick order. A WorldGenRegion also owns an independent counter, as in
Vanilla, and can retain that order when it schedules directly into an
already-Full dependency chunk. Vanilla’s final order for these exact ties
follows iteration of fastutil’s Long2LongOpenHashMap and then Java’s
PriorityQueue heap behavior. Minecraft supplies no custom hash strategy
for that map. As an intentional performance tradeoff, Steel keeps the
optimized scc chunk traversal as the final tie order instead of reproducing
implementation-specific Java collection state. Ordinary live-world ticks
still use a world-global sub-tick counter.
§Exact intra-chunk ties
Vanilla’s LevelChunkTicks comparator leaves ticks with identical trigger
time, priority, and sub-tick order equal, so their final order depends on
Java collection and priority-queue history. Steel intentionally drains those
otherwise indistinguishable ticks in insertion order instead of reproducing
that implementation-specific state.
Modules§
- list 🔒
- World index for registered Full-chunk scheduled block and fluid containers.
- run_
batch 🔒 - scheduler 🔒
- world 🔒
Structs§
- Chunk
Tick 🔒Container - Stable scheduled-tick storage owned by one chunk from creation through unload.
- Chunk
Tick 🔒Container State - Chunk
Tick 🔒Lists - Block and fluid scheduled-tick queues belonging to one chunk.
- Chunk
Tick 🔒Packing Snapshot - Saved
Tick 🔒 - A scheduled tick in the chunk persistence representation.
- Scheduled
Tick - A single scheduled tick targeting a block or fluid at a specific position.
- Scheduled
Tick 🔒Batch - Ready ticks and the active containers whose persisted delays changed.
- Scheduled
Tick 🔒Snapshot - Owned persistence snapshot of both scheduled-tick queues for a Full chunk.
Enums§
- Chunk
Tick 🔒Container Lifecycle - Tick
Priority - Priority levels for scheduled ticks. Lower discriminant = higher priority.
- Tick
Scheduler 🔒Error - A violated Full-chunk scheduled-tick ownership invariant.
Traits§
- TickKey
- Trait for types that can be used as the tick target in
ScheduledTick.
Type Aliases§
- Block
Tick - A scheduled tick targeting a block.
- Block
Tick List - Per-chunk storage for scheduled block ticks.
- Fluid
Tick - A scheduled tick targeting a fluid.
- Fluid
Tick List - Per-chunk storage for scheduled fluid ticks.
- Scheduled
Tick Key - Deduplication key used by scheduled tick containers and execution snapshots.