Botcraft 1.21.4
Loading...
Searching...
No Matches
ClientboundHelloPacket.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace ProtocolCraft
6{
7 class ClientboundHelloPacket : public BaseMessage<ClientboundHelloPacket>
8 {
9 public:
10 static constexpr std::string_view packet_name = "Hello";
11
12 SERIALIZED_FIELD(ServerId, std::string);
13 SERIALIZED_FIELD(PublicKey, std::vector<unsigned char>);
14#if PROTOCOL_VERSION < 761 /* < 1.19.3 */
15 SERIALIZED_FIELD(Nonce, std::vector<unsigned char>);
16#endif
17#if PROTOCOL_VERSION > 760 /* > 1.19.2 */
18 SERIALIZED_FIELD(Challenge, std::vector<unsigned char>);
19#endif
20#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
21 SERIALIZED_FIELD(ShouldAuthenticate, bool);
22#endif
23
25 };
26}
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD(Challenge, std::vector< unsigned char >)
SERIALIZED_FIELD(ServerId, std::string)
static constexpr std::string_view packet_name
SERIALIZED_FIELD(PublicKey, std::vector< unsigned char >)
SERIALIZED_FIELD(ShouldAuthenticate, bool)