arrows will attack entities

This commit is contained in:
GameHerobrine 2023-07-05 11:44:26 +03:00
parent d8e242d0b5
commit 1fa7697503
7 changed files with 61 additions and 20 deletions

View file

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