mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +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;
|
||||
|
||||
/** @var int */
|
||||
private $uvarint1;
|
||||
private $entityNetId;
|
||||
|
||||
public static function create(int $uvarint1) : self{
|
||||
public static function create(int $entityNetId) : self{
|
||||
$result = new self;
|
||||
$result->uvarint1 = $uvarint1;
|
||||
$result->entityNetId = $entityNetId;
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getUvarint1() : int{
|
||||
return $this->uvarint1;
|
||||
public function getEntityNetId() : int{
|
||||
return $this->entityNetId;
|
||||
}
|
||||
|
||||
protected function decodePayload() : void{
|
||||
$this->uvarint1 = $this->getUnsignedVarInt();
|
||||
$this->entityNetId = $this->getUnsignedVarInt();
|
||||
}
|
||||
|
||||
protected function encodePayload() : void{
|
||||
$this->putUnsignedVarInt($this->uvarint1);
|
||||
$this->putUnsignedVarInt($this->entityNetId);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $handler) : bool{
|
||||
|
@ -31,24 +31,24 @@ class RemoveEntityPacket extends DataPacket/* implements ClientboundPacket*/{
|
||||
public const NETWORK_ID = ProtocolInfo::REMOVE_ENTITY_PACKET;
|
||||
|
||||
/** @var int */
|
||||
private $uvarint1;
|
||||
private $entityNetId;
|
||||
|
||||
public static function create(int $uvarint1) : self{
|
||||
public static function create(int $entityNetId) : self{
|
||||
$result = new self;
|
||||
$result->uvarint1 = $uvarint1;
|
||||
$result->entityNetId = $entityNetId;
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getUvarint1() : int{
|
||||
return $this->uvarint1;
|
||||
public function getEntityNetId() : int{
|
||||
return $this->entityNetId;
|
||||
}
|
||||
|
||||
protected function decodePayload() : void{
|
||||
$this->uvarint1 = $this->getUnsignedVarInt();
|
||||
$this->entityNetId = $this->getUnsignedVarInt();
|
||||
}
|
||||
|
||||
protected function encodePayload() : void{
|
||||
$this->putUnsignedVarInt($this->uvarint1);
|
||||
$this->putUnsignedVarInt($this->entityNetId);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $handler) : bool{
|
||||
|
Loading…
x
Reference in New Issue
Block a user