Rename more unknown things in the protocol

This commit is contained in:
Dylan K. Taylor 2018-04-07 11:34:59 +01:00
parent 5b532fdcf5
commit db5890fddb
4 changed files with 13 additions and 13 deletions

View File

@ -33,14 +33,14 @@ class RiderJumpPacket extends DataPacket{
public const NETWORK_ID = ProtocolInfo::RIDER_JUMP_PACKET;
/** @var int */
public $unknown;
public $jumpStrength; //percentage
protected function decodePayload(){
$this->unknown = $this->getVarInt();
$this->jumpStrength = $this->getVarInt();
}
protected function encodePayload(){
$this->putVarInt($this->unknown);
$this->putVarInt($this->jumpStrength);
}
public function handle(NetworkSession $session) : bool{

View File

@ -33,16 +33,16 @@ class ShowStoreOfferPacket extends DataPacket{
/** @var string */
public $offerId;
/** @var bool */
public $unknownBool;
public $showAll;
protected function decodePayload(){
$this->offerId = $this->getString();
$this->unknownBool = $this->getBool();
$this->showAll = $this->getBool();
}
protected function encodePayload(){
$this->putString($this->offerId);
$this->putBool($this->unknownBool);
$this->putBool($this->showAll);
}
public function handle(NetworkSession $session) : bool{

View File

@ -112,9 +112,9 @@ class StartGamePacket extends DataPacket{
/** @var string */
public $premiumWorldTemplateId = "";
/** @var bool */
public $unknownBool = false;
public $isTrial = false;
/** @var int */
public $currentTick = 0;
public $currentTick = 0; //only used if isTrial is true
/** @var int */
public $enchantmentSeed = 0;
@ -159,7 +159,7 @@ class StartGamePacket extends DataPacket{
$this->levelId = $this->getString();
$this->worldName = $this->getString();
$this->premiumWorldTemplateId = $this->getString();
$this->unknownBool = $this->getBool();
$this->isTrial = $this->getBool();
$this->currentTick = $this->getLLong();
$this->enchantmentSeed = $this->getVarInt();
@ -206,7 +206,7 @@ class StartGamePacket extends DataPacket{
$this->putString($this->levelId);
$this->putString($this->worldName);
$this->putString($this->premiumWorldTemplateId);
$this->putBool($this->unknownBool);
$this->putBool($this->isTrial);
$this->putLLong($this->currentTick);
$this->putVarInt($this->enchantmentSeed);

View File

@ -82,7 +82,7 @@ class NetworkInventoryAction{
/** @var int */
public $windowId = ContainerIds::NONE;
/** @var int */
public $unknown = 0;
public $sourceFlags = 0;
/** @var int */
public $inventorySlot;
/** @var Item */
@ -102,7 +102,7 @@ class NetworkInventoryAction{
$this->windowId = $packet->getVarInt();
break;
case self::SOURCE_WORLD:
$this->unknown = $packet->getUnsignedVarInt();
$this->sourceFlags = $packet->getUnsignedVarInt();
break;
case self::SOURCE_CREATIVE:
break;
@ -137,7 +137,7 @@ class NetworkInventoryAction{
$packet->putVarInt($this->windowId);
break;
case self::SOURCE_WORLD:
$packet->putUnsignedVarInt($this->unknown);
$packet->putUnsignedVarInt($this->sourceFlags);
break;
case self::SOURCE_CREATIVE:
break;