/**
         * Return a list of biomes for the specified blocks. Args: listToReuse, x, y, width, length, cacheFlag (if false,
         * don't check biomeCache to avoid infinite loop in BiomeCacheBlock)
         */
        public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5, bool par6)
        {
            IntCache.resetIntCache();

            if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.Length < par4 * par5)
            {
                par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
            }

            if (par6 && par4 == 16 && par5 == 16 && (par2 & 15) == 0 && (par3 & 15) == 0)
            {
                BiomeGenBase[] var9 = this.biomeCache.getCachedBiomes(par2, par3);
                Array.Copy(var9, 0, par1ArrayOfBiomeGenBase, 0, par4 * par5);
                return(par1ArrayOfBiomeGenBase);
            }
            else
            {
                int[] var7 = this.biomeIndexLayer.getInts(par2, par3, par4, par5);

                for (int var8 = 0; var8 < par4 * par5; ++var8)
                {
                    par1ArrayOfBiomeGenBase[var8] = BiomeGenBase.biomeList[var7[var8]];
                }

                return(par1ArrayOfBiomeGenBase);
            }
        }
        /**
         * Return a list of biomes for the specified blocks. Args: listToReuse, x, y, width, length, cacheFlag (if false,
         * don't check biomeCache to avoid infinite loop in BiomeCacheBlock)
         */
        public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5, bool par6)
        {
            IntCache.resetIntCache();

            if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.Length < par4 * par5)
            {
                par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
            }

            if (par6 && par4 == 16 && par5 == 16 && (par2 & 15) == 0 && (par3 & 15) == 0)
            {
                BiomeGenBase[] var9 = this.biomeCache.getCachedBiomes(par2, par3);
                Array.Copy(var9, 0, par1ArrayOfBiomeGenBase, 0, par4 * par5);
                return par1ArrayOfBiomeGenBase;
            }
            else
            {
                int[] var7 = this.biomeIndexLayer.getInts(par2, par3, par4, par5);

                for (int var8 = 0; var8 < par4 * par5; ++var8)
                {
                    par1ArrayOfBiomeGenBase[var8] = BiomeGenBase.biomeList[var7[var8]];
                }

                return par1ArrayOfBiomeGenBase;
            }
        }