mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
fixed bug with flying detection, added panic task
This commit is contained in:
parent
7c47c852e2
commit
d7561ed1ba
10 changed files with 70 additions and 17 deletions
|
|
@ -12,7 +12,7 @@ class MobController
|
|||
|
||||
public function moveNonInstant($x, $y, $z){
|
||||
if($x == 0 && $y == 0 && $z == 0){
|
||||
return false; //failed
|
||||
return false;
|
||||
}
|
||||
|
||||
$ox = ($x > 0 ? 1 : ($x < 0 ? -1 : 0));
|
||||
|
|
@ -58,7 +58,7 @@ class MobController
|
|||
$tan = $dz == 0 ? ($dx < 0 ? 180 : 0) : (90 - rad2deg(atan($dx / $dz)));
|
||||
$thetaOffset = $dz < 0 ? 90 : 270;
|
||||
$calcYaw = ($thetaOffset + $tan);
|
||||
$this->entity->yaw = $this->entity->headYaw = $calcYaw;
|
||||
$this->entity->headYaw = $this->entity->yaw = $calcYaw;
|
||||
}
|
||||
|
||||
public function lookOffset($x, $y, $z, $pitch = true){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue