mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Found more unknown things
This commit is contained in:
parent
d97abfaa7b
commit
3fe4ebc301
@ -54,9 +54,9 @@ class MovePlayerPacket extends DataPacket{
|
||||
/** @var int */
|
||||
public $ridingEid = 0;
|
||||
/** @var int */
|
||||
public $int1 = 0;
|
||||
public $teleportCause = 0;
|
||||
/** @var int */
|
||||
public $int2 = 0;
|
||||
public $teleportItem = 0;
|
||||
|
||||
protected function decodePayload(){
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
@ -68,8 +68,8 @@ class MovePlayerPacket extends DataPacket{
|
||||
$this->onGround = $this->getBool();
|
||||
$this->ridingEid = $this->getEntityRuntimeId();
|
||||
if($this->mode === MovePlayerPacket::MODE_TELEPORT){
|
||||
$this->int1 = $this->getLInt();
|
||||
$this->int2 = $this->getLInt();
|
||||
$this->teleportCause = $this->getLInt();
|
||||
$this->teleportItem = $this->getLInt();
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,8 +83,8 @@ class MovePlayerPacket extends DataPacket{
|
||||
$this->putBool($this->onGround);
|
||||
$this->putEntityRuntimeId($this->ridingEid);
|
||||
if($this->mode === MovePlayerPacket::MODE_TELEPORT){
|
||||
$this->putLInt($this->int1);
|
||||
$this->putLInt($this->int2);
|
||||
$this->putLInt($this->teleportCause);
|
||||
$this->putLInt($this->teleportItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,22 +36,22 @@ class PlayerInputPacket extends DataPacket{
|
||||
/** @var float */
|
||||
public $motionY;
|
||||
/** @var bool */
|
||||
public $unknownBool1;
|
||||
public $jumping;
|
||||
/** @var bool */
|
||||
public $unknownBool2;
|
||||
public $sneaking;
|
||||
|
||||
protected function decodePayload(){
|
||||
$this->motionX = $this->getLFloat();
|
||||
$this->motionY = $this->getLFloat();
|
||||
$this->unknownBool1 = $this->getBool();
|
||||
$this->unknownBool2 = $this->getBool();
|
||||
$this->jumping = $this->getBool();
|
||||
$this->sneaking = $this->getBool();
|
||||
}
|
||||
|
||||
protected function encodePayload(){
|
||||
$this->putLFloat($this->motionX);
|
||||
$this->putLFloat($this->motionY);
|
||||
$this->putBool($this->unknownBool1);
|
||||
$this->putBool($this->unknownBool2);
|
||||
$this->putBool($this->jumping);
|
||||
$this->putBool($this->sneaking);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
@ -30,15 +30,18 @@ use pocketmine\network\mcpe\NetworkSession;
|
||||
class SimpleEventPacket extends DataPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::SIMPLE_EVENT_PACKET;
|
||||
|
||||
public const TYPE_ENABLE_COMMANDS = 1;
|
||||
public const TYPE_DISABLE_COMMANDS = 2;
|
||||
|
||||
/** @var int */
|
||||
public $unknownShort1;
|
||||
public $eventType;
|
||||
|
||||
protected function decodePayload(){
|
||||
$this->unknownShort1 = $this->getLShort();
|
||||
$this->eventType = $this->getLShort();
|
||||
}
|
||||
|
||||
protected function encodePayload(){
|
||||
$this->putLShort($this->unknownShort1);
|
||||
$this->putLShort($this->eventType);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
Loading…
x
Reference in New Issue
Block a user