Merge branch 'release/3.4'

This commit is contained in:
Dylan K. Taylor 2018-10-24 12:18:04 +01:00
commit 2aaac5a425

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() : void{
$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() : void{
$this->putEntityRuntimeId($this->entityRuntimeId);
$this->putByte($this->flags);
$this->maybeWriteCoord(self::FLAG_HAS_X, $this->xDiff);
$this->maybeWriteCoord(self::FLAG_HAS_Y, $this->yDiff);