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