public function getSpawnCompound()
{
if ($this->isPaired()) {
$c = new CompoundTag("", [new StringTag("id", Tile::CHEST), new IntTag("x", (int) $this->x), new IntTag("y", (int) $this->y), new IntTag("z", (int) $this->z), new IntTag("pairx", (int) $this->namedtag["pairx"]), new IntTag("pairz", (int) $this->namedtag["pairz"])]);
} else {
$c = new CompoundTag("", [new StringTag("id", Tile::CHEST), new IntTag("x", (int) $this->x), new IntTag("y", (int) $this->y), new IntTag("z", (int) $this->z)]);
}
if ($this->hasName()) {
$c->CustomName = $this->namedtag->CustomName;
}
return $c;
}