Open player's eyes for mobs

This commit is contained in:
ArkQuark 2023-02-21 15:37:42 +03:00
parent b6934024da
commit abe7846bb9
4 changed files with 15 additions and 10 deletions

View file

@ -55,7 +55,9 @@ class EntityAI
}
public function updateTasks(){
if(!($this->entity instanceof Entity)) return;
if(!isset($entity) or !($this->entity instanceof Entity)){
return;
}
foreach($this->tasks as $t){
if(!$t->isStarted && $t->canBeExecuted($this)){
$t->isStarted = true;