20 public const NETWORK_ID = ProtocolInfo::ANIMATE_PACKET;
22 public const ACTION_SWING_ARM = 1;
24 public const ACTION_STOP_SLEEP = 3;
25 public const ACTION_CRITICAL_HIT = 4;
26 public const ACTION_MAGICAL_CRITICAL_HIT = 5;
29 public int $actorRuntimeId;
30 public float $float = 0.0;
32 public static function create(
int $actorRuntimeId,
int $actionId) :
self{
34 $result->actorRuntimeId = $actorRuntimeId;
35 $result->action = $actionId;
39 public static function boatHack(
int $actorRuntimeId,
int $actionId,
float $data) :
self{
40 $result = self::create($actorRuntimeId, $actionId);
41 $result->float = $data;
46 $this->action = $in->getVarInt();
48 if(($this->action & 0x80) !== 0){
54 $out->putVarInt($this->action);
55 $out->putActorRuntimeId($this->actorRuntimeId);
56 if(($this->action & 0x80) !== 0){
57 $out->putLFloat($this->
float);
62 return $handler->handleAnimate($this);