mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +00:00
Renamed fields of AddEntityPacket and RemoveEntityPacket
This commit is contained in:
parent
12c66d3362
commit
b257348a3a
@ -31,24 +31,24 @@ class AddEntityPacket extends DataPacket/* implements ClientboundPacket*/{
|
|||||||
public const NETWORK_ID = ProtocolInfo::ADD_ENTITY_PACKET;
|
public const NETWORK_ID = ProtocolInfo::ADD_ENTITY_PACKET;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $uvarint1;
|
private $entityNetId;
|
||||||
|
|
||||||
public static function create(int $uvarint1) : self{
|
public static function create(int $entityNetId) : self{
|
||||||
$result = new self;
|
$result = new self;
|
||||||
$result->uvarint1 = $uvarint1;
|
$result->entityNetId = $entityNetId;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUvarint1() : int{
|
public function getEntityNetId() : int{
|
||||||
return $this->uvarint1;
|
return $this->entityNetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function decodePayload() : void{
|
protected function decodePayload() : void{
|
||||||
$this->uvarint1 = $this->getUnsignedVarInt();
|
$this->entityNetId = $this->getUnsignedVarInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function encodePayload() : void{
|
protected function encodePayload() : void{
|
||||||
$this->putUnsignedVarInt($this->uvarint1);
|
$this->putUnsignedVarInt($this->entityNetId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handle(NetworkSession $handler) : bool{
|
public function handle(NetworkSession $handler) : bool{
|
||||||
|
@ -31,24 +31,24 @@ class RemoveEntityPacket extends DataPacket/* implements ClientboundPacket*/{
|
|||||||
public const NETWORK_ID = ProtocolInfo::REMOVE_ENTITY_PACKET;
|
public const NETWORK_ID = ProtocolInfo::REMOVE_ENTITY_PACKET;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
private $uvarint1;
|
private $entityNetId;
|
||||||
|
|
||||||
public static function create(int $uvarint1) : self{
|
public static function create(int $entityNetId) : self{
|
||||||
$result = new self;
|
$result = new self;
|
||||||
$result->uvarint1 = $uvarint1;
|
$result->entityNetId = $entityNetId;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getUvarint1() : int{
|
public function getEntityNetId() : int{
|
||||||
return $this->uvarint1;
|
return $this->entityNetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function decodePayload() : void{
|
protected function decodePayload() : void{
|
||||||
$this->uvarint1 = $this->getUnsignedVarInt();
|
$this->entityNetId = $this->getUnsignedVarInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function encodePayload() : void{
|
protected function encodePayload() : void{
|
||||||
$this->putUnsignedVarInt($this->uvarint1);
|
$this->putUnsignedVarInt($this->entityNetId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handle(NetworkSession $handler) : bool{
|
public function handle(NetworkSession $handler) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user