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;
27 public const ACTION_ROW_RIGHT = 128;
28 public const ACTION_ROW_LEFT = 129;
31 public int $actorRuntimeId;
32 public float $float = 0.0;
34 public static function create(
int $actorRuntimeId,
int $actionId) :
self{
36 $result->actorRuntimeId = $actorRuntimeId;
37 $result->action = $actionId;
41 public static function boatHack(
int $actorRuntimeId,
int $actionId,
float $data) :
self{
42 $result = self::create($actorRuntimeId, $actionId);
43 $result->float = $data;
48 $this->action = $in->getVarInt();
50 if(($this->action & 0x80) !== 0){
56 $out->putVarInt($this->action);
57 $out->putActorRuntimeId($this->actorRuntimeId);
58 if(($this->action & 0x80) !== 0){
59 $out->putLFloat($this->
float);
64 return $handler->handleAnimate($this);