LeviLamina
Loading...
Searching...
No Matches
ChalkboardBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/legacy/ActorUniqueID.h"
7#include "mc/textobject/TextObjectRoot.h"
8#include "mc/world/level/BlockPos.h"
9#include "mc/world/level/block/actor/BlockActor.h"
10#include "mc/world/level/block/actor/ChalkboardSize.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
16class BlockSource;
17class CompoundTag;
18class DataLoadHelper;
19class ILevel;
20class ItemStack;
21class SaveContext;
22// clang-format on
23
24class ChalkboardBlockActor : public ::BlockActor {
25public:
26 // ChalkboardBlockActor inner types declare
27 // clang-format off
28 struct CachedLineData;
29 struct CachedMessageData;
30 struct ChalkboardFinder;
31 // clang-format on
32
33 // ChalkboardBlockActor inner types define
34 struct CachedLineData {
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 32, ::std::string> text;
39 ::ll::TypedStorage<4, 4, int> lineLength;
40 // NOLINTEND
41
42#ifdef LL_PLAT_S
43#else // LL_PLAT_C
44 public:
45 // prevent constructor by default
46 CachedLineData& operator=(CachedLineData const&);
47 CachedLineData(CachedLineData const&);
48
49#endif
50 public:
51 // member functions
52 // NOLINTBEGIN
53 MCAPI CachedLineData();
54
55#ifdef LL_PLAT_C
56 MCAPI CachedLineData(::ChalkboardBlockActor::CachedLineData&&);
57#endif
58
59 MCAPI ~CachedLineData();
60 // NOLINTEND
61
62 public:
63 // constructor thunks
64 // NOLINTBEGIN
65 MCFOLD void* $ctor();
66
67#ifdef LL_PLAT_C
68 MCFOLD void* $ctor(::ChalkboardBlockActor::CachedLineData&&);
69#endif
70 // NOLINTEND
71
72 public:
73 // destructor thunk
74 // NOLINTBEGIN
75 MCFOLD void $dtor();
76 // NOLINTEND
77 };
78
79 struct CachedMessageData {
80 public:
81 // member variables
82 // NOLINTBEGIN
83 ::ll::TypedStorage<8, 640, ::std::array<::ChalkboardBlockActor::CachedLineData, 16>> lineData;
84 ::ll::TypedStorage<4, 4, uint> numLines;
85 ::ll::TypedStorage<8, 32, ::std::string> filteredMessage;
86 ::ll::TypedStorage<8, 8, void const*> cachedFontCompare;
87 ::ll::TypedStorage<1, 1, bool> dirty;
88 // NOLINTEND
89
90#ifdef LL_PLAT_S
91#else // LL_PLAT_C
92 public:
93 // prevent constructor by default
94 CachedMessageData& operator=(CachedMessageData const&);
95 CachedMessageData(CachedMessageData const&);
96 CachedMessageData();
97
98#endif
99 public:
100 // member functions
101 // NOLINTBEGIN
102#ifdef LL_PLAT_C
103 MCAPI ::ChalkboardBlockActor::CachedMessageData& operator=(::ChalkboardBlockActor::CachedMessageData&&);
104
105 MCAPI ~CachedMessageData();
106#endif
107 // NOLINTEND
108
109 public:
110 // destructor thunk
111 // NOLINTBEGIN
112#ifdef LL_PLAT_C
113 MCAPI void $dtor();
114#endif
115 // NOLINTEND
116 };
117
119 public:
120 // member variables
121 // NOLINTBEGIN
122 ::ll::TypedStorage<1, 1, bool> mChunkFound;
123 ::ll::TypedStorage<8, 8, ::ChalkboardBlockActor*> mBoard;
124 // NOLINTEND
125
126 public:
127 // member functions
128 // NOLINTBEGIN
129 MCAPI bool confirmedBroken(::ChalkboardBlockActor& compare, ::BlockSource& region) const;
130 // NOLINTEND
131 };
132
133public:
134 // member variables
135 // NOLINTBEGIN
136 ::ll::TypedStorage<8, 32, ::std::string> mText;
137 ::ll::TypedStorage<8, 32, ::std::string> mTextObjectString;
138 ::ll::TypedStorage<8, 32, ::TextObjectRoot> mTextObjectMessage;
139 ::ll::TypedStorage<8, 696, ::ChalkboardBlockActor::CachedMessageData> mCachedMessage;
140 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mSiblings;
141 ::ll::TypedStorage<1, 1, bool> mShouldPersistFormatting;
142 ::ll::TypedStorage<4, 12, ::BlockPos> mBasePos;
143 ::ll::TypedStorage<1, 1, ::ChalkboardSize> mSize;
144 ::ll::TypedStorage<1, 1, bool> mIsOnGround;
145 ::ll::TypedStorage<1, 1, bool> mIsLocked;
146 ::ll::TypedStorage<1, 1, bool> mInitialized;
147 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mOwner;
148 // NOLINTEND
149
150public:
151 // prevent constructor by default
152 ChalkboardBlockActor();
153
154public:
155 // virtual functions
156 // NOLINTBEGIN
157 virtual ~ChalkboardBlockActor() /*override*/;
158
159 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
160
161 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
162
163 virtual void onChanged(::BlockSource& region) /*override*/;
164
165 virtual void tick(::BlockSource& region) /*override*/;
166
167 virtual ::std::string getImmersiveReaderText(::BlockSource& region) /*override*/;
168
169 virtual ::std::vector<::std::string> getUgcStrings(::CompoundTag const& tag) const /*override*/;
170
171 virtual void setUgcStrings(::CompoundTag& tag, ::std::vector<::std::string> const& list) const /*override*/;
172
173 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
174
175 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
176 // NOLINTEND
177
178public:
179 // member functions
180 // NOLINTBEGIN
181 MCAPI explicit ChalkboardBlockActor(::BlockPos const& pos);
182
183 MCAPI ::ChalkboardBlockActor* getBaseChalkboard(::BlockSource& region) const;
184
185 MCAPI ::std::string const& getText() const;
186
187#ifdef LL_PLAT_C
188 MCAPI ::ChalkboardBlockActor::CachedMessageData&
189 setCachedMessage(::ChalkboardBlockActor::CachedMessageData cachedMessage);
190#endif
191
192 MCAPI void setText(::std::string const& text);
193
194#ifdef LL_PLAT_C
195 MCAPI void setText(::std::string const& text, ::TextObjectRoot&& root);
196#endif
197
198 MCAPI void validate(::BlockSource& region);
199 // NOLINTEND
200
201public:
202 // static functions
203 // NOLINTBEGIN
204 MCAPI static ::ChalkboardBlockActor::ChalkboardFinder _findChalkboard(::BlockSource& region, ::BlockPos const& pos);
205
206 MCAPI static ::std::vector<::BlockPos>
207 calculateAllBlocks(::BlockPos const& basePos, ::ChalkboardSize boardSize, int dir);
208
209 MCAPI static bool canCreateChalkboard(
210 ::Actor* creator,
211 ::BlockSource& region,
212 ::BlockPos const& basePos,
213 ::ChalkboardSize boardSize,
214 uchar face,
215 int dir,
216 ::std::vector<::BlockPos>& occupiedBlocks,
217 ::ItemStack const& instance,
218 bool generateParticles
219 );
220
221 MCAPI static ::ChalkboardBlockActor* convertFromEntity(::BlockSource& region, ::CompoundTag const& tag);
222
223 MCAPI static ::ChalkboardBlockActor* createChalkboard(
224 ::Actor* creator,
225 ::BlockSource& region,
226 ::BlockPos const& basePos,
227 ::ChalkboardSize boardSize,
228 uchar face,
229 int dir,
230 bool isOnGround,
231 ::ItemStack const& instance,
232 ::std::string text
233 );
234 // NOLINTEND
235
236public:
237 // constructor thunks
238 // NOLINTBEGIN
239 MCAPI void* $ctor(::BlockPos const& pos);
240 // NOLINTEND
241
242public:
243 // destructor thunk
244 // NOLINTBEGIN
245 MCAPI void $dtor();
246 // NOLINTEND
247
248public:
249 // virtual function thunks
250 // NOLINTBEGIN
251 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
252
253 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
254
255 MCAPI void $onChanged(::BlockSource& region);
256
257 MCAPI void $tick(::BlockSource& region);
258
259 MCAPI ::std::string $getImmersiveReaderText(::BlockSource& region);
260
261 MCAPI ::std::vector<::std::string> $getUgcStrings(::CompoundTag const& tag) const;
262
263 MCAPI void $setUgcStrings(::CompoundTag& tag, ::std::vector<::std::string> const& list) const;
264
265 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
266
267 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
268
269
270 // NOLINTEND
271
272public:
273 // vftables
274 // NOLINTBEGIN
275 MCAPI static void** $vftable();
276 // NOLINTEND
277};
Definition Actor.h:106
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:19
Definition BlockSource.h:71
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:218
Definition ItemStack.h:26
Definition SaveContext.h:5
Definition TextObjectRoot.h:14
Definition ChalkboardBlockActor.h:34
Definition ChalkboardBlockActor.h:79
Definition ChalkboardBlockActor.h:118