diff --git a/src/pocketmine/network/mcpe/protocol/UpdateEquipPacket.php b/src/pocketmine/network/mcpe/protocol/UpdateEquipPacket.php index b32d3eca7..7923dae7c 100644 --- a/src/pocketmine/network/mcpe/protocol/UpdateEquipPacket.php +++ b/src/pocketmine/network/mcpe/protocol/UpdateEquipPacket.php @@ -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); } diff --git a/src/pocketmine/network/mcpe/protocol/UpdateTradePacket.php b/src/pocketmine/network/mcpe/protocol/UpdateTradePacket.php index 1a0b3be60..ad99f4361 100644 --- a/src/pocketmine/network/mcpe/protocol/UpdateTradePacket.php +++ b/src/pocketmine/network/mcpe/protocol/UpdateTradePacket.php @@ -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);