mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-10 15:59:39 +00:00
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:
commit
d58ea80dca
@ -606,14 +606,12 @@ class PacketSerializer extends BinaryStream{
|
||||
* @throws BinaryDataException
|
||||
*/
|
||||
public function getEntityLink() : EntityLink{
|
||||
$link = new EntityLink();
|
||||
|
||||
$link->fromEntityUniqueId = $this->getEntityUniqueId();
|
||||
$link->toEntityUniqueId = $this->getEntityUniqueId();
|
||||
$link->type = $this->getByte();
|
||||
$link->immediate = $this->getBool();
|
||||
|
||||
return $link;
|
||||
return new EntityLink(
|
||||
$fromEntityUniqueId = $this->getEntityUniqueId(),
|
||||
$toEntityUniqueId = $this->getEntityUniqueId(),
|
||||
$type = $this->getByte(),
|
||||
$immediate = $this->getBool()
|
||||
);
|
||||
}
|
||||
|
||||
public function putEntityLink(EntityLink $link) : void{
|
||||
|
@ -38,7 +38,7 @@ class EntityLink{
|
||||
/** @var bool */
|
||||
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->toEntityUniqueId = $toEntityUniqueId;
|
||||
$this->type = $type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user