use pocketmine\network\mcpe\protocol\serializer\PacketSerializer; class ActorFallPacket extends DataPacket implements ServerboundPacket{ public const NETWORK_ID = ProtocolInfo::ACTOR_FALL_PACKET; /** @var int */ public $entityRuntimeId; /** @var float */ public $fallDistance; /** @var bool */ public $isInVoid; protected function decodePayload(PacketSerializer $in) : void{ $this->entityRuntimeId = $in->getEntityRuntimeId(); $this->fallDistance = $in->getLFloat(); $this->isInVoid = $in->getBool(); } protected function encodePayload(PacketSerializer $out) : void{ $out->putEntityRuntimeId($this->entityRuntimeId); $out->putLFloat($this->fallDistance); $out->putBool($this->isInVoid); } public function handle(PacketHandlerInterface $handler) : bool{ return $handler->handleActorFall($this); } }