skeletons are peaceful and will not attack player, entity will seaatch 16 block radius to find attackable player

This commit is contained in:
GameHerobrine 2023-01-25 19:27:27 +03:00
parent ed30995f9d
commit 395e35ad5d
4 changed files with 17 additions and 4 deletions

View file

@ -32,6 +32,15 @@ class EntityAI
console("[DEBUG] Adding new task...",true, true, 2);
$this->tasks[$task->__toString()] = $task;
}
public function removeTask($name){
if(isset($this->tasks[$name])){
unset($this->tasks[$name]);
return true;
}
return false;
}
/**
*
* @param mixed $id classname