fixed tasklookaround

This commit is contained in:
GameHerobrine 2024-01-12 05:54:19 +03:00
parent b7f9d3f1c5
commit 3d1dba6b86
14 changed files with 58 additions and 24 deletions

View file

@ -13,6 +13,7 @@ class Creeper extends Monster{
$this->timeUntilExplode = $this->isIgnited() ? self::EXPL_TIME : 0;
$this->ai->addTask(new TaskRandomWalk(0.25));
$this->ai->addTask(new TaskLookAround());
}
public function getAttackDamage(){

View file

@ -7,6 +7,9 @@ class PigZombie extends Monster{
$this->setHealth(isset($this->data["Health"]) ? $this->data["Health"] : 12, "generic");
$this->setName("Pigman");
$this->setSpeed(0.25);
$this->ai->addTask(new TaskLookAround());
$this->ai->addTask(new TaskRandomWalk(0.25));
}
public function getAttackDamage(){
return 5;

View file

@ -10,6 +10,7 @@ class Skeleton extends Monster{
//$this->ai->addTask(new TaskDestroyServerPerformance());
$this->ai->addTask(new TaskRandomWalk(0.25));
$this->ai->addTask(new TaskLookAround());
}
public function getAttackDamage(){

View file

@ -8,6 +8,7 @@ class Spider extends Monster{
$this->setName("Spider");
$this->setSpeed(0.3);
$this->ai->addTask(new TaskRandomWalk(0.25)); //TODO this mob doesnt use newAI -> speed is not correct
$this->ai->addTask(new TaskLookAround()); //TODO this mob doesnt use newAI
}
public function getDrops(){

View file

@ -9,6 +9,7 @@ class Zombie extends Monster{
$this->setSpeed(0.23);
$this->ai->addTask(new TaskRandomWalk(0.25));
$this->ai->addTask(new TaskLookAround());
}
public function getArmorValue(){