pocketmine\network\protocol\SetEntityMotionPacket::encode PHP Method

encode() public method

public encode ( )
    public function encode()
    {
        $this->reset();
        //$this->putInt(count($this->entities));
        foreach ($this->entities as $d) {
            $this->putLong($d[0]);
            //eid
            $this->putFloat($d[1]);
            //motX
            $this->putFloat($d[2]);
            //motY
            $this->putFloat($d[3]);
            //motZ
        }
    }
SetEntityMotionPacket