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