public function onUpdate($currentTick)
{
if ($this->closed) {
return false;
}
if (!$this->isAlive()) {
++$this->deadTicks;
if ($this->deadTicks >= 10) {
$this->despawnFromAll();
if (!$this->isPlayer) {
$this->close();
}
}
return $this->deadTicks < 10;
}
$tickDiff = $currentTick - $this->lastUpdate;
if ($tickDiff <= 0) {
return false;
}
$this->lastUpdate = $currentTick;
$this->timings->startTiming();
$hasUpdate = $this->entityBaseTick($tickDiff);
$this->updateMovement();
$this->timings->stopTiming();
//if($this->isStatic())
return $hasUpdate;
//return !($this instanceof Player);
}