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
8
9namespace 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
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
34 };
35} //ProtocolCraft
36#endif
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD(IconBytes, std::optional< std::vector< unsigned char > >)