public function pairWith(Chest $tile) { if ($this->isPaired() or $tile->isPaired()) { return false; } $this->namedtag->pairx = new Int("pairx", $tile->x); $this->namedtag->pairz = new Int("pairz", $tile->z); $tile->namedtag->pairx = new Int("pairx", $this->x); $tile->namedtag->pairz = new Int("pairz", $this->z); $this->spawnToAll(); $tile->spawnToAll(); $this->checkPairing(); return true; }