public static float fixAoLight(float light, float defLight) {
        if (Config.lightLevels == null) {
            return light;
        } else {
            float level_0 = Config.lightLevels[0];
            float level_1 = Config.lightLevels[1];

            if (light > level_0) {
                return light;
            } else if (defLight <= level_1) {
                return light;
            } else {
                float mul = 1.0F - getAmbientOcclusionLevel();

                return light + (defLight - light) * mul;
            }
        }
    }