mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
sleeping rewritten(+ fix 73)
This commit is contained in:
parent
b969b5d8f1
commit
37b3c02396
3 changed files with 31 additions and 22 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue