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 MCNAPI ::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 MCNAPI void _deletePendingArea(::LevelStorage& levelStorage, ::PendingArea const& pendingArea);
71
72 MCNAPI ::std::string _findUsableDefaultName(
73 ::TickingAreaList const& tickingAreaList,
74 ::std::vector<::PendingArea> const& pendingAreas
75 ) const;
76
77 MCNAPI ::std::vector<::TickingAreaDescription> _getPendingAreaDescriptionsFiltered(
78 ::DimensionType dimensionId,
79 ::std::function<bool(::PendingArea const&)> includeInList
80 ) const;
81
82 MCNAPI bool
83 _hasPendingTickingAreaNamed(::std::string const& name, ::std::vector<::PendingArea> const& dimensionAreas) const;
84
85 MCNAPI void _postReloadActorAdded(::Actor& actor);
86
87 MCNAPI void _processAdds(::Level& level);
88
89 MCNAPI void
90 _processRemoves(::DimensionType dimensionId, ::TickingAreaList& list, ::Level& level, ::LevelStorage& levelStorage);
91
92 MCNAPI void
93 _savePendingArea(::LevelStorage& levelStorage, ::DimensionType dimensionId, ::PendingArea const& pendingArea);
94
95 MCNAPI ::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 MCNAPI void addEntityArea(::DimensionType dimensionId, ::Actor const& actor, ::LevelStorage& levelStorage);
107
108 MCNAPI void addEntityArea(
109 ::DimensionType dimensionId,
110 ::ActorUniqueID const& entityId,
111 ::Bounds const& bounds,
112 bool alwaysActive,
113 float maxDistToPlayers,
114 ::LevelStorage& levelStorage
115 );
116
118
119 MCNAPI uint countStandaloneTickingAreas() const;
120
121 MCNAPI void loadArea(::std::string const& key, ::CompoundTag const* tag);
122
123 MCNAPI void onTickingEntityAdded(::DimensionType dimensionId, ::Actor& actor, ::LevelStorage& levelStorage);
124
125 MCNAPI void registerForActorManagerEvents(::IActorManagerConnector& actorManagerConnector);
126
128
129 MCNAPI ::std::vector<::TickingAreaDescription>
130 removePendingAreaByName(::DimensionType dimensionId, ::std::string const& name, ::LevelStorage& levelStorage);
131
132 MCNAPI ::std::vector<::TickingAreaDescription>
133 removePendingAreaByPosition(::DimensionType dimensionId, ::BlockPos const& position, ::LevelStorage& levelStorage);
134
135 MCNAPI ::std::vector<::TickingAreaDescription> setPendingAreaLoadModeByName(
136 ::DimensionType dimensionId,
137 ::std::string const& name,
138 ::TickingAreaLoadMode loadMode,
139 ::LevelStorage& levelStorage
140 );
141
142 MCNAPI ::std::vector<::TickingAreaDescription> setPendingAreaLoadModeByPosition(
143 ::DimensionType dimensionId,
144 ::BlockPos const& position,
145 ::TickingAreaLoadMode loadMode,
146 ::LevelStorage& levelStorage
147 );
148
149 MCNAPI void update(::Level& level, ::LevelStorage& levelStorage);
150
152 // NOLINTEND
153
154public:
155 // static functions
156 // NOLINTBEGIN
157 MCNAPI static ::TickingAreasManager::AreaLimitCheck getLimitCheck(::Level const& level, bool enforce);
158 // NOLINTEND
159
160public:
161 // constructor thunks
162 // NOLINTBEGIN
164 // NOLINTEND
165
166public:
167 // destructor thunk
168 // NOLINTBEGIN
169 MCNAPI void $dtor();
170 // NOLINTEND
171};
Definition Actor.h:103
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:25
Definition Level.h:238
Definition TickingAreaList.h:15
Definition TickingAreasManager.h:28
MCAPI ::std::vector<::TickingAreaDescription > removePendingAreaByPosition(::DimensionType dimensionId, ::BlockPos const &position, ::LevelStorage &levelStorage)
MCAPI void addEntityArea(::DimensionType dimensionId, ::Actor const &actor, ::LevelStorage &levelStorage)
MCAPI bool _hasPendingTickingAreaNamed(::std::string const &name, ::std::vector<::PendingArea > const &dimensionAreas) const
MCAPI void _postReloadActorAdded(::Actor &actor)
MCAPI void update(::Level &level, ::LevelStorage &levelStorage)
MCAPI::std::string _findUsableDefaultName(::TickingAreaList const &tickingAreaList, ::std::vector<::PendingArea > const &pendingAreas) const
MCAPI void * $ctor(::Bedrock::NonOwnerPointer<::LevelStorage > levelStorage)
MCAPI void _savePendingArea(::LevelStorage &levelStorage, ::DimensionType dimensionId, ::PendingArea const &pendingArea)
MCAPI void _processAdds(::Level &level)
MCAPI TickingAreasManager(::Bedrock::NonOwnerPointer<::LevelStorage > levelStorage)
MCAPI void loadArea(::std::string const &key, ::CompoundTag const *tag)
MCAPI void registerForActorManagerEvents(::IActorManagerConnector &actorManagerConnector)
MCAPI ~TickingAreasManager()
MCAPI void _processRemoves(::DimensionType dimensionId, ::TickingAreaList &list, ::Level &level, ::LevelStorage &levelStorage)
MCAPI void registerForLevelStorageManagerEvents(::ILevelStorageManagerConnector &levelStorageManagerConnector)
MCAPI::AddTickingAreaStatus addArea(::DimensionType dimensionId, ::std::string const &name, ::BlockPos const &min, ::BlockPos const &max, ::TickingAreasManager::AreaLimitCheck limitCheck, bool isPersistent, ::TickingAreaLoadMode loadMode, ::LevelStorage &levelStorage)
static MCAPI ::TickingAreasManager::AreaLimitCheck getLimitCheck(::Level const &level, bool enforce)
MCAPI ::std::vector<::TickingAreaDescription > removePendingAreaByName(::DimensionType dimensionId, ::std::string const &name, ::LevelStorage &levelStorage)
MCAPI ::std::vector<::TickingAreaDescription > setPendingAreaLoadModeByPosition(::DimensionType dimensionId, ::BlockPos const &position, ::TickingAreaLoadMode loadMode, ::LevelStorage &levelStorage)
MCAPI void onTickingEntityAdded(::DimensionType dimensionId, ::Actor &actor, ::LevelStorage &levelStorage)
MCAPI void _deletePendingArea(::LevelStorage &levelStorage, ::PendingArea const &pendingArea)
MCAPI ::std::vector<::TickingAreaDescription > setPendingAreaLoadModeByName(::DimensionType dimensionId, ::std::string const &name, ::TickingAreaLoadMode loadMode, ::LevelStorage &levelStorage)
MCAPI::AddTickingAreaStatus _addArea(::DimensionType dimensionId, ::std::string const &name, ::Bounds const &bounds, bool isCircle, ::TickingAreasManager::AreaLimitCheck limitCheck, bool isPersistent, ::TickingAreaLoadMode loadMode, ::LevelStorage &levelStorage)
MCAPI uint countStandaloneTickingAreas() const
MCAPI uint countActiveStandaloneTickingAreas() const
MCAPI ::std::vector<::TickingAreaDescription > _getPendingAreaDescriptionsFiltered(::DimensionType dimensionId, ::std::function< bool(::PendingArea const &)> includeInList) const
MCAPI void addEntityArea(::DimensionType dimensionId, ::ActorUniqueID const &entityId, ::Bounds const &bounds, bool alwaysActive, float maxDistToPlayers, ::LevelStorage &levelStorage)
MCAPI void $dtor()
Definition ActorUniqueID.h:5
Definition Bounds.h:8
Definition PendingArea.h:15
Definition TickingAreaDescription.h:5
Definition Alias.h:14