public function getSpawnCompound()
{
$c = new CompoundTag("", [new StringTag("id", Tile::HOPPER), 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;
}
if ($this->hasLock()) {
$c->Lock = $this->namedtag->Lock;
}
return $c;
}