mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 10:19:39 +00:00
fix incorrect power calculation of daylight sensor
This commit is contained in:
parent
bf5519b0cf
commit
b4c55a8c37
@ -107,7 +107,7 @@ class DaylightSensor extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sunAngle = $this->world->getSunAnglePercentage();
|
$sunAngle = $this->world->getSunAnglePercentage();
|
||||||
return max(0, (int) round(15 * cos(($sunAngle + ((($sunAngle < 0.5 ? 0 : 1) - $sunAngle) / 5)) * 2 * M_PI)));
|
return max(0, (int) round($lightLevel * cos(($sunAngle + ((($sunAngle < 0.5 ? 0 : 1) - $sunAngle) / 5)) * 2 * M_PI)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user