Fix sunrise/sunset colors

This commit is contained in:
PeytonPlayz595 2024-05-14 03:05:34 -04:00
parent 2d43435d31
commit 93eea7be63

View File

@ -59,9 +59,8 @@ public abstract class WorldProvider {
public float[] calcSunriseSunsetColors(float var1, float var2) { public float[] calcSunriseSunsetColors(float var1, float var2) {
float var3 = 0.4F; float var3 = 0.4F;
float var4 = MathHelper.cos(var1 * (float)Math.PI * 2.0F) - 0.0F; float var4 = MathHelper.cos(var1 * (float)Math.PI * 2.0F) - 0.0F;
float var5 = 0F; if (var4 >= -var3 && var4 <= var3) {
if(var4 >= var5 - var3 && var4 <= var5 + var3) { float var6 = (var4 / var3) * 0.5F + 0.5F;
float var6 = (var4 - var5) / var3 * 0.5F + 0.5F;
float var7 = 1.0F - (1.0F - MathHelper.sin(var6 * (float)Math.PI)) * 0.99F; float var7 = 1.0F - (1.0F - MathHelper.sin(var6 * (float)Math.PI)) * 0.99F;
var7 *= var7; var7 *= var7;
this.colorsSunriseSunset[0] = var6 * 0.3F + 0.7F; this.colorsSunriseSunset[0] = var6 * 0.3F + 0.7F;