mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 00:09: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
|
* @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{
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user