Walks down column x from y = 0 and returns the y of the first
solid cell. Returns bitmap.height (one past the bottom row) if the
column is entirely air or x is out of bounds — this lets callers
compute spawn positions like surfaceY(x) - entityHeight without
special-casing the "no surface" return.
Cost: O(height) on the worst case. For repeated queries on the same
column, callers should cache the result.
Walks down column
xfromy = 0and returns the y of the first solid cell. Returnsbitmap.height(one past the bottom row) if the column is entirely air orxis out of bounds — this lets callers compute spawn positions likesurfaceY(x) - entityHeightwithout special-casing the "no surface" return.Cost: O(height) on the worst case. For repeated queries on the same column, callers should cache the result.