Fixed missing MoveEntityDeltaPacket field

This commit is contained in:
Dylan K. Taylor 2018-10-24 12:00:25 +01:00
parent 45c9caa38c
commit 196cf8a68d

View File

@ -37,6 +37,8 @@ class MoveEntityDeltaPacket extends DataPacket{
public const FLAG_HAS_ROT_Y = 0x10;
public const FLAG_HAS_ROT_Z = 0x20;
/** @var int */
public $entityRuntimeId;
/** @var int */
public $flags;
/** @var int */
@ -67,6 +69,7 @@ class MoveEntityDeltaPacket extends DataPacket{
}
protected function decodePayload(){
$this->entityRuntimeId = $this->getEntityRuntimeId();
$this->flags = $this->getByte();
$this->xDiff = $this->maybeReadCoord(self::FLAG_HAS_X);
$this->yDiff = $this->maybeReadCoord(self::FLAG_HAS_Y);
@ -89,6 +92,7 @@ class MoveEntityDeltaPacket extends DataPacket{
}
protected function encodePayload(){
$this->putEntityRuntimeId($this->entityRuntimeId);
$this->putByte($this->flags);
$this->maybeWriteCoord(self::FLAG_HAS_X, $this->xDiff);
$this->maybeWriteCoord(self::FLAG_HAS_Y, $this->yDiff);