mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
More protocol updates
This commit is contained in:
parent
c36c0dfa66
commit
5ca4f5416c
@ -204,6 +204,9 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
|||||||
$pk->x = $this->x;
|
$pk->x = $this->x;
|
||||||
$pk->y = $this->y;
|
$pk->y = $this->y;
|
||||||
$pk->z = $this->z;
|
$pk->z = $this->z;
|
||||||
|
$pk->speedX = $this->motionX;
|
||||||
|
$pk->speedY = $this->motionY;
|
||||||
|
$pk->speedZ = $this->motionZ;
|
||||||
$pk->yaw = $this->yaw;
|
$pk->yaw = $this->yaw;
|
||||||
$pk->pitch = $this->pitch;
|
$pk->pitch = $this->pitch;
|
||||||
$item = $this->getInventory()->getItemInHand();
|
$item = $this->getInventory()->getItemInHand();
|
||||||
@ -214,8 +217,6 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
|||||||
$pk->metadata = $this->dataProperties;
|
$pk->metadata = $this->dataProperties;
|
||||||
$player->dataPacket($pk->setChannel(Network::CHANNEL_ENTITY_SPAWNING));
|
$player->dataPacket($pk->setChannel(Network::CHANNEL_ENTITY_SPAWNING));
|
||||||
|
|
||||||
$player->addEntityMotion($this->getId(), $this->motionX, $this->motionY, $this->motionZ);
|
|
||||||
|
|
||||||
$this->inventory->sendArmorContents($player);
|
$this->inventory->sendArmorContents($player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,9 @@ class FloatingTextParticle extends Particle{
|
|||||||
$pk->x = $this->x;
|
$pk->x = $this->x;
|
||||||
$pk->y = $this->y - 2.5;
|
$pk->y = $this->y - 2.5;
|
||||||
$pk->z = $this->z;
|
$pk->z = $this->z;
|
||||||
|
$pk->speedX = 0;
|
||||||
|
$pk->speedY = 0;
|
||||||
|
$pk->speedZ = 0;
|
||||||
$pk->yaw = 0;
|
$pk->yaw = 0;
|
||||||
$pk->pitch = 0;
|
$pk->pitch = 0;
|
||||||
$pk->item = 0;
|
$pk->item = 0;
|
||||||
|
@ -40,6 +40,9 @@ class AddPlayerPacket extends DataPacket{
|
|||||||
public $x;
|
public $x;
|
||||||
public $y;
|
public $y;
|
||||||
public $z;
|
public $z;
|
||||||
|
public $speedX;
|
||||||
|
public $speedY;
|
||||||
|
public $speedZ;
|
||||||
public $pitch;
|
public $pitch;
|
||||||
public $yaw;
|
public $yaw;
|
||||||
public $item;
|
public $item;
|
||||||
@ -65,6 +68,9 @@ class AddPlayerPacket extends DataPacket{
|
|||||||
$this->putFloat($this->x);
|
$this->putFloat($this->x);
|
||||||
$this->putFloat($this->y);
|
$this->putFloat($this->y);
|
||||||
$this->putFloat($this->z);
|
$this->putFloat($this->z);
|
||||||
|
$this->putFloat($this->speedX);
|
||||||
|
$this->putFloat($this->speedY);
|
||||||
|
$this->putFloat($this->speedZ);
|
||||||
$this->putFloat($this->yaw);
|
$this->putFloat($this->yaw);
|
||||||
$this->putFloat($this->yaw); //TODO headrot
|
$this->putFloat($this->yaw); //TODO headrot
|
||||||
$this->putFloat($this->pitch);
|
$this->putFloat($this->pitch);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user