Skip to content
LeviMC
English
AutoLightDark
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
128 ::Dimension& dimension,
129 ::mce::UUID uniqueId,
130 ::std::string const& name,
131 ::ActorUniqueID entityId,
132 ::Bounds const& bounds,
133 bool isCircle,
134 float maxDistToPlayers,
135 bool alwaysActive,
136 ::TickingAreaLoadMode loadMode
137 );
138
139 MCNAPI void _save(::LevelStorage& levelStorage);
140 // NOLINTEND
141
142public:
143 // constructor thunks
144 // NOLINTBEGIN
145 MCNAPI void* $ctor(
146 ::Dimension& dimension,
147 ::mce::UUID uniqueId,
148 ::std::string const& name,
149 ::ActorUniqueID entityId,
150 ::Bounds const& bounds,
151 bool isCircle,
152 float maxDistToPlayers,
153 bool alwaysActive,
154 ::TickingAreaLoadMode loadMode
155 );
156 // NOLINTEND
157
158public:
159 // virtual function thunks
160 // NOLINTBEGIN
161 MCNAPI ::mce::UUID const& $getId() const;
162
163 MCNAPI ::std::string const& $getName() const;
164
165 MCNAPI ::ActorUniqueID const& $getEntityId() const;
166
167 MCNAPI ::Bounds const $getBoundsCopy() const;
168
169 MCNAPI bool $isEntityOwned() const;
170
171 MCNAPI bool $isAlwaysActive() const;
172
173 MCNAPI float $getMaxDistToPlayers() const;
174
175 MCNAPI ::ITickingAreaView const& $getView() const;
176
177 MCNAPI ::ITickingAreaView& $getView();
178
179 MCNAPI ::WeakRef<::BlockSource> const $getBlockSource() const;
180
181 MCNAPI ::WeakRef<::BlockSource> $getBlockSource();
182
183 MCNAPI ::TickingAreaDescription $getDescription() const;
184
185 MCNAPI ::TickingAreaLoadMode $getLoadMode() const;
186
187 MCNAPI void $setLoadMode(::TickingAreaLoadMode loadMode, ::LevelStorage& levelStorage);
188
189 MCNAPI bool $isPreloadDone() const;
190
191 MCNAPI void $tick(::Tick const& currentTick, bool randomize);
192
193 MCNAPI void $tickSeasons(::Random& random);
194
195 MCNAPI void $updatePosition(::Vec3 const& pos);
196
197 MCNAPI void $updateAndCenter(::LevelStorage& levelStorage, ::Tick currentLevelTick);
198
199 MCNAPI ::Actor* $findOwner(uchar& pendingChunks);
200
201 MCNAPI bool $entityHasBeenFound() const;
202
203 MCNAPI void $setEntityFound();
204
205 MCNAPI bool $isRemoved();
206
207 MCNAPI void $remove(::LevelStorage& levelStorage);
208
209 MCNAPI void
210 $onComponentChanged(uint radius, float maxDistToPlayers, bool alwaysActive, ::LevelStorage& levelStorage);
211
212 MCNAPI bool $isScoped() const;
213
214 MCNAPI ::std::optional<uint64> const& $getScope() const;
215
216 MCNAPI bool $isDoneLoadingScoped() const;
217
218 MCNAPI bool $isStandalone() const;
219
220
221 // NOLINTEND
222};
Definition Actor.h:116
Definition BlockSource.h:72
Definition Dimension.h:86
Definition ITickingAreaView.h:17
Definition ITickingArea.h:24
Definition LevelStorage.h:26
Definition Random.h:10
MCAPI bool $isStandalone() const
MCAPI bool $isEntityOwned() const
MCAPI void $setEntityFound()
MCAPI::ITickingAreaView const & $getView() const
MCAPI void $updateAndCenter(::LevelStorage &levelStorage, ::Tick currentLevelTick)
MCAPI ::WeakRef<::BlockSource > $getBlockSource()
MCAPI bool $isDoneLoadingScoped() const
MCAPI bool $isAlwaysActive() const
MCAPI::Actor * $findOwner(uchar &pendingChunks)
MCAPI void $updatePosition(::Vec3 const &pos)
MCAPI float $getMaxDistToPlayers() const
MCAPI bool $isRemoved()
MCAPI::mce::UUID const & $getId() const
MCAPI void $remove(::LevelStorage &levelStorage)
MCAPI void $tickSeasons(::Random &random)
MCAPI void * $ctor(::Dimension &dimension, ::mce::UUID uniqueId, ::std::string const &name, ::ActorUniqueID entityId, ::Bounds const &bounds, bool isCircle, float maxDistToPlayers, bool alwaysActive, ::TickingAreaLoadMode loadMode)
MCAPI::ActorUniqueID const & $getEntityId() const
MCAPI::Bounds const $getBoundsCopy() const
MCAPI::TickingAreaLoadMode $getLoadMode() const
MCAPI bool $entityHasBeenFound() const
MCAPI bool $isPreloadDone() const
MCAPI void $tick(::Tick const &currentTick, bool randomize)
MCAPI ::WeakRef<::BlockSource > const $getBlockSource() const
MCAPI ::std::optional< uint64 > const & $getScope() const
MCAPI::TickingAreaDescription $getDescription() const
MCAPI void $onComponentChanged(uint radius, float maxDistToPlayers, bool alwaysActive, ::LevelStorage &levelStorage)
MCAPI::std::string const & $getName() const
MCAPI::ITickingAreaView & $getView()
MCAPI bool $isScoped() const
MCAPI void _save(::LevelStorage &levelStorage)
MCAPI TickingArea(::Dimension &dimension, ::mce::UUID uniqueId, ::std::string const &name, ::ActorUniqueID entityId, ::Bounds const &bounds, bool isCircle, float maxDistToPlayers, bool alwaysActive, ::TickingAreaLoadMode loadMode)
MCAPI void $setLoadMode(::TickingAreaLoadMode loadMode, ::LevelStorage &levelStorage)
Definition Vec3.h:10
Definition UUID.h:8
Definition ActorUniqueID.h:5
Definition Bounds.h:8
Definition Tick.h:5
Definition TickingAreaDescription.h:9