mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
protocol: rename some useless fields
This commit is contained in:
parent
2e720b48d9
commit
f428a9bf52
@ -35,7 +35,7 @@ class UpdateEquipPacket extends DataPacket{
|
||||
/** @var int */
|
||||
public $windowType;
|
||||
/** @var int */
|
||||
public $unknownVarint; //TODO: find out what this is (vanilla always sends 0)
|
||||
public $windowSlotCount; //useless, seems to be part of a standard container header
|
||||
/** @var int */
|
||||
public $entityUniqueId;
|
||||
/** @var string */
|
||||
@ -44,7 +44,7 @@ class UpdateEquipPacket extends DataPacket{
|
||||
protected function decodePayload(){
|
||||
$this->windowId = $this->getByte();
|
||||
$this->windowType = $this->getByte();
|
||||
$this->unknownVarint = $this->getVarInt();
|
||||
$this->windowSlotCount = $this->getVarInt();
|
||||
$this->entityUniqueId = $this->getEntityUniqueId();
|
||||
$this->namedtag = $this->getRemaining();
|
||||
}
|
||||
@ -52,7 +52,7 @@ class UpdateEquipPacket extends DataPacket{
|
||||
protected function encodePayload(){
|
||||
$this->putByte($this->windowId);
|
||||
$this->putByte($this->windowType);
|
||||
$this->putVarInt($this->unknownVarint);
|
||||
$this->putVarInt($this->windowSlotCount);
|
||||
$this->putEntityUniqueId($this->entityUniqueId);
|
||||
$this->put($this->namedtag);
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class UpdateTradePacket extends DataPacket{
|
||||
/** @var int */
|
||||
public $windowType = WindowTypes::TRADING; //Mojang hardcoded this -_-
|
||||
/** @var int */
|
||||
public $thisIsAlwaysZero = 0; //hardcoded to 0
|
||||
public $windowSlotCount = 0; //useless, seems to be part of a standard container header
|
||||
/** @var int */
|
||||
public $tradeTier;
|
||||
/** @var int */
|
||||
@ -57,7 +57,7 @@ class UpdateTradePacket extends DataPacket{
|
||||
protected function decodePayload(){
|
||||
$this->windowId = $this->getByte();
|
||||
$this->windowType = $this->getByte();
|
||||
$this->thisIsAlwaysZero = $this->getVarInt();
|
||||
$this->windowSlotCount = $this->getVarInt();
|
||||
$this->tradeTier = $this->getVarInt();
|
||||
$this->traderEid = $this->getEntityUniqueId();
|
||||
$this->playerEid = $this->getEntityUniqueId();
|
||||
@ -70,7 +70,7 @@ class UpdateTradePacket extends DataPacket{
|
||||
protected function encodePayload(){
|
||||
$this->putByte($this->windowId);
|
||||
$this->putByte($this->windowType);
|
||||
$this->putVarInt($this->thisIsAlwaysZero);
|
||||
$this->putVarInt($this->windowSlotCount);
|
||||
$this->putVarInt($this->tradeTier);
|
||||
$this->putEntityUniqueId($this->traderEid);
|
||||
$this->putEntityUniqueId($this->playerEid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user