mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
better autojump for mobs
This commit is contained in:
parent
38ee5daed2
commit
aef063c878
2 changed files with 3 additions and 3 deletions
|
|
@ -53,9 +53,7 @@ class ConsoleAPI{
|
|||
if(!defined("NO_THREADS")){
|
||||
self::$loop->stop();
|
||||
self::$loop->notify();
|
||||
//@fclose($this->loop->fp);
|
||||
usleep(50000);
|
||||
//$this->loop->join();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,9 @@ class MobController
|
|||
$this->entity->yaw = self::limitAngle($this->entity->yaw, $v10, 30);
|
||||
$this->entity->setAIMoveSpeed($this->speedMultiplier * $this->entity->getSpeed() * $this->entity->getSpeedModifer());
|
||||
|
||||
if($diffY > 0 && $diffX*$diffX + $diffZ*$diffZ < 1) $this->setJumping(true);
|
||||
if($diffY > 0 && $diffX*$diffX + $diffZ*$diffZ < 1 && $this->entity->isCollidedHorizontally){
|
||||
$this->setJumping(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
//TODO handle jumps somewhere
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue