Skip to main content

survival_update_shape

Function survival_update_shape 

Source
pub fn survival_update_shape<B: BlockBehavior>(
    block: &B,
    state: BlockStateId,
    world: &dyn ScheduledTickAccess,
    pos: BlockPos,
) -> BlockStateId
Expand description

Shared update-shape logic for blocks that break when they can no longer survive.

Important: this calls the final BlockBehavior::can_survive, not vegetation_can_survive, so leaf blocks can override survival.