LeviLamina
Loading...
Searching...
No Matches
TextPacketPayload.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/network/packet/TextPacketType.h"
7
8// auto generated forward declare list
9// clang-format off
11class TextPacket;
12// clang-format on
13
14struct TextPacketPayload {
15public:
16 // TextPacketPayload inner types declare
17 // clang-format off
18 struct AuthorAndMessage;
19 struct MessageAndParams;
20 struct MessageOnly;
21 // clang-format on
22
23 // TextPacketPayload inner types define
24 struct AuthorAndMessage {
25 public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<1, 1, ::TextPacketType> mType;
29 ::ll::TypedStorage<8, 32, ::std::string> mAuthor;
30 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
31 // NOLINTEND
32
33 public:
34 AuthorAndMessage& operator=(AuthorAndMessage const&) = default;
35 AuthorAndMessage(AuthorAndMessage const&) = default;
36 AuthorAndMessage() = default;
37 AuthorAndMessage(TextPacketType type, std::string const& author, std::string const& message)
38 : mType(type),
39 mAuthor(author),
40 mMessage(message) {}
41
42 public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI ::TextPacketPayload::AuthorAndMessage& operator=(::TextPacketPayload::AuthorAndMessage&&);
46 // NOLINTEND
47 };
48
49 struct MessageAndParams {
50 public:
51 // member variables
52 // NOLINTBEGIN
53 ::ll::TypedStorage<1, 1, ::TextPacketType> mType;
54 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
55 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mParams;
56 // NOLINTEND
57
58 public:
59 MessageAndParams(TextPacketType type, std::string const& message, std::vector<std::string> const& params)
60 : mType(type),
61 mMessage(message),
62 mParams(params) {}
63
64 public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI bool operator==(::TextPacketPayload::MessageAndParams const& other) const;
68 // NOLINTEND
69 };
70
71 struct MessageOnly {
72 public:
73 // member variables
74 // NOLINTBEGIN
75 ::ll::TypedStorage<1, 1, ::TextPacketType> mType;
76 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
77 // NOLINTEND
78 };
79
80public:
81 // member variables
82 // NOLINTBEGIN
83 ::ll::TypedStorage<1, 1, bool> mLocalize;
84 ::ll::TypedStorage<8, 32, ::std::string> mXuid;
85 ::ll::TypedStorage<8, 32, ::std::string> mPlatformId;
86 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mFilteredMessage;
87 ::ll::TypedStorage<
88 8,
89 80,
90 ::std::variant<
94 mBody;
95 // NOLINTEND
96
97public:
98 // prevent constructor by default
99 TextPacketPayload& operator=(TextPacketPayload const&);
100 TextPacketPayload(TextPacketPayload const&);
101 TextPacketPayload();
102
103public:
104 // member functions
105 // NOLINTBEGIN
106 MCAPI ::TextPacketPayload& operator=(::TextPacketPayload&&);
107
108 MCAPI ~TextPacketPayload();
109 // NOLINTEND
110
111public:
112 // static functions
113 // NOLINTBEGIN
114 MCAPI static ::TextPacket createAnnouncement(
115 ::std::string const& author,
116 ::std::string const& message,
117 ::std::optional<::std::string> filteredMessage,
118 ::std::string const& xuid,
119 ::std::string const& platformId
120 );
121
122 MCAPI static ::TextPacket createChat(
123 ::std::string const& author,
124 ::std::string const& message,
125 ::std::optional<::std::string> filteredMessage,
126 ::std::string const& xuid,
127 ::std::string const& platformId
128 );
129
130 MCAPI static ::TextPacket
131 createJukeboxPopup(::std::string const& message, ::std::vector<::std::string> const& params);
132
133#ifdef LL_PLAT_C
134 MCAPI static ::TextPacket createRaw(::std::string const& raw);
135#endif
136
137 MCAPI static ::TextPacket createRawJsonObjectMessage(::std::string const& rawJson);
138
139 MCAPI static ::TextPacket createSystemMessage(::std::string const& message);
140
141 MCAPI static ::TextPacket createTextObjectMessage(
142 ::ResolvedTextObject const& resolvedTextObject,
143 ::std::string fromXuid,
144 ::std::string fromPlatformId
145 );
146
147 MCAPI static ::TextPacket createTextObjectWhisperMessage(
148 ::std::string const& message,
149 ::std::string const& xuid,
150 ::std::string const& platformId
151 );
152
153 MCAPI static ::TextPacket createTextObjectWhisperMessage(
154 ::ResolvedTextObject const& resolvedTextObject,
155 ::std::string const& xuid,
156 ::std::string const& platformId
157 );
158
159 MCAPI static ::TextPacket
160 createTranslated(::std::string const& message, ::std::vector<::std::string> const& params);
161
162 MCAPI static ::TextPacket createTranslatedAnnouncement(
163 ::std::string const& author,
164 ::std::string const& message,
165 ::std::string const& xuid,
166 ::std::string const& platformId
167 );
168
169 MCAPI static ::TextPacket createTranslatedChat(
170 ::std::string const& author,
171 ::std::string const& message,
172 ::std::string const& xuid,
173 ::std::string const& platformId
174 );
175
176 MCAPI static ::TextPacket createWhisper(
177 ::std::string const& author,
178 ::std::string const& message,
179 ::std::optional<::std::string> filteredMessage,
180 ::std::string const& xuid,
181 ::std::string const& platformId
182 );
183 // NOLINTEND
184
185public:
186 // destructor thunk
187 // NOLINTBEGIN
188 MCAPI void $dtor();
189 // NOLINTEND
190};
Definition ResolvedTextObject.h:5
Definition TextPacket.h:19
Definition TextPacketPayload.h:24
Definition TextPacketPayload.h:49
Definition TextPacketPayload.h:71