public function addTile(Tile $tile) { if ($tile->getLevel() !== $this) { throw new LevelException("Invalid Tile level"); } $this->tiles[$tile->getId()] = $tile; $this->clearChunkCache($tile->getX() >> 4, $tile->getZ() >> 4); }