public function decode()
 {
     $this->eid = $this->getLong();
     $this->metadata = Binary::readMetadata($this->get(true), true, $offset);
     $this->offset += $offset;
     //print_r($this);
 }
 public function decode()
 {
     $this->eid = $this->getLong();
     $this->type = $this->getInt();
     $this->x = $this->getFloat();
     $this->y = $this->getFloat();
     $this->z = $this->getFloat();
     $this->speedX = $this->getFloat();
     $this->speedY = $this->getFloat();
     $this->speedZ = $this->getFloat();
     $this->yaw = $this->getFloat();
     $this->pitch = $this->getFloat();
     $this->metadata = Binary::readMetadata($this->get(true), true, $offset);
     $this->offset += $offset;
     if (!$this->feof()) {
         $offset = strlen($this->buffer) - $this->offset;
         if ($offset === 2) {
             $this->offset += 2;
         }
         echo "Type: " . $this->type . "\n";
     }
     //$this->links = [];
     //$count = $this->getShort();
     /*for($i = 0; $i < $count; $i++){
     			$to = $this->getLong();
     			$from = $this->getLong();
     			$mode = $this->getByte();
     			$this->links[] = [$to, $from, $mode];
     		}*/
     //print_r($this);
 }
 public function decode()
 {
     $this->uuid = $this->getUUID();
     $this->username = $this->getString();
     $this->eid = $this->getLong();
     $this->x = $this->getFloat();
     $this->y = $this->getFloat();
     $this->z = $this->getFloat();
     $this->speedX = $this->getFloat();
     $this->speedY = $this->getFloat();
     $this->speedZ = $this->getFloat();
     $this->yaw = $this->getFloat();
     $this->headyaw = $this->getFloat();
     $this->pitch = $this->getFloat();
     $this->item = $this->getSlot();
     $this->metadata = Binary::readMetadata($this->get(true), true, $offset);
     $this->offset += $offset;
     //Buffer解析完了のため
     //print_r($this);
 }