LeviLamina
Loading...
Searching...
No Matches
TickingAreasManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/AutomaticID.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/world/level/ticking/AddTickingAreaStatus.h"
9#include "mc/world/level/ticking/TickingAreaLoadMode.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BlockPos;
15class CompoundTag;
16class Dimension;
19class Level;
20class LevelStorage;
21class TickingAreaList;
22struct ActorUniqueID;
23struct Bounds;
24struct PendingArea;
26// clang-format on
27
29public:
30 // TickingAreasManager inner types define
31 enum class AreaLimitCheck : int {
32 None = 0,
33 ActiveStandalone = 1,
34 ActiveAndPendingStandalone = 2,
35 };
36
37public:
38 // member variables
39 // NOLINTBEGIN
46 // NOLINTEND
47
48public:
49 // prevent constructor by default
53
54public:
55 // member functions
56 // NOLINTBEGIN
58
59 MCAPI ::AddTickingAreaStatus _addArea(
60 ::DimensionType dimensionId,
61 ::std::string const& name,
62 ::Bounds const& bounds,
63 bool isCircle,
64 ::TickingAreasManager::AreaLimitCheck limitCheck,
65 bool isPersistent,
66 ::TickingAreaLoadMode loadMode,
67 ::LevelStorage& levelStorage
68 );
69
70 MCAPI void _deletePendingArea(::LevelStorage& levelStorage, ::PendingArea const& pendingArea);
71
72 MCAPI ::std::string _findUsableDefaultName(
73 ::TickingAreaList const& tickingAreaList,
74 ::std::vector<::PendingArea> const& pendingAreas
75 ) const;
76
77 MCAPI ::std::vector<::TickingAreaDescription> _getPendingAreaDescriptionsFiltered(
78 ::DimensionType dimensionId,
79 ::std::function<bool(::PendingArea const&)> includeInList
80 ) const;
81
82 MCAPI bool
83 _hasPendingTickingAreaNamed(::std::string const& name, ::std::vector<::PendingArea> const& dimensionAreas) const;
84
85 MCAPI void _postReloadActorAdded(::Actor& actor);
86
87 MCAPI void _processAdds(::Level& level);
88
89 MCAPI void
90 _processRemoves(::DimensionType dimensionId, ::TickingAreaList& list, ::Level& level, ::LevelStorage& levelStorage);
91
92 MCAPI void
93 _savePendingArea(::LevelStorage& levelStorage, ::DimensionType dimensionId, ::PendingArea const& pendingArea);
94
95 MCAPI ::AddTickingAreaStatus addArea(
96 ::DimensionType dimensionId,
97 ::std::string const& name,
98 ::BlockPos const& min,
99 ::BlockPos const& max,
100 ::TickingAreasManager::AreaLimitCheck limitCheck,
101 bool isPersistent,
102 ::TickingAreaLoadMode loadMode,
103 ::LevelStorage& levelStorage
104 );
105
106 MCAPI void addEntityArea(::DimensionType dimensionId, ::Actor const& actor, ::LevelStorage& levelStorage);
107
108 MCAPI void addEntityArea(
109 ::DimensionType dimensionId,
110 ::ActorUniqueID const& entityId,
111 ::Bounds const& bounds,
112 bool alwaysActive,
113 float maxDistToPlayers,
114 ::LevelStorage& levelStorage
115 );
116
117 MCAPI uint countActiveStandaloneTickingAreas() const;
118
119 MCAPI uint countStandaloneTickingAreas() const;
120
121 MCAPI void loadArea(::std::string const& key, ::CompoundTag const* tag);
122
123 MCAPI void onTickingEntityAdded(::DimensionType dimensionId, ::Actor& actor, ::LevelStorage& levelStorage);
124
125 MCAPI void registerForActorManagerEvents(::IActorManagerConnector& actorManagerConnector);
126
127 MCAPI void registerForLevelStorageManagerEvents(::ILevelStorageManagerConnector& levelStorageManagerConnector);
128
129 MCAPI ::std::vector<::TickingAreaDescription>
130 removePendingAreaByName(::DimensionType dimensionId, ::std::string const& name, ::LevelStorage& levelStorage);
131
132 MCAPI ::std::vector<::TickingAreaDescription>
133 removePendingAreaByPosition(::DimensionType dimensionId, ::BlockPos const& position, ::LevelStorage& levelStorage);
134
135 MCAPI ::std::vector<::TickingAreaDescription> setPendingAreaLoadModeByName(
136 ::DimensionType dimensionId,
137 ::std::string const& name,
138 ::TickingAreaLoadMode loadMode,
139 ::LevelStorage& levelStorage
140 );
141
142 MCAPI ::std::vector<::TickingAreaDescription> setPendingAreaLoadModeByPosition(
143 ::DimensionType dimensionId,
144 ::BlockPos const& position,
145 ::TickingAreaLoadMode loadMode,
146 ::LevelStorage& levelStorage
147 );
148
149 MCAPI void update(::Level& level, ::LevelStorage& levelStorage);
150
151 MCAPI ~TickingAreasManager();
152 // NOLINTEND
153
154public:
155 // static functions
156 // NOLINTBEGIN
157 MCAPI static ::TickingAreasManager::AreaLimitCheck getLimitCheck(::Level const& level, bool enforce);
158 // NOLINTEND
159
160public:
161 // constructor thunks
162 // NOLINTBEGIN
163 MCAPI void* $ctor(::Bedrock::NonOwnerPointer<::LevelStorage> levelStorage);
164 // NOLINTEND
165
166public:
167 // destructor thunk
168 // NOLINTBEGIN
169 MCAPI void $dtor();
170 // NOLINTEND
171};
Definition Actor.h:104
Definition AutomaticID.h:6
Definition NonOwnerPointer.h:9
Definition BlockPos.h:18
Definition CompoundTag.h:13
Definition Dimension.h:83
Definition IActorManagerConnector.h:14
Definition ILevelStorageManagerConnector.h:13
Definition LevelStorage.h:24
Definition Level.h:234
Definition TickingAreaList.h:15
Definition TickingAreasManager.h:28
Definition ActorUniqueID.h:5
Definition Bounds.h:10
Definition PendingArea.h:15
Definition TickingAreaDescription.h:5
Definition Alias.h:14