This commit is contained in:
GameHerobrine 2023-01-10 00:55:15 +03:00
parent 44728d21dc
commit 38d4bd6644
4 changed files with 8 additions and 37 deletions

View file

@ -271,7 +271,6 @@ class Level{
$e->update();
}
}
if(Entity::$updateOnTick && $server->ticks % 40 === 0){ //40 ticks delay
$this->mobSpawner->handle();
}

View file

@ -11,7 +11,7 @@ class MobSpawner{
public function countEntities(){
$ents = 0;
foreach($this->level->entityList as $e){
foreach($this->level->entityList as $e){ //TODO no for loop
if(!$e->isPlayer() && $e->class === ENTITY_MOB){
++$ents;
}