From 8b1bd5b7ffea16f504096be81339eedec55390e2 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 16 May 2022 18:17:32 +0100 Subject: [PATCH] World: do not hardcode length of day in computeSunAnglePercentage() --- src/world/World.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/World.php b/src/world/World.php index 687014c1e4..cd430bba4c 100644 --- a/src/world/World.php +++ b/src/world/World.php @@ -1273,7 +1273,7 @@ class World implements ChunkManager{ * get an angle in radians, or by 360 to get an angle in degrees. */ public function computeSunAnglePercentage() : float{ - $timeProgress = ($this->time % 24000) / 24000; + $timeProgress = ($this->time % self::TIME_FULL) / self::TIME_FULL; //0.0 needs to be high noon, not dusk $sunProgress = $timeProgress + ($timeProgress < 0.25 ? 0.75 : -0.25);