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;
12namespace PlayerCapabilities { struct IPlayerData; }
13namespace PlayerCapabilities { struct ISharedController; }
14// clang-format on
15
16struct TextPacketPayload {
17public:
18 // TextPacketPayload inner types declare
19 // clang-format off
20 struct AuthorAndMessage;
21 struct MessageAndParams;
22 struct MessageOnly;
23 // clang-format on
24
25 // TextPacketPayload inner types define
26 struct AuthorAndMessage {
27 public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<1, 1, ::TextPacketType> mType;
31 ::ll::TypedStorage<8, 32, ::std::string> mAuthor;
32 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
33 // NOLINTEND
34
35 public:
36 AuthorAndMessage& operator=(AuthorAndMessage const&) = default;
37 AuthorAndMessage() = default;
38 AuthorAndMessage(TextPacketType type, std::string const& author, std::string const& message)
39 : mType(type),
40 mAuthor(author),
41 mMessage(message) {}
42
43 public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI AuthorAndMessage(::TextPacketPayload::AuthorAndMessage const&);
47
48 MCAPI ::TextPacketPayload::AuthorAndMessage& operator=(::TextPacketPayload::AuthorAndMessage&&);
49 // NOLINTEND
50
51 public:
52 // constructor thunks
53 // NOLINTBEGIN
54 MCAPI void* $ctor(::TextPacketPayload::AuthorAndMessage const&);
55 // NOLINTEND
56 };
57
58 struct MessageAndParams {
59 public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<1, 1, ::TextPacketType> mType;
63 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
64 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mParams;
65 // NOLINTEND
66
67 public:
68 MessageAndParams& operator=(MessageAndParams const&) = default;
69 MessageAndParams() = default;
70 MessageAndParams(TextPacketType type, std::string const& message, std::vector<std::string> const& params)
71 : mType(type),
72 mMessage(message),
73 mParams(params) {}
74
75 public:
76 // member functions
77 // NOLINTBEGIN
78 MCAPI MessageAndParams(::TextPacketPayload::MessageAndParams const&);
79
80 MCAPI bool operator==(::TextPacketPayload::MessageAndParams const& other) const;
81 // NOLINTEND
82
83 public:
84 // constructor thunks
85 // NOLINTBEGIN
86 MCFOLD void* $ctor(::TextPacketPayload::MessageAndParams const&);
87 // NOLINTEND
88 };
89
90 struct MessageOnly {
91 public:
92 // member variables
93 // NOLINTBEGIN
94 ::ll::TypedStorage<1, 1, ::TextPacketType> mType;
95 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
96 // NOLINTEND
97 };
98
99public:
100 // member variables
101 // NOLINTBEGIN
102 ::ll::TypedStorage<1, 1, bool> mLocalize;
103 ::ll::TypedStorage<8, 32, ::std::string> mXuid;
104 ::ll::TypedStorage<8, 32, ::std::string> mPlatformId;
105 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mFilteredMessage;
106 ::ll::TypedStorage<
107 8,
108 80,
109 ::std::variant<
113 mBody;
114 // NOLINTEND
115
116public:
117 // prevent constructor by default
118 TextPacketPayload();
119
120public:
121 // member functions
122 // NOLINTBEGIN
123 MCAPI TextPacketPayload(::TextPacketPayload const&);
124
125 MCAPI ::std::string const& getAuthorOrEmpty() const;
126
127 MCAPI ::std::string const& getMessage() const;
128
129#ifdef LL_PLAT_C
130 MCAPI ::std::vector<::std::string> const& getParams() const;
131#endif
132
133 MCAPI ::TextPacketType getType() const;
134
135 MCAPI ::TextPacketPayload& operator=(::TextPacketPayload&&);
136
137 MCAPI ::TextPacketPayload& operator=(::TextPacketPayload const&);
138
139 MCAPI ~TextPacketPayload();
140 // NOLINTEND
141
142public:
143 // static functions
144 // NOLINTBEGIN
145 MCAPI static bool const _shouldHandleTextPacketForPlayer(
147 ::PlayerCapabilities::ISharedController const& sharedController
148 );
149
150 MCAPI static ::TextPacket createAnnouncement(
151 ::std::string const& author,
152 ::std::string const& message,
153 ::std::optional<::std::string> filteredMessage,
154 ::std::string const& xuid,
155 ::std::string const& platformId
156 );
157
158 MCAPI static ::TextPacket createChat(
159 ::std::string const& author,
160 ::std::string const& message,
161 ::std::optional<::std::string> filteredMessage,
162 ::std::string const& xuid,
163 ::std::string const& platformId
164 );
165
166 MCAPI static ::TextPacket
167 createJukeboxPopup(::std::string const& message, ::std::vector<::std::string> const& params);
168
169#ifdef LL_PLAT_C
170 MCAPI static ::TextPacket createRaw(::std::string const& raw);
171#endif
172
173 MCAPI static ::TextPacket createRawJsonObjectMessage(::std::string const& rawJson);
174
175 MCAPI static ::TextPacket createSystemMessage(::std::string const& message);
176
177 MCAPI static ::TextPacket createTextObjectMessage(
178 ::ResolvedTextObject const& resolvedTextObject,
179 ::std::string fromXuid,
180 ::std::string fromPlatformId
181 );
182
183 MCAPI static ::TextPacket createTextObjectWhisperMessage(
184 ::std::string const& message,
185 ::std::string const& xuid,
186 ::std::string const& platformId
187 );
188
189 MCAPI static ::TextPacket createTextObjectWhisperMessage(
190 ::ResolvedTextObject const& resolvedTextObject,
191 ::std::string const& xuid,
192 ::std::string const& platformId
193 );
194
195 MCAPI static ::TextPacket
196 createTranslated(::std::string const& message, ::std::vector<::std::string> const& params);
197
198 MCAPI static ::TextPacket createTranslatedAnnouncement(
199 ::std::string const& author,
200 ::std::string const& message,
201 ::std::string const& xuid,
202 ::std::string const& platformId
203 );
204
205 MCAPI static ::TextPacket createTranslatedChat(
206 ::std::string const& author,
207 ::std::string const& message,
208 ::std::string const& xuid,
209 ::std::string const& platformId
210 );
211
212 MCAPI static ::TextPacket createWhisper(
213 ::std::string const& author,
214 ::std::string const& message,
215 ::std::optional<::std::string> filteredMessage,
216 ::std::string const& xuid,
217 ::std::string const& platformId
218 );
219 // NOLINTEND
220
221public:
222 // constructor thunks
223 // NOLINTBEGIN
224 MCAPI void* $ctor(::TextPacketPayload const&);
225 // NOLINTEND
226
227public:
228 // destructor thunk
229 // NOLINTBEGIN
230 MCAPI void $dtor();
231 // NOLINTEND
232};
Definition ResolvedTextObject.h:10
Definition TextPacket.h:19
Definition IPlayerData.h:10
Definition ISharedController.h:12
Definition TextPacketPayload.h:26
Definition TextPacketPayload.h:58
Definition TextPacketPayload.h:90