azalea::pathfinder

Function check_path_obstructed

Source
pub fn check_path_obstructed<SuccessorsFn>(
    current_position: BlockPos,
    path: &VecDeque<Movement<BlockPos, MoveData>>,
    successors_fn: SuccessorsFn,
) -> Option<usize>
where SuccessorsFn: Fn(BlockPos) -> Vec<Edge<BlockPos, MoveData>>,
Expand description

Checks whether the path has been obstructed, and returns Some(index) if it has been. The index is of the first obstructed node.