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