public function close()
{
if (!$this->closed) {
$this->closed = true;
unset($this->level->updateTiles[$this->id]);
if ($this->chunk instanceof FullChunk) {
$this->chunk->removeTile($this);
}
if (($level = $this->getLevel()) instanceof Level) {
$level->removeTile($this);
}
$this->level = null;
}
}