mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 01:29:55 +00:00
changed type of EntityLink unknown field and added a constructor
This commit is contained in:
parent
1d651046c9
commit
bd2cb85861
@ -519,10 +519,11 @@ abstract class DataPacket extends BinaryStream{
|
|||||||
*/
|
*/
|
||||||
protected function getEntityLink() : EntityLink{
|
protected function getEntityLink() : EntityLink{
|
||||||
$link = new EntityLink();
|
$link = new EntityLink();
|
||||||
|
|
||||||
$link->fromEntityUniqueId = $this->getEntityUniqueId();
|
$link->fromEntityUniqueId = $this->getEntityUniqueId();
|
||||||
$link->toEntityUniqueId = $this->getEntityUniqueId();
|
$link->toEntityUniqueId = $this->getEntityUniqueId();
|
||||||
$link->type = $this->getByte();
|
$link->type = $this->getByte();
|
||||||
$link->byte2 = $this->getByte();
|
$link->bool1 = $this->getBool();
|
||||||
|
|
||||||
return $link;
|
return $link;
|
||||||
}
|
}
|
||||||
@ -534,7 +535,6 @@ abstract class DataPacket extends BinaryStream{
|
|||||||
$this->putEntityUniqueId($link->fromEntityUniqueId);
|
$this->putEntityUniqueId($link->fromEntityUniqueId);
|
||||||
$this->putEntityUniqueId($link->toEntityUniqueId);
|
$this->putEntityUniqueId($link->toEntityUniqueId);
|
||||||
$this->putByte($link->type);
|
$this->putByte($link->type);
|
||||||
$this->putByte($link->byte2);
|
$this->putBool($link->bool1);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,13 @@ class EntityLink{
|
|||||||
public $toEntityUniqueId;
|
public $toEntityUniqueId;
|
||||||
/** @var int */
|
/** @var int */
|
||||||
public $type;
|
public $type;
|
||||||
/** @var int */
|
/** @var bool */
|
||||||
public $byte2;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user