/** * @param Tile $tile * * @throws LevelException */ public function removeTile(Tile $tile) { if ($tile->getLevel() !== $this) { throw new LevelException("Invalid Tile level"); } unset($this->tiles[$tile->getId()]); unset($this->updateTiles[$tile->getId()]); $this->clearChunkCache($tile->getX() >> 4, $tile->getZ() >> 4); }
public function removeTile(Tile $tile) { unset($this->tiles[$tile->getId()]); unset($this->tileList[($tile->z & 0xf) << 12 | ($tile->x & 0xf) << 8 | $tile->y & 0xff]); if ($this->isInit) { $this->hasChanged = true; } }