fixed and reverted

This commit is contained in:
GameHerobrine 2023-10-30 06:36:10 +03:00
parent bfc653a911
commit 5b8aee19fa
5 changed files with 12 additions and 12 deletions

View file

@ -16,7 +16,7 @@ class TaskAttackPlayer extends TaskTempt
return;
}
$ai->mobController->moveTo($this->target->x - 0.5, floor($ai->entity->y), $this->target->z - 0.5);
$ai->mobController->moveTo($this->target->x - 0.5, floor($ai->entity->y), $this->target->z - 0.5, false);
$ai->mobController->lookOn($this->target);
$mult = $ai->entity instanceof Spider ? 1 : 2;
$radius = ($ai->entity->width * $mult)*($ai->entity->width * $mult);

View file

@ -21,7 +21,7 @@ class TaskDestroyServerPerformance extends TaskTempt
return;
}
if(Utils::distance_noroot($this->target, $ai->entity) > 100){
$ai->mobController->moveTo($this->target->x, floor($ai->entity->y), $this->target->z);
$ai->mobController->moveTo($this->target->x, floor($ai->entity->y), $this->target->z, false);
}else{
//TODO move away
}

View file

@ -31,7 +31,7 @@ class TaskRandomWalk extends TaskBase
public function canBeExecuted(EntityAI $ai)
{
if(($ai->entity instanceof Creeper && $ai->entity->isIgnited()) || $ai->entity->hasPath() || $ai->isStarted("TaskTempt")) {
if(($ai->entity instanceof Creeper && $ai->entity->isIgnited()) || $ai->entity->hasPath() || $ai->isStarted("TaskTempt") ||$ai->isStarted("TaskAttackPlayer")) {
return false;
}
return !$ai->entity->inPanic && !$ai->isStarted("TaskEatTileGoal")&& !$ai->isStarted("TaskLookAround") && !$ai->isStarted("TaskLookAtPlayer") && mt_rand(0, 120) == 0;

View file

@ -23,7 +23,7 @@ class TaskTempt extends TaskBase
return;
}
$ai->mobController->moveTo($this->target->x - 0.5, floor($ai->entity->y), $this->target->z - 0.5);
$ai->mobController->moveTo($this->target->x - 0.5, floor($ai->entity->y), $this->target->z - 0.5, false);
$ai->mobController->lookOn($this->target);
}