sleeping rewritten(+ fix 73)

This commit is contained in:
GameHerobrine 2023-10-08 20:03:37 +03:00
parent b969b5d8f1
commit 37b3c02396
3 changed files with 31 additions and 22 deletions

View file

@ -188,6 +188,7 @@ class Entity extends Position
$this->speedY += $vY;
$this->speedZ += $vZ;
}
public function isMovingHorizontally()
{
return ($this->speedX > 0.01 || $this->speedX < - 0.01) || ($this->speedZ > 0.01 || $this->speedZ < - 0.01);
@ -703,10 +704,13 @@ class Entity extends Position
$this->updateMovement();
}
if($this->isPlayer()){
$this->player->entityTick();
}
$this->needsUpdate = $hasUpdate;
$this->lastUpdate = $now;
}
public function isOnLadder(){
$x = (int)$this->x;
$y = (int)$this->boundingBox->minY;