mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
mob fixes related to time and headYaw
This commit is contained in:
parent
0a36a67f78
commit
21d0530d39
9 changed files with 35 additions and 27 deletions
|
|
@ -81,6 +81,13 @@ class Level{
|
|||
unset($this->mobSpawner->level);
|
||||
}
|
||||
|
||||
public function isDay(){
|
||||
return $this->getTime() % 19200 < TimeAPI::$phases["sunset"];
|
||||
}
|
||||
public function isNight(){
|
||||
$t = $this->getTime() % 19200;
|
||||
return $t < TimeAPI::$phases["sunrise"] && $t > TimeAPI::$phases["sunset"];
|
||||
}
|
||||
public function save($force = false, $extra = true){
|
||||
if(!isset($this->level)){
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue