Add Level->getTimeOfDay(), closes #2908 (#2979)

This commit is contained in:
Luke
2019-06-22 16:00:18 +01:00
committed by Dylan T
parent 5a17a0d1aa
commit 6afc689529
2 changed files with 11 additions and 2 deletions

View File

@ -146,7 +146,7 @@ class Bed extends Transparent{
return true;
}
$time = $this->getLevel()->getTime() % Level::TIME_FULL;
$time = $this->getLevel()->getTimeOfDay();
$isNight = ($time >= Level::TIME_NIGHT and $time < Level::TIME_SUNRISE);