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