LeviLamina
Loading...
Searching...
No Matches
TickingArea.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/deps/game_refs/WeakRef.h"
8#include "mc/legacy/ActorUniqueID.h"
9#include "mc/platform/UUID.h"
10#include "mc/world/level/chunk/ChunkViewSource.h"
11#include "mc/world/level/ticking/ITickingArea.h"
12#include "mc/world/level/ticking/TickingAreaLoadMode.h"
13#include "mc/world/level/ticking/TickingAreaView.h"
14
15// auto generated forward declare list
16// clang-format off
17class Actor;
18class BlockSource;
19class Dimension;
21class LevelStorage;
22class Random;
23struct Bounds;
24struct Tick;
26// clang-format on
27
28class TickingArea : public ::ITickingArea {
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 16, ::mce::UUID> mUID;
33 ::ll::TypedStorage<8, 32, ::std::string> mName;
34 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mEntityId;
35 ::ll::TypedStorage<8, 16, ::std::optional<uint64>> mScope;
36 ::ll::TypedStorage<4, 4, float> mMaxDistToPlayers;
37 ::ll::TypedStorage<1, 1, bool> mAlwaysActive;
38 ::ll::TypedStorage<1, 1, bool> mEntityFound;
39 ::ll::TypedStorage<1, 1, bool> mSizeChanged;
40 ::ll::TypedStorage<1, 1, bool> mRemoved;
41 ::ll::TypedStorage<1, 1, bool> mIsDoneLoadingScoped;
42 ::ll::TypedStorage<1, 1, ::TickingAreaLoadMode> mLoadMode;
43 ::ll::TypedStorage<4, 12, ::Vec3> mLastChunkUpdatePos;
44 ::ll::TypedStorage<4, 12, ::Vec3> mLastPos;
45 ::ll::TypedStorage<4, 4, uint> mLastRadius;
46 ::ll::TypedStorage<8, 432, ::ChunkViewSource> mChunkSource;
47 ::ll::TypedStorage<8, 16, ::WeakRef<::BlockSource>> mBlockSource;
48 ::ll::TypedStorage<8, 32, ::TickingAreaView> mView;
49 // NOLINTEND
50
51public:
52 // prevent constructor by default
53 TickingArea();
54
55public:
56 // virtual functions
57 // NOLINTBEGIN
58 virtual ~TickingArea() /*override*/ = default;
59
60 virtual ::mce::UUID const& getId() const /*override*/;
61
62 virtual ::std::string const& getName() const /*override*/;
63
64 virtual ::ActorUniqueID const& getEntityId() const /*override*/;
65
66 virtual ::Bounds const getBoundsCopy() const /*override*/;
67
68 virtual bool isEntityOwned() const /*override*/;
69
70 virtual bool isAlwaysActive() const /*override*/;
71
72 virtual float getMaxDistToPlayers() const /*override*/;
73
74 virtual ::ITickingAreaView const& getView() const /*override*/;
75
76 virtual ::ITickingAreaView& getView() /*override*/;
77
78 virtual ::WeakRef<::BlockSource> const getBlockSource() const /*override*/;
79
80 virtual ::WeakRef<::BlockSource> getBlockSource() /*override*/;
81
82 virtual ::TickingAreaDescription getDescription() const /*override*/;
83
84 virtual ::TickingAreaLoadMode getLoadMode() const /*override*/;
85
86 virtual void setLoadMode(::TickingAreaLoadMode loadMode, ::LevelStorage& levelStorage) /*override*/;
87
88 virtual bool isPreloadDone() const /*override*/;
89
90 virtual void tick(::Tick const& currentTick, bool randomize) /*override*/;
91
92 virtual void tickSeasons(::Random& random) /*override*/;
93
94 virtual void updatePosition(::Vec3 const& pos) /*override*/;
95
96 virtual void updateAndCenter(::LevelStorage& levelStorage, ::Tick currentLevelTick) /*override*/;
97
98 virtual ::Actor* findOwner(uchar& pendingChunks) /*override*/;
99
100 virtual bool entityHasBeenFound() const /*override*/;
101
102 virtual void setEntityFound() /*override*/;
103
104 virtual bool isRemoved() /*override*/;
105
106 virtual void remove(::LevelStorage& levelStorage) /*override*/;
107
108 virtual void onComponentChanged(
109 uint radius,
110 float maxDistToPlayers,
111 bool alwaysActive,
112 ::LevelStorage& levelStorage
113 ) /*override*/;
114
115 virtual bool isScoped() const /*override*/;
116
117 virtual ::std::optional<uint64> const& getScope() const /*override*/;
118
119 virtual bool isDoneLoadingScoped() const /*override*/;
120
121 virtual bool isStandalone() const /*override*/;
122 // NOLINTEND
123
124public:
125 // member functions
126 // NOLINTBEGIN
127#ifdef LL_PLAT_S
128 MCAPI TickingArea(
129 ::Dimension& dimension,
130 ::mce::UUID uniqueId,
131 ::std::string const& name,
132 ::ActorUniqueID entityId,
133 ::Bounds const& bounds,
134 bool isCircle,
135 float maxDistToPlayers,
136 bool alwaysActive,
137 ::TickingAreaLoadMode loadMode
138 );
139#endif
140
141#ifdef LL_PLAT_C
142 MCAPI TickingArea(
143 ::Dimension& dimension,
144 ::mce::UUID uniqueId,
145 ::std::string const& name,
146 ::ActorUniqueID entityId,
147 ::Bounds const& bounds,
148 bool isCircle,
149 float maxDistToPlayers,
150 bool alwaysActive,
151 ::TickingAreaLoadMode loadMode
152 );
153#endif
154
155 MCAPI void _save(::LevelStorage& levelStorage);
156 // NOLINTEND
157
158public:
159 // constructor thunks
160 // NOLINTBEGIN
161#ifdef LL_PLAT_S
162 MCAPI void* $ctor(
163 ::Dimension& dimension,
164 ::mce::UUID uniqueId,
165 ::std::string const& name,
166 ::ActorUniqueID entityId,
167 ::Bounds const& bounds,
168 bool isCircle,
169 float maxDistToPlayers,
170 bool alwaysActive,
171 ::TickingAreaLoadMode loadMode
172 );
173#endif
174
175#ifdef LL_PLAT_C
176 MCAPI void* $ctor(
177 ::Dimension& dimension,
178 ::mce::UUID uniqueId,
179 ::std::string const& name,
180 ::ActorUniqueID entityId,
181 ::Bounds const& bounds,
182 bool isCircle,
183 float maxDistToPlayers,
184 bool alwaysActive,
185 ::TickingAreaLoadMode loadMode
186 );
187#endif
188 // NOLINTEND
189
190public:
191 // virtual function thunks
192 // NOLINTBEGIN
193 MCFOLD ::mce::UUID const& $getId() const;
194
195 MCFOLD ::std::string const& $getName() const;
196
197 MCFOLD ::ActorUniqueID const& $getEntityId() const;
198
199 MCAPI ::Bounds const $getBoundsCopy() const;
200
201 MCAPI bool $isEntityOwned() const;
202
203#ifdef LL_PLAT_S
204 MCAPI bool $isAlwaysActive() const;
205#else // LL_PLAT_C
206 MCFOLD bool $isAlwaysActive() const;
207#endif
208
209 MCAPI float $getMaxDistToPlayers() const;
210
211 MCAPI ::ITickingAreaView const& $getView() const;
212
213 MCAPI ::ITickingAreaView& $getView();
214
215 MCAPI ::WeakRef<::BlockSource> const $getBlockSource() const;
216
217 MCAPI ::WeakRef<::BlockSource> $getBlockSource();
218
219 MCAPI ::TickingAreaDescription $getDescription() const;
220
221 MCAPI ::TickingAreaLoadMode $getLoadMode() const;
222
223 MCAPI void $setLoadMode(::TickingAreaLoadMode loadMode, ::LevelStorage& levelStorage);
224
225 MCAPI bool $isPreloadDone() const;
226
227 MCAPI void $tick(::Tick const& currentTick, bool randomize);
228
229 MCAPI void $tickSeasons(::Random& random);
230
231 MCAPI void $updatePosition(::Vec3 const& pos);
232
233 MCAPI void $updateAndCenter(::LevelStorage& levelStorage, ::Tick currentLevelTick);
234
235 MCAPI ::Actor* $findOwner(uchar& pendingChunks);
236
237 MCAPI bool $entityHasBeenFound() const;
238
239 MCAPI void $setEntityFound();
240
241 MCAPI bool $isRemoved();
242
243 MCAPI void $remove(::LevelStorage& levelStorage);
244
245 MCAPI void
246 $onComponentChanged(uint radius, float maxDistToPlayers, bool alwaysActive, ::LevelStorage& levelStorage);
247
248 MCFOLD bool $isScoped() const;
249
250 MCFOLD ::std::optional<uint64> const& $getScope() const;
251
252 MCFOLD bool $isDoneLoadingScoped() const;
253
254 MCAPI bool $isStandalone() const;
255
256
257 // NOLINTEND
258};
Definition Actor.h:113
Definition BlockSource.h:71
Definition Dimension.h:86
Definition ITickingAreaView.h:17
Definition ITickingArea.h:24
Definition LevelStorage.h:25
Definition Random.h:10
Definition Vec3.h:10
Definition UUID.h:7
Definition ActorUniqueID.h:5
Definition Bounds.h:8
Definition Tick.h:5
Definition TickingAreaDescription.h:9