hopefully fixed entity movement

This commit is contained in:
GameHerobrine 2023-02-21 16:43:07 +03:00
parent 7b5d550fcb
commit 153894c368
2 changed files with 21 additions and 8 deletions

View file

@ -1,7 +1,16 @@
<?php
class MoveEntityPacket extends RakNetDataPacket{
/**
* eid
* x
* y
* z
* yaw
* pitch
* @var array
*/
public $entities;
public function pid(){
return ProtocolInfo::MOVE_ENTITY_PACKET;
}
@ -12,6 +21,15 @@ class MoveEntityPacket extends RakNetDataPacket{
public function encode(){
$this->reset();
$this->putInt(count($this->entities));
foreach($this->entities as $d){
$this->putInt($d[0]); //eid
$this->putFloat($d[1]); //x
$this->putFloat($d[2]); //y
$this->putFloat($d[3]); //z
$this->putFloat($d[4]); //yaw
$this->putFloat($d[5]); //pitch
}
}
}