public int getSkyBlockTypeBrightness(EnumSkyBlock par1EnumSkyBlock, int par2, int par3, int par4)
    {
        if (this.worldProvider.hasNoSky && par1EnumSkyBlock == EnumSkyBlock.Sky)
        {
            return 0;
        }
        else
        {
            if (par3 < 0)
            {
                par3 = 0;
            }

            if (par3 >= 256)
            {
                return par1EnumSkyBlock.defaultLightValue;
            }
            else if (par2 >= -30000000 && par4 >= -30000000 && par2 < 30000000 && par4 < 30000000)
            {
                int var5 = par2 >> 4;
                int var6 = par4 >> 4;

                if (!this.chunkExists(var5, var6))
                {
                    return par1EnumSkyBlock.defaultLightValue;
                }
                else if (Block.useNeighborBrightness[this.getBlockId(par2, par3, par4)])
                {
                    int var12 = this.getSavedLightValue(par1EnumSkyBlock, par2, par3 + 1, par4);
                    int var8 = this.getSavedLightValue(par1EnumSkyBlock, par2 + 1, par3, par4);
                    int var9 = this.getSavedLightValue(par1EnumSkyBlock, par2 - 1, par3, par4);
                    int var10 = this.getSavedLightValue(par1EnumSkyBlock, par2, par3, par4 + 1);
                    int var11 = this.getSavedLightValue(par1EnumSkyBlock, par2, par3, par4 - 1);

                    if (var8 > var12)
                    {
                        var12 = var8;
                    }

                    if (var9 > var12)
                    {
                        var12 = var9;
                    }

                    if (var10 > var12)
                    {
                        var12 = var10;
                    }

                    if (var11 > var12)
                    {
                        var12 = var11;
                    }

                    return var12;
                }
                else
                {
                    Chunk var7 = this.getChunkFromChunkCoords(var5, var6);
                    return var7.getSavedLightValue(par1EnumSkyBlock, par2 & 15, par3, par4 & 15);
                }
            }
            else
            {
                return par1EnumSkyBlock.defaultLightValue;
            }
        }
    }