src/AnvilPacker/Level/Chunk.cs
/// <summary> Computes the min and max non-empty section Y coords. </summary>
/// <remarks> If this chunk is fully empty, the result is (MinSectionY, MinSectionY-1). (max &lt; min) </remarks>
Computes the min and max non-empty section Y coords.
Computes the min and max non - empty section Y coords .
public (int Min, int Max) GetActualYExtents()
        {
            int min = MinSectionY;
            int max = MaxSectionY;
            while (max >= min && GetSection(max) == null) max--;
            while (min <= max && GetSection(min) == null) min++;
            return (min, max);
        }
public ( int Min , int Max ) GetActualYExtents ( ) { int min = MinSectionY ; int max = MaxSectionY ; while ( max >= min && GetSection ( max ) == null ) max -- ; while ( min <= max && GetSection ( min ) == null ) min ++ ; return ( min , max ) ; }
Computes the min and max non-empty section Y coords.
Computes the min and max non - empty section Y coords .
//Find max first, so if this chunk is empty, the result will be (minSy, minSy-1).
remarks
If this chunk is fully empty, the result is (MinSectionY, MinSectionY-1). (max < min)
If this chunk is fully empty the result is ( MinSectionY MinSectionY - 1 ) . ( max < min )