mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
0.9.x setentitymotion packet added
This commit is contained in:
parent
532acb549d
commit
6cbc3824f3
7 changed files with 20 additions and 44 deletions
|
|
@ -940,10 +940,7 @@ class Entity extends Position
|
|||
$player->dataPacket($pk);
|
||||
|
||||
$pk = new SetEntityMotionPacket();
|
||||
$pk->eid = $this->eid;
|
||||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$pk->entities = [[$this->eid, $this->speedX, $this->speedY, $this->speedZ]];
|
||||
$player->dataPacket($pk);
|
||||
|
||||
$pk = new PlayerEquipmentPacket();
|
||||
|
|
@ -968,10 +965,7 @@ class Entity extends Position
|
|||
$player->dataPacket($pk);
|
||||
|
||||
$pk = new SetEntityMotionPacket();
|
||||
$pk->eid = $this->eid;
|
||||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$pk->entities = [[$this->eid, $this->speedX, $this->speedY, $this->speedZ]];
|
||||
$player->dataPacket($pk);
|
||||
break;
|
||||
case ENTITY_FALLING:
|
||||
|
|
@ -985,10 +979,7 @@ class Entity extends Position
|
|||
$player->dataPacket($pk);
|
||||
|
||||
$pk = new SetEntityMotionPacket();
|
||||
$pk->eid = $this->eid;
|
||||
$pk->speedX = $this->speedX;
|
||||
$pk->speedY = $this->speedY;
|
||||
$pk->speedZ = $this->speedZ;
|
||||
$pk->entities = [[$this->eid, $this->speedX, $this->speedY, $this->speedZ]];
|
||||
$player->dataPacket($pk);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue