Skip to main content

ScheduledTickAccess

Trait ScheduledTickAccess 

Source
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§

Source

fn fluid_tick_delay(&self, fluid: FluidRef) -> i32

Returns the fluid tick delay in this level.

Source

fn schedule_block_tick_default( &self, pos: BlockPos, block: BlockRef, delay: i32, ) -> bool

Schedules a block tick using vanilla’s default priority.

Source

fn schedule_fluid_tick_default( &self, pos: BlockPos, fluid: FluidRef, delay: i32, ) -> bool

Schedules a fluid tick using vanilla’s default priority.

Provided Methods§

Source

fn has_scheduled_block_tick(&self, pos: BlockPos, block: BlockRef) -> bool

Returns whether a tick is already scheduled for the same (pos, block).

Source

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.

Source

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".

Implementations on Foreign Types§

Source§

impl ScheduledTickAccess for Arc<World>

Implementors§