pub trait ScheduledTickAccess: LevelReader {
// Required methods
fn fluid_tick_delay(&self, fluid: FluidRef) -> i32;
fn schedule_block_tick_default(
&self,
pos: BlockPos,
block: BlockRef,
delay: i32,
) -> bool;
fn schedule_fluid_tick_default(
&self,
pos: BlockPos,
fluid: FluidRef,
delay: i32,
) -> bool;
// Provided methods
fn has_scheduled_block_tick(&self, pos: BlockPos, block: BlockRef) -> bool { ... }
fn will_tick_block_this_tick(&self, pos: BlockPos, block: BlockRef) -> bool { ... }
fn will_tick_fluid_this_tick(&self, pos: BlockPos, fluid: FluidRef) -> bool { ... }
}Expand description
Level access needed by vanilla block updateShape logic.
Vanilla passes both LevelReader and ScheduledTickAccess to block shape updates.
Steel combines those surfaces so the same block behavior can run against a live
World and a WorldGenRegion.
Required Methods§
Sourcefn fluid_tick_delay(&self, fluid: FluidRef) -> i32
fn fluid_tick_delay(&self, fluid: FluidRef) -> i32
Returns the fluid tick delay in this level.
Provided Methods§
Sourcefn has_scheduled_block_tick(&self, pos: BlockPos, block: BlockRef) -> bool
fn has_scheduled_block_tick(&self, pos: BlockPos, block: BlockRef) -> bool
Returns whether a tick is already scheduled for the same (pos, block).
Sourcefn will_tick_block_this_tick(&self, pos: BlockPos, block: BlockRef) -> bool
fn will_tick_block_this_tick(&self, pos: BlockPos, block: BlockRef) -> bool
Returns whether the same (pos, block) was selected for this tick and has not started.
Sourcefn will_tick_fluid_this_tick(&self, pos: BlockPos, fluid: FluidRef) -> bool
fn will_tick_fluid_this_tick(&self, pos: BlockPos, fluid: FluidRef) -> bool
Returns whether the same (pos, fluid) was selected for this tick and has not started.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".