getHighestSafeLocationFromBottom

fun Location.getHighestSafeLocationFromBottom(startFrom: Int = 50): Location

Finds the highest safe location starting from a specified point and moving upward. A location is considered safe if the block at the level and the block above it are both air.

Return

The highest safe Location instance found above or at the starting position.

Parameters

startFrom

The y-coordinate from which to begin the search. Defaults to 50.