13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::ANIMATE_ENTITY_PACKET;
23 private string $animation;
24 private string $nextState;
25 private string $stopExpression;
26 private int $stopExpressionVersion;
27 private string $controller;
28 private float $blendOutTime;
33 private array $actorRuntimeIds;
43 string $stopExpression,
44 int $stopExpressionVersion,
47 array $actorRuntimeIds,
50 $result->animation = $animation;
51 $result->nextState = $nextState;
52 $result->stopExpression = $stopExpression;
53 $result->stopExpressionVersion = $stopExpressionVersion;
54 $result->controller = $controller;
55 $result->blendOutTime = $blendOutTime;
56 $result->actorRuntimeIds = $actorRuntimeIds;
60 public function getAnimation() : string{ return $this->animation; }
62 public function getNextState() : string{ return $this->nextState; }
64 public function getStopExpression() : string{ return $this->stopExpression; }
66 public function getStopExpressionVersion() : int{ return $this->stopExpressionVersion; }
68 public function getController() : string{ return $this->controller; }
70 public function getBlendOutTime() : float{ return $this->blendOutTime; }
79 $this->animation = $in->getString();
82 $this->stopExpressionVersion = $in->
getLInt();
85 $this->actorRuntimeIds = [];
92 $out->putString($this->animation);
93 $out->putString($this->nextState);
94 $out->putString($this->stopExpression);
95 $out->putLInt($this->stopExpressionVersion);
96 $out->putString($this->controller);
97 $out->putLFloat($this->blendOutTime);
99 foreach($this->actorRuntimeIds as $id){
100 $out->putActorRuntimeId($id);
105 return $handler->handleAnimateEntity($this);
encodePayload(PacketSerializer $out)
static create(string $animation, string $nextState, string $stopExpression, int $stopExpressionVersion, string $controller, float $blendOutTime, array $actorRuntimeIds,)
decodePayload(PacketSerializer $in)
handle(PacketHandlerInterface $handler)
putUnsignedVarInt(int $v)