Found some unknown things

This commit is contained in:
Dylan K. Taylor 2018-03-24 20:04:44 +00:00
parent 526f05631e
commit d97abfaa7b
7 changed files with 19 additions and 19 deletions

View File

@ -31,14 +31,14 @@ class AddBehaviorTreePacket extends DataPacket{
public const NETWORK_ID = ProtocolInfo::ADD_BEHAVIOR_TREE_PACKET;
/** @var string */
public $unknownString1;
public $behaviorTreeJson;
protected function decodePayload(){
$this->unknownString1 = $this->getString();
$this->behaviorTreeJson = $this->getString();
}
protected function encodePayload(){
$this->putString($this->unknownString1);
$this->putString($this->behaviorTreeJson);
}
public function handle(NetworkSession $session) : bool{

View File

@ -45,7 +45,7 @@ class AddItemEntityPacket extends DataPacket{
/** @var array */
public $metadata = [];
/** @var bool */
public $bool1 = false;
public $isFromFishing = false;
protected function decodePayload(){
$this->entityUniqueId = $this->getEntityUniqueId();
@ -54,7 +54,7 @@ class AddItemEntityPacket extends DataPacket{
$this->position = $this->getVector3();
$this->motion = $this->getVector3();
$this->metadata = $this->getEntityMetadata();
$this->bool1 = $this->getBool();
$this->isFromFishing = $this->getBool();
}
protected function encodePayload(){
@ -64,7 +64,7 @@ class AddItemEntityPacket extends DataPacket{
$this->putVector3($this->position);
$this->putVector3Nullable($this->motion);
$this->putEntityMetadata($this->metadata);
$this->putBool($this->bool1);
$this->putBool($this->isFromFishing);
}
public function handle(NetworkSession $session) : bool{

View File

@ -47,7 +47,7 @@ class AddPlayerPacket extends DataPacket{
/** @var int */
public $entityRuntimeId;
/** @var string */
public $string1 = "";
public $platformChatId = "";
/** @var Vector3 */
public $position;
/** @var Vector3|null */
@ -82,7 +82,7 @@ class AddPlayerPacket extends DataPacket{
$this->platform = $this->getVarInt();
$this->entityUniqueId = $this->getEntityUniqueId();
$this->entityRuntimeId = $this->getEntityRuntimeId();
$this->string1 = $this->getString();
$this->platformChatId = $this->getString();
$this->position = $this->getVector3();
$this->motion = $this->getVector3();
$this->pitch = $this->getLFloat();
@ -112,7 +112,7 @@ class AddPlayerPacket extends DataPacket{
$this->putVarInt($this->platform);
$this->putEntityUniqueId($this->entityUniqueId ?? $this->entityRuntimeId);
$this->putEntityRuntimeId($this->entityRuntimeId);
$this->putString($this->string1);
$this->putString($this->platformChatId);
$this->putVector3($this->position);
$this->putVector3Nullable($this->motion);
$this->putLFloat($this->pitch);

View File

@ -36,18 +36,18 @@ class EntityFallPacket extends DataPacket{
/** @var float */
public $fallDistance;
/** @var bool */
public $bool1;
public $isInVoid;
protected function decodePayload(){
$this->entityRuntimeId = $this->getEntityRuntimeId();
$this->fallDistance = $this->getLFloat();
$this->bool1 = $this->getBool();
$this->isInVoid = $this->getBool();
}
protected function encodePayload(){
$this->putEntityRuntimeId($this->entityRuntimeId);
$this->putLFloat($this->fallDistance);
$this->putBool($this->bool1);
$this->putBool($this->isInVoid);
}
public function handle(NetworkSession $session) : bool{

View File

@ -58,7 +58,7 @@ class TextPacket extends DataPacket{
/** @var string */
public $xboxUserId = "";
/** @var string */
public $string1 = "";
public $platformChatId = "";
protected function decodePayload(){
$this->type = $this->getByte();
@ -89,7 +89,7 @@ class TextPacket extends DataPacket{
}
$this->xboxUserId = $this->getString();
$this->string1 = $this->getString();
$this->platformChatId = $this->getString();
}
protected function encodePayload(){
@ -121,7 +121,7 @@ class TextPacket extends DataPacket{
}
$this->putString($this->xboxUserId);
$this->putString($this->string1);
$this->putString($this->platformChatId);
}
public function handle(NetworkSession $session) : bool{

View File

@ -31,14 +31,14 @@ class WSConnectPacket extends DataPacket{
public const NETWORK_ID = ProtocolInfo::W_S_CONNECT_PACKET;
/** @var string */
public $string1;
public $serverUri;
protected function decodePayload(){
$this->string1 = $this->getString();
$this->serverUri = $this->getString();
}
protected function encodePayload(){
$this->putString($this->string1);
$this->putString($this->serverUri);
}
public function handle(NetworkSession $session) : bool{

View File

@ -39,7 +39,7 @@ class PlayerListEntry{
/** @var int */
public $platform = 0;
/** @var string */
public $string1 = "";
public $platformChatId = "";
/** @var Skin */
public $skin;
/** @var string */