Botcraft
1.21.4
Loading...
Searching...
No Matches
ClientboundServerDataPacket.hpp
Go to the documentation of this file.
1
#if PROTOCOL_VERSION > 758
/* > 1.18.2 */
2
#pragma once
3
4
#include <string>
5
6
#include "
protocolCraft/BaseMessage.hpp
"
7
#include "
protocolCraft/Types/Chat/Chat.hpp
"
8
9
namespace
ProtocolCraft
10
{
11
class
ClientboundServerDataPacket
:
public
BaseMessage
<ClientboundServerDataPacket>
12
{
13
public
:
14
static
constexpr
std::string_view
packet_name
=
"Server Data"
;
15
16
#if PROTOCOL_VERSION < 762
/* < 1.19.4 */
17
SERIALIZED_FIELD
(Motd, std::optional<Chat>);
18
#else
19
SERIALIZED_FIELD
(Motd,
Chat
);
20
#endif
21
#if PROTOCOL_VERSION < 762
/* < 1.19.4 */
22
SERIALIZED_FIELD
(IconBase64, std::optional<std::string>);
23
#else
24
SERIALIZED_FIELD
(IconBytes, std::optional<std::vector<unsigned char>>);
25
#endif
26
#if PROTOCOL_VERSION < 761
/* < 1.19.3 */
27
SERIALIZED_FIELD
(PreviewsChat,
bool
);
28
#endif
29
#if PROTOCOL_VERSION > 759
/* > 1.19 */
&& PROTOCOL_VERSION < 766
/* < 1.20.5 */
30
SERIALIZED_FIELD
(EnforcesSecureChat,
bool
);
31
#endif
32
33
DECLARE_READ_WRITE_SERIALIZE
;
34
};
35
}
//ProtocolCraft
36
#endif
SERIALIZED_FIELD
#define SERIALIZED_FIELD(Name,...)
Definition
AutoSerializedMacros.hpp:77
BaseMessage.hpp
Chat.hpp
ProtocolCraft::BaseMessage
Definition
BaseMessage.hpp:11
ProtocolCraft::Chat
Definition
Chat.hpp:18
ProtocolCraft::ClientboundServerDataPacket
Definition
ClientboundServerDataPacket.hpp:12
ProtocolCraft::ClientboundServerDataPacket::DECLARE_READ_WRITE_SERIALIZE
DECLARE_READ_WRITE_SERIALIZE
Definition
ClientboundServerDataPacket.hpp:33
ProtocolCraft::ClientboundServerDataPacket::SERIALIZED_FIELD
SERIALIZED_FIELD(IconBytes, std::optional< std::vector< unsigned char > >)
ProtocolCraft::ClientboundServerDataPacket::SERIALIZED_FIELD
SERIALIZED_FIELD(Motd, Chat)
ProtocolCraft::ClientboundServerDataPacket::packet_name
static constexpr std::string_view packet_name
Definition
ClientboundServerDataPacket.hpp:14
ProtocolCraft
Definition
ItemUtilities.hpp:8
protocolCraft
include
protocolCraft
Messages
Play
Clientbound
ClientboundServerDataPacket.hpp
Generated by
1.9.8