Botcraft
1.21.4
Loading...
Searching...
No Matches
ServerboundHelloPacket.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
protocolCraft/BaseMessage.hpp
"
4
5
#if PROTOCOL_VERSION > 758
/* > 1.18.2 */
6
#include "
protocolCraft/Types/GameProfile/ProfilePublicKey.hpp
"
7
#endif
8
9
namespace
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);
30
SERIALIZED_FIELD
(ProfileId,
UUID
);
31
#endif
32
33
DECLARE_READ_WRITE_SERIALIZE
;
34
};
35
}
// ProtocolCraft
SERIALIZED_FIELD
#define SERIALIZED_FIELD(Name,...)
Definition
AutoSerializedMacros.hpp:77
BaseMessage.hpp
ProfilePublicKey.hpp
ProtocolCraft::BaseMessage
Definition
BaseMessage.hpp:11
ProtocolCraft::GameProfile
Definition
GameProfile.hpp:13
ProtocolCraft::ServerboundHelloPacket
Definition
ServerboundHelloPacket.hpp:12
ProtocolCraft::ServerboundHelloPacket::DECLARE_READ_WRITE_SERIALIZE
DECLARE_READ_WRITE_SERIALIZE
Definition
ServerboundHelloPacket.hpp:33
ProtocolCraft::ServerboundHelloPacket::SERIALIZED_FIELD
SERIALIZED_FIELD(ProfileId, UUID)
ProtocolCraft::ServerboundHelloPacket::packet_name
static constexpr std::string_view packet_name
Definition
ServerboundHelloPacket.hpp:14
ProtocolCraft::ServerboundHelloPacket::SERIALIZED_FIELD
SERIALIZED_FIELD(Name_, std::string)
ProtocolCraft
Definition
ItemUtilities.hpp:8
ProtocolCraft::UUID
std::array< unsigned char, 16 > UUID
Definition
BinaryReadWrite.hpp:20
protocolCraft
include
protocolCraft
Messages
Login
Serverbound
ServerboundHelloPacket.hpp
Generated by
1.9.8