Returns the sun brightness - checks time of day, rain and thunder
(float p_72971_1_)
| 1411 | * Returns the sun brightness - checks time of day, rain and thunder |
| 1412 | */ |
| 1413 | public float getSunBrightness(float p_72971_1_) |
| 1414 | { |
| 1415 | float f = this.getCelestialAngle(p_72971_1_); |
| 1416 | float f1 = 1.0F - (MathHelper.cos(f * (float)Math.PI * 2.0F) * 2.0F + 0.2F); |
| 1417 | f1 = MathHelper.clamp_float(f1, 0.0F, 1.0F); |
| 1418 | f1 = 1.0F - f1; |
| 1419 | f1 = (float)((double)f1 * (1.0D - (double)(this.getRainStrength(p_72971_1_) * 5.0F) / 16.0D)); |
| 1420 | f1 = (float)((double)f1 * (1.0D - (double)(this.getThunderStrength(p_72971_1_) * 5.0F) / 16.0D)); |
| 1421 | return f1 * 0.8F + 0.2F; |
| 1422 | } |
| 1423 | |
| 1424 | /** |
| 1425 | * Calculates the color for the skybox |
no test coverage detected