mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
extra.properties cleanup, fixed fire/water/lava collisions
This commit is contained in:
parent
86e32a1620
commit
8f720231fa
9 changed files with 20 additions and 31 deletions
|
|
@ -356,11 +356,11 @@ class Level{
|
|||
if($e->class === ENTITY_MOB && !$e->isPlayer()){
|
||||
++$this->totalMobsAmount;
|
||||
}
|
||||
if($e->needsUpdate){
|
||||
if($e->isPlayer() || $e->needsUpdate){
|
||||
$e->update();
|
||||
}
|
||||
}
|
||||
if(Entity::$updateOnTick && $server->ticks % 40 === 0){ //40 ticks delay
|
||||
if($server->ticks % 40 === 0){ //40 ticks delay
|
||||
$this->mobSpawner->handle();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,11 +23,11 @@ class MobSpawner{
|
|||
|
||||
public function spawnMobs(){
|
||||
$phase = $this->server->api->time->getPhase($this->level);
|
||||
if(self::$spawnAnimals && $phase == "day"){ //Animal
|
||||
if(self::$spawnAnimals && ($phase == "day" || $phase == "sunrise")){ //Animal
|
||||
$type = mt_rand(10, 13);
|
||||
$baby = false; //TODO baby
|
||||
$grassOnly = true;
|
||||
}elseif(self::$spawnMobs && $phase == "night"){ //Monster, true night
|
||||
}elseif(self::$spawnMobs && ($phase == "night" || $phase == "sunset")){ //Monster, true night
|
||||
$type = mt_rand(32, 35);
|
||||
$grassOnly = false;
|
||||
$baby = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue