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