13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
20 public const NETWORK_ID = ProtocolInfo::PLAYER_INPUT_PACKET;
22 public float $motionX;
23 public float $motionY;
25 public bool $sneaking;
30 public static function create(
float $motionX,
float $motionY,
bool $jumping,
bool $sneaking) : self{
32 $result->motionX = $motionX;
33 $result->motionY = $motionY;
34 $result->jumping = $jumping;
35 $result->sneaking = $sneaking;
40 $this->motionX = $in->getLFloat();
42 $this->jumping = $in->
getBool();
43 $this->sneaking = $in->
getBool();
47 $out->putLFloat($this->motionX);
48 $out->putLFloat($this->motionY);
49 $out->putBool($this->jumping);
50 $out->putBool($this->sneaking);
54 return $handler->handlePlayerInput($this);