public function encode() { $this->reset(); $this->putInt($this->x); $this->putInt($this->y); $this->putInt($this->z); $this->put($this->namedtag); }