13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
20 public const NETWORK_ID = ProtocolInfo::AGENT_ANIMATION_PACKET;
22 public const TYPE_ARM_SWING = 0;
23 public const TYPE_SHRUG = 1;
25 private int $animationType;
26 private int $actorRuntimeId;
31 public static function create(
int $animationType,
int $actorRuntimeId) : self{
33 $result->animationType = $animationType;
34 $result->actorRuntimeId = $actorRuntimeId;
38 public function getAnimationType() : int{ return $this->animationType; }
40 public function getActorRuntimeId() : int{ return $this->actorRuntimeId; }
43 $this->animationType = $in->getByte();
48 $out->putByte($this->animationType);
49 $out->putActorRuntimeId($this->actorRuntimeId);
53 return $handler->handleAgentAnimation($this);
handle(PacketHandlerInterface $handler)
static create(int $animationType, int $actorRuntimeId)
decodePayload(PacketSerializer $in)
encodePayload(PacketSerializer $out)