Merge commit '1c13ba565660e0985c08f2c6b59e26f8216f87e4'

# Conflicts:
#	resources/vanilla
#	src/network/mcpe/protocol/serializer/PacketSerializer.php
This commit is contained in:
Dylan K. Taylor 2020-06-17 21:14:04 +01:00
commit 55e6b2dfbc

View File

@ -101,11 +101,10 @@ class PacketSerializer extends BinaryStream{
$animationCount = $this->getLInt(); $animationCount = $this->getLInt();
$animations = []; $animations = [];
for($i = 0; $i < $animationCount; ++$i){ for($i = 0; $i < $animationCount; ++$i){
$animations[] = new SkinAnimation( $skinImage = $this->getSkinImage();
$skinImage = $this->getSkinImage(), $animationType = $this->getLInt();
$animationType = $this->getLInt(), $animationFrames = $this->getLFloat();
$animationFrames = $this->getLFloat() $animations[] = new SkinAnimation($skinImage, $animationType, $animationFrames);
);
} }
$capeData = $this->getSkinImage(); $capeData = $this->getSkinImage();
$geometryData = $this->getString(); $geometryData = $this->getString();
@ -120,13 +119,12 @@ class PacketSerializer extends BinaryStream{
$personaPieceCount = $this->getLInt(); $personaPieceCount = $this->getLInt();
$personaPieces = []; $personaPieces = [];
for($i = 0; $i < $personaPieceCount; ++$i){ for($i = 0; $i < $personaPieceCount; ++$i){
$personaPieces[] = new PersonaSkinPiece( $pieceId = $this->getString();
$pieceId = $this->getString(), $pieceType = $this->getString();
$pieceType = $this->getString(), $packId = $this->getString();
$packId = $this->getString(), $isDefaultPiece = $this->getBool();
$isDefaultPiece = $this->getBool(), $productId = $this->getString();
$productId = $this->getString() $personaPieces[] = new PersonaSkinPiece($pieceId, $pieceType, $packId, $isDefaultPiece, $productId);
);
} }
$pieceTintColorCount = $this->getLInt(); $pieceTintColorCount = $this->getLInt();
$pieceTintColors = []; $pieceTintColors = [];
@ -491,11 +489,10 @@ class PacketSerializer extends BinaryStream{
* @throws BinaryDataException * @throws BinaryDataException
*/ */
public function getVector3() : Vector3{ public function getVector3() : Vector3{
return new Vector3( $x = $this->getLFloat();
$this->getLFloat(), $y = $this->getLFloat();
$this->getLFloat(), $z = $this->getLFloat();
$this->getLFloat() return new Vector3($x, $y, $z);
);
} }
/** /**
@ -606,12 +603,11 @@ class PacketSerializer extends BinaryStream{
* @throws BinaryDataException * @throws BinaryDataException
*/ */
public function getEntityLink() : EntityLink{ public function getEntityLink() : EntityLink{
return new EntityLink( $fromEntityUniqueId = $this->getEntityUniqueId();
$fromEntityUniqueId = $this->getEntityUniqueId(), $toEntityUniqueId = $this->getEntityUniqueId();
$toEntityUniqueId = $this->getEntityUniqueId(), $type = $this->getByte();
$type = $this->getByte(), $immediate = $this->getBool();
$immediate = $this->getBool() return new EntityLink($fromEntityUniqueId, $toEntityUniqueId, $type, $immediate);
);
} }
public function putEntityLink(EntityLink $link) : void{ public function putEntityLink(EntityLink $link) : void{