public function onUpdate($currentTick)
{
if ($this->closed) {
return false;
}
$this->timings->startTiming();
$hasUpdate = parent::onUpdate($currentTick);
$this->age++;
if ($this->age > 1200 or $this->isCollided) {
$this->kill();
$this->close();
$hasUpdate = true;
}
if ($this->onGround) {
$this->kill();
$this->close();
}
$this->timings->stopTiming();
return $hasUpdate;
}