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