diff --git a/src/pocketmine/network/mcpe/protocol/DataPacket.php b/src/pocketmine/network/mcpe/protocol/DataPacket.php index 7ef18142e..908635dae 100644 --- a/src/pocketmine/network/mcpe/protocol/DataPacket.php +++ b/src/pocketmine/network/mcpe/protocol/DataPacket.php @@ -519,10 +519,11 @@ abstract class DataPacket extends BinaryStream{ */ protected function getEntityLink() : EntityLink{ $link = new EntityLink(); + $link->fromEntityUniqueId = $this->getEntityUniqueId(); $link->toEntityUniqueId = $this->getEntityUniqueId(); $link->type = $this->getByte(); - $link->byte2 = $this->getByte(); + $link->bool1 = $this->getBool(); return $link; } @@ -534,7 +535,6 @@ abstract class DataPacket extends BinaryStream{ $this->putEntityUniqueId($link->fromEntityUniqueId); $this->putEntityUniqueId($link->toEntityUniqueId); $this->putByte($link->type); - $this->putByte($link->byte2); - + $this->putBool($link->bool1); } } diff --git a/src/pocketmine/network/mcpe/protocol/types/EntityLink.php b/src/pocketmine/network/mcpe/protocol/types/EntityLink.php index 76c3ce405..191acadba 100644 --- a/src/pocketmine/network/mcpe/protocol/types/EntityLink.php +++ b/src/pocketmine/network/mcpe/protocol/types/EntityLink.php @@ -31,7 +31,13 @@ class EntityLink{ public $toEntityUniqueId; /** @var int */ public $type; - /** @var int */ - public $byte2; + /** @var bool */ + public $bool1; + public function __construct(int $fromEntityUniqueId = null, int $toEntityUniqueId = null, int $type = null, bool $bool1 = null){ + $this->fromEntityUniqueId = $fromEntityUniqueId; + $this->toEntityUniqueId = $toEntityUniqueId; + $this->type = $type; + $this->bool1 = $bool1; + } } \ No newline at end of file