Topographer.Renderer.GetHeight C# (CSharp) Méthode

GetHeight() private static méthode

private static GetHeight ( TAG_Compound sections, int x, int z, int yStart = 255, int yEnd, HashSet only = null, HashSet exclude = null ) : int
sections Minecraft.TAG_Compound
x int
z int
yStart int
yEnd int
only HashSet
exclude HashSet
Résultat int
        private static int GetHeight(TAG_Compound[] sections, int x, int z, int yStart = 255, int yEnd = 0, HashSet<byte> only = null, HashSet<byte> exclude = null)
        {
            int h = yStart;
            for (; h >= yEnd; h--)
            {
                byte b = GetBlock(sections, x, h, z);
                if (b != 0)
                {
                    if(only != null && only.Contains(b))
                        return h;
                    else if(exclude != null && !exclude.Contains(b))
                        return h;
                    else if(only == null && exclude == null)
                        return h;
                }
            }
            return yEnd - 1;
        }