Botcraft 1.21.4
Loading...
Searching...
No Matches
ServerboundHelloPacket.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
7#endif
8
9namespace ProtocolCraft
10{
11 class ServerboundHelloPacket : public BaseMessage<ServerboundHelloPacket>
12 {
13 public:
14 static constexpr std::string_view packet_name = "Hello";
15
16#if PROTOCOL_VERSION < 759 /* < 1.19 */
17 SERIALIZED_FIELD(GameProfile, std::string);
18#elif PROTOCOL_VERSION < 760 /* < 1.19.1 */
19 SERIALIZED_FIELD(Name_, std::string);
20 SERIALIZED_FIELD(PublicKey, std::optional<ProfilePublicKey>);
21#elif PROTOCOL_VERSION < 761 /* < 1.19.3 */
22 SERIALIZED_FIELD(Name_, std::string);
23 SERIALIZED_FIELD(PublicKey, std::optional<ProfilePublicKey>);
24 SERIALIZED_FIELD(ProfileId, std::optional<UUID>);
25#elif PROTOCOL_VERSION < 764 /* < 1.20.2 */
26 SERIALIZED_FIELD(Name_, std::string);
27 SERIALIZED_FIELD(ProfileId, std::optional<UUID>);
28#else
29 SERIALIZED_FIELD(Name_, std::string);
31#endif
32
34 };
35} // ProtocolCraft
#define SERIALIZED_FIELD(Name,...)
static constexpr std::string_view packet_name
std::array< unsigned char, 16 > UUID