Skip to main content

check_is_interaction_restricted

Function check_is_interaction_restricted 

Source
pub fn check_is_interaction_restricted(
    world: &World,
    block_pos: BlockPos,
    game_mode: &GameMode,
    inventory: &Inventory,
) -> bool
Expand description

Whether we can’t interact with the block, based on your gamemode.

If this is false, then we can interact with the block.

The world, block position, and inventory are used for the adventure mode check.