13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::MOTION_PREDICTION_HINTS_PACKET;
23 private int $actorRuntimeId;
25 private bool $onGround;
30 public static function create(
int $actorRuntimeId,
Vector3 $motion,
bool $onGround) : self{
32 $result->actorRuntimeId = $actorRuntimeId;
33 $result->motion = $motion;
34 $result->onGround = $onGround;
38 public function getActorRuntimeId() : int{ return $this->actorRuntimeId; }
40 public function getMotion() :
Vector3{ return $this->motion; }
42 public function isOnGround() : bool{ return $this->onGround; }
45 $this->actorRuntimeId = $in->getActorRuntimeId();
47 $this->onGround = $in->
getBool();
51 $out->putActorRuntimeId($this->actorRuntimeId);
53 $out->putBool($this->onGround);
57 return $handler->handleMotionPredictionHints($this);
handle(PacketHandlerInterface $handler)
static create(int $actorRuntimeId, Vector3 $motion, bool $onGround)
decodePayload(PacketSerializer $in)
encodePayload(PacketSerializer $out)
putVector3(Vector3 $vector)