Botcraft 1.21.4
Loading...
Searching...
No Matches
ClientboundPlayerChatPacket.hpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 758 /* > 1.18.2 */
2#pragma once
3
4#include <vector>
5
7
8#if PROTOCOL_VERSION < 760 /* < 1.19.1 */
12#else
13#if PROTOCOL_VERSION < 761 /* < 1.19.3 */
15#else
18#endif
20#endif
21
22
23namespace ProtocolCraft
24{
25 class ClientboundPlayerChatPacket : public BaseMessage<ClientboundPlayerChatPacket>
26 {
27 public:
28 static constexpr std::string_view packet_name = "Player Chat";
29
30#if PROTOCOL_VERSION < 760 /* < 1.19.1 */
31 SERIALIZED_FIELD(SignedContent, Chat);
32 SERIALIZED_FIELD(UnsignedContent, std::optional<Chat>);
33 SERIALIZED_FIELD(TypeId, VarInt);
35 SERIALIZED_FIELD(Timestamp, long long int);
37#elif PROTOCOL_VERSION < 761 /* < 1.19.3 */
40#else
43 SERIALIZED_FIELD(Signature, std::optional<std::array<unsigned char, 256>>);
45 SERIALIZED_FIELD(UnsignedContent, std::optional<Chat>);
48#endif
49
51 };
52} //ProtocolCraft
53#endif
#define SERIALIZED_FIELD(Name,...)
SERIALIZED_FIELD(ChatType, ChatTypeBoundNetwork)
SERIALIZED_FIELD(Body, SignedMessageBody)
SERIALIZED_FIELD(UnsignedContent, std::optional< Chat >)
SERIALIZED_FIELD(FilterMask, ProtocolCraft::FilterMask)
SERIALIZED_FIELD(Signature, std::optional< std::array< unsigned char, 256 > >)
std::array< unsigned char, 16 > UUID