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