small tweaks to mob movement during attack

This commit is contained in:
GameHerobrine 2023-08-29 06:50:32 +03:00
parent 0d70406cbe
commit de2a5d6400
2 changed files with 2 additions and 2 deletions

View file

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

View file

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