LeviLamina
Loading...
Searching...
No Matches
SignBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Color.h"
7#include "mc/deps/game_refs/WeakRef.h"
8#include "mc/deps/input/InputMode.h"
9#include "mc/input/NewInteractionModel.h"
10#include "mc/legacy/ActorUniqueID.h"
11#include "mc/network/packet/OpenSignPacket.h"
12#include "mc/platform/brstd/move_only_function.h"
13#include "mc/textobject/TextObjectRoot.h"
14#include "mc/world/level/block/actor/BlockActor.h"
15#include "mc/world/level/block/actor/BlockActorRendererId.h"
16#include "mc/world/level/block/actor/BlockActorType.h"
17#include "mc/world/level/block/actor/SignTextSide.h"
18
19// auto generated forward declare list
20// clang-format off
22class BlockPos;
23class BlockSource;
24class CompoundTag;
25class DataLoadHelper;
26class EntityContext;
27class ILevel;
28class Player;
29class SaveContext;
30// clang-format on
31
32class SignBlockActor : public ::BlockActor {
33public:
34 // SignBlockActor inner types declare
35 // clang-format off
36 struct CachedLineData;
37 struct CachedMessageData;
38 struct OpenSignRequest;
39 class Text;
40 // clang-format on
41
42 // SignBlockActor inner types define
43 struct CachedLineData {
44 public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<8, 32, ::std::string> text;
48 ::ll::TypedStorage<4, 4, int> lineLength;
49 // NOLINTEND
50
51#ifdef LL_PLAT_S
52 public:
53 // prevent constructor by default
54 CachedLineData& operator=(CachedLineData const&);
55 CachedLineData(CachedLineData const&);
56
57#else // LL_PLAT_C
58 public:
59 // prevent constructor by default
60 CachedLineData& operator=(CachedLineData const&);
61
62#endif
63 public:
64 // member functions
65 // NOLINTBEGIN
66 MCAPI CachedLineData();
67
68 MCAPI CachedLineData(::SignBlockActor::CachedLineData&&);
69
70#ifdef LL_PLAT_C
71 MCAPI CachedLineData(::SignBlockActor::CachedLineData const&);
72#endif
73
74 MCAPI ~CachedLineData();
75 // NOLINTEND
76
77 public:
78 // constructor thunks
79 // NOLINTBEGIN
80 MCFOLD void* $ctor();
81
82 MCFOLD void* $ctor(::SignBlockActor::CachedLineData&&);
83
84#ifdef LL_PLAT_C
85 MCAPI void* $ctor(::SignBlockActor::CachedLineData const&);
86#endif
87 // NOLINTEND
88
89 public:
90 // destructor thunk
91 // NOLINTBEGIN
92 MCFOLD void $dtor();
93 // NOLINTEND
94 };
95
96 struct CachedMessageData {
97 public:
98 // member variables
99 // NOLINTBEGIN
100 ::ll::TypedStorage<8, 160, ::SignBlockActor::CachedLineData[4]> lineData;
101 ::ll::TypedStorage<4, 4, uint> numLines;
102 ::ll::TypedStorage<8, 32, ::std::string> filteredMessage;
103 ::ll::TypedStorage<8, 8, void const*> cachedFontCompare;
104 ::ll::TypedStorage<1, 1, bool> dirty;
105 ::ll::TypedStorage<4, 4, ::InputMode> inputMode;
106 ::ll::TypedStorage<4, 4, ::NewInteractionModel> interactionModel;
107 // NOLINTEND
108
109#ifdef LL_PLAT_S
110#else // LL_PLAT_C
111 public:
112 // prevent constructor by default
113 CachedMessageData& operator=(CachedMessageData const&);
114 CachedMessageData(CachedMessageData const&);
115 CachedMessageData();
116
117#endif
118 public:
119 // member functions
120 // NOLINTBEGIN
121#ifdef LL_PLAT_C
122 MCAPI CachedMessageData(::SignBlockActor::CachedMessageData&&);
123
124 MCAPI ::SignBlockActor::CachedMessageData& operator=(::SignBlockActor::CachedMessageData&&);
125
126 MCAPI ~CachedMessageData();
127#endif
128 // NOLINTEND
129
130 public:
131 // constructor thunks
132 // NOLINTBEGIN
133#ifdef LL_PLAT_C
134 MCAPI void* $ctor(::SignBlockActor::CachedMessageData&&);
135#endif
136 // NOLINTEND
137
138 public:
139 // destructor thunk
140 // NOLINTBEGIN
141#ifdef LL_PLAT_C
142 MCAPI void $dtor();
143#endif
144 // NOLINTEND
145 };
146
148 public:
149 // member variables
150 // NOLINTBEGIN
151 ::ll::TypedStorage<1, 1, bool> mIsWaitingForChangeClear;
152 ::ll::TypedStorage<8, 72, ::OpenSignPacket> mOpenSignPacket;
153 ::ll::TypedStorage<8, 64, ::brstd::move_only_function<void(::OpenSignPacket&)>> mSendPacket;
154 // NOLINTEND
155
156 public:
157 // member functions
158 // NOLINTBEGIN
159 MCAPI ~OpenSignRequest();
160 // NOLINTEND
161
162 public:
163 // destructor thunk
164 // NOLINTBEGIN
165 MCAPI void $dtor();
166 // NOLINTEND
167 };
168
169 class Text {
170 public:
171 // Text inner types define
172 enum class LoadMode : int {
173 TextOnly = 0,
174 AllData = 1,
175 };
176
177 public:
178 // member variables
179 // NOLINTBEGIN
180 ::ll::TypedStorage<8, 32, ::std::string> mMessage;
181 ::ll::TypedStorage<8, 32, ::std::string> mFilteredMessage;
182 ::ll::TypedStorage<8, 32, ::TextObjectRoot> mTextObjectMessage;
183 ::ll::TypedStorage<8, 224, ::SignBlockActor::CachedMessageData> mCachedMessage;
184 ::ll::TypedStorage<4, 16, ::mce::Color> mSignTextColor;
185 ::ll::TypedStorage<1, 1, bool> mGlowing;
186 ::ll::TypedStorage<1, 1, bool> mHideGlowOutline;
187 ::ll::TypedStorage<1, 1, bool> mShouldPersistFormatting;
188 ::ll::TypedStorage<8, 32, ::std::string> mLastEditXuid;
189 ::ll::TypedStorage<8, 32, ::std::string> mTextObjectString;
190 // NOLINTEND
191
192#ifdef LL_PLAT_S
193 public:
194 // prevent constructor by default
195 Text& operator=(Text const&);
196 Text(Text const&);
197
198#else // LL_PLAT_C
199#endif
200 public:
201 // member functions
202 // NOLINTBEGIN
203 MCAPI Text();
204
205#ifdef LL_PLAT_S
206 MCAPI Text(::SignBlockActor::Text&&);
207#endif
208
209 MCAPI void _parseOldVersionText(::CompoundTag const& tag);
210
211 MCAPI void _parseOtherAttributes(::CompoundTag const& tag);
212
213 MCAPI void _parseText(::CompoundTag const& tag);
214
215 MCAPI ::std::string const& getMessage() const;
216
217 MCAPI void load(::CompoundTag const& tag, ::SignBlockActor::Text::LoadMode load);
218
219 MCAPI bool save(::CompoundTag& tag) const;
220
221 MCAPI void setEditedBy(::std::string const& playerXuid);
222
223 MCAPI void setMessage(::std::string message);
224
225 MCAPI void setMessage(::TextObjectRoot message);
226
227 MCAPI ~Text();
228 // NOLINTEND
229
230 public:
231 // static variables
232 // NOLINTBEGIN
233 MCAPI static ::std::add_lvalue_reference_t<char const[]> SIGN_PERSIST_FORMATTING_TAG();
234 // NOLINTEND
235
236 public:
237 // constructor thunks
238 // NOLINTBEGIN
239 MCAPI void* $ctor();
240
241#ifdef LL_PLAT_S
242 MCAPI void* $ctor(::SignBlockActor::Text&&);
243#endif
244 // NOLINTEND
245
246 public:
247 // destructor thunk
248 // NOLINTBEGIN
249 MCAPI void $dtor();
250 // NOLINTEND
251 };
252
253public:
254 // member variables
255 // NOLINTBEGIN
256 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SignBlockActor::Text>> mTextFront;
257 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SignBlockActor::Text>> mTextBack;
258 ::ll::TypedStorage<1, 1, bool> mIsWaxed;
259 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mLockedForEditingBy;
260 ::ll::TypedStorage<8, 152, ::std::optional<::SignBlockActor::OpenSignRequest>> mOpenSignRequest;
261 ::ll::TypedStorage<1, 1, bool> mIsRemoteProfanityFilterEnabled;
262 ::ll::TypedStorage<1, 1, bool> mIsLocalProfanityFilterEnabled;
263 // NOLINTEND
264
265#ifdef LL_PLAT_S
266public:
267 // prevent constructor by default
269
270#else // LL_PLAT_C
271#endif
272public:
273 // virtual functions
274 // NOLINTBEGIN
275 virtual ~SignBlockActor() /*override*/;
276
277 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
278
279 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
280
281 virtual void onChanged(::BlockSource& region) /*override*/;
282
283 virtual float getShadowRadius(::BlockSource& region) const /*override*/;
284
285 virtual ::std::string getImmersiveReaderText(::BlockSource& region) /*override*/;
286
287 virtual void tick(::BlockSource& region) /*override*/;
288
289 virtual ::std::vector<::std::string> getUgcStrings(::CompoundTag const& tag) const /*override*/;
290
291 virtual ::std::vector<::std::string> getFilteredUgcStrings(::CompoundTag const& tag) const /*override*/;
292
293 virtual void setUgcStrings(::CompoundTag& tag, ::std::vector<::std::string> const& list) const /*override*/;
294
295 virtual void setFilteredUgcStrings(::CompoundTag& tag, ::std::vector<::std::string> const& list) const /*override*/;
296
297 virtual bool validateData(::CompoundTag const& tag) const /*override*/;
298
299 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
300
301 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
302
303 virtual bool _playerCanUpdate(::Player const& fromPlayer) const /*override*/;
304 // NOLINTEND
305
306public:
307 // member functions
308 // NOLINTBEGIN
309#ifdef LL_PLAT_S
310 MCAPI SignBlockActor(::BlockPos const& pos, ::BlockActorType blockActorType, ::BlockActorRendererId rendererId);
311#endif
312
313 MCAPI bool _tryLoadR13Data(::CompoundTag const& tag, ::SignBlockActor::Text& frontText);
314
315 MCAPI void _updateTextFromClient(::CompoundTag const& data, ::BlockSource const& region);
316
317 MCAPI ::SignTextSide getSideFacingPlayer(::Player const& player) const;
318
319 MCAPI void
320 requestToSendOpenSignPacket(::WeakRef<::EntityContext> entityRef, ::BlockPos const& position, bool isFrontSide);
321
322#ifdef LL_PLAT_C
323 MCAPI void setCachedMessage(::SignTextSide side, ::SignBlockActor::CachedMessageData cachedMessage);
324
325 MCAPI void setMessage(::SignTextSide side, ::std::string message);
326#endif
327
328 MCAPI void setMessageForServerScripingOnly(::SignTextSide side, ::std::string message, ::std::string ownerID);
329
330 MCAPI void setMessageForServerScripingOnly(::SignTextSide side, ::TextObjectRoot message, ::std::string ownerID);
331 // NOLINTEND
332
333public:
334 // constructor thunks
335 // NOLINTBEGIN
336#ifdef LL_PLAT_S
337 MCAPI void* $ctor(::BlockPos const& pos, ::BlockActorType blockActorType, ::BlockActorRendererId rendererId);
338#endif
339 // NOLINTEND
340
341public:
342 // destructor thunk
343 // NOLINTBEGIN
344 MCAPI void $dtor();
345 // NOLINTEND
346
347public:
348 // virtual function thunks
349 // NOLINTBEGIN
350 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
351
352 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
353
354 MCFOLD void $onChanged(::BlockSource& region);
355
356 MCAPI float $getShadowRadius(::BlockSource& region) const;
357
358 MCAPI ::std::string $getImmersiveReaderText(::BlockSource& region);
359
360 MCAPI void $tick(::BlockSource& region);
361
362 MCAPI ::std::vector<::std::string> $getUgcStrings(::CompoundTag const& tag) const;
363
364 MCAPI ::std::vector<::std::string> $getFilteredUgcStrings(::CompoundTag const& tag) const;
365
366 MCAPI void $setUgcStrings(::CompoundTag& tag, ::std::vector<::std::string> const& list) const;
367
368 MCAPI void $setFilteredUgcStrings(::CompoundTag& tag, ::std::vector<::std::string> const& list) const;
369
370 MCAPI bool $validateData(::CompoundTag const& tag) const;
371
372 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
373
374 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
375
376 MCAPI bool $_playerCanUpdate(::Player const& fromPlayer) const;
377
378
379 // NOLINTEND
380
381public:
382 // vftables
383 // NOLINTBEGIN
384 MCAPI static void** $vftable();
385 // NOLINTEND
386};
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:19
Definition BlockSource.h:71
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition EntityContext.h:16
Definition ILevel.h:218
Definition OpenSignPacket.h:19
Definition Player.h:129
Definition SaveContext.h:5
Definition SignBlockActor.h:169
Definition SignBlockActor.h:32
Definition TextObjectRoot.h:14
Definition WeakRef.h:8
Definition move_only_function.h:9
Definition SignBlockActor.h:43
Definition SignBlockActor.h:96
Definition SignBlockActor.h:147