mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
ai tweaks, pitch and yaw should be always updated(not only when pos changed)
This commit is contained in:
parent
8b036abf8e
commit
be9a9c0c0d
8 changed files with 17 additions and 34 deletions
|
|
@ -54,9 +54,9 @@ class MobController
|
|||
|
||||
public function lookOn($x, $y = 0, $z = 0, $pitch = true){
|
||||
if($x instanceof Vector3){
|
||||
return $this->lookOn($x->x, $x->y + ($x->getEyeHeight() ?: 0), $x->z);
|
||||
return $this->lookOn($x->x, $x->y + $x->getEyeHeight(), $x->z, $pitch);
|
||||
}
|
||||
return $this->lookOffset($x - $this->entity->x, $this->entity->y + $this->entity->height - $y, $z - $this->entity->z, $pitch);
|
||||
return $this->lookOffset($x - $this->entity->x, ($this->entity->y + $this->entity->height) - $y, $z - $this->entity->z, $pitch);
|
||||
}
|
||||
|
||||
public function __destruct(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue