Merge commit '130c55d9f1c3b350c2767f7656366e08a63cf1ad'

# Conflicts:
#	resources/vanilla
#	src/network/mcpe/protocol/serializer/PacketSerializer.php
#	src/network/mcpe/protocol/types/entity/EntityLink.php
#	tests/phpstan/configs/l8-baseline.neon
This commit is contained in:
Dylan K. Taylor 2020-06-17 21:03:45 +01:00
commit d58ea80dca
2 changed files with 7 additions and 9 deletions

View File

@ -606,14 +606,12 @@ class PacketSerializer extends BinaryStream{
* @throws BinaryDataException * @throws BinaryDataException
*/ */
public function getEntityLink() : EntityLink{ public function getEntityLink() : EntityLink{
$link = new EntityLink(); return new EntityLink(
$fromEntityUniqueId = $this->getEntityUniqueId(),
$link->fromEntityUniqueId = $this->getEntityUniqueId(); $toEntityUniqueId = $this->getEntityUniqueId(),
$link->toEntityUniqueId = $this->getEntityUniqueId(); $type = $this->getByte(),
$link->type = $this->getByte(); $immediate = $this->getBool()
$link->immediate = $this->getBool(); );
return $link;
} }
public function putEntityLink(EntityLink $link) : void{ public function putEntityLink(EntityLink $link) : void{

View File

@ -38,7 +38,7 @@ class EntityLink{
/** @var bool */ /** @var bool */
public $immediate; //for dismounting on mount death public $immediate; //for dismounting on mount death
public function __construct(?int $fromEntityUniqueId = null, ?int $toEntityUniqueId = null, ?int $type = null, bool $immediate = false){ public function __construct(int $fromEntityUniqueId, int $toEntityUniqueId, int $type, bool $immediate){
$this->fromEntityUniqueId = $fromEntityUniqueId; $this->fromEntityUniqueId = $fromEntityUniqueId;
$this->toEntityUniqueId = $toEntityUniqueId; $this->toEntityUniqueId = $toEntityUniqueId;
$this->type = $type; $this->type = $type;