LeviLamina
Loading...
Searching...
No Matches
MultiPlayerLevel.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/multiplayer/BeforeLevelForLevelHoldingOwnership.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/core/utility/UniqueOwnerPointer.h"
9#include "mc/deps/core/utility/pub_sub/Subscription.h"
10#include "mc/deps/game_refs/OwnerPtr.h"
11#include "mc/world/level/Level.h"
12#include "mc/world/level/PlayerSleepManager.h"
13#include "mc/world/level/biome/glue/BiomeJsonDocumentGlue.h"
14
15// auto generated forward declare list
16// clang-format off
17class Actor;
18class BlockSource;
19class ChunkSource;
21class EntityContext;
22class EntitySystems;
23class Experiments;
24class LevelChunk;
25class LevelSettings;
26class MapDataManager;
29class SubChunkPacket;
31class WeakEntityRef;
32struct ActorUniqueID;
35struct CameraRegistry;
37struct SubChunkManager;
38struct Tick;
41// clang-format on
42
44public:
45 // MultiPlayerLevel inner types define
46 using ActorIdMap = ::std::map<int, ::Actor*>;
47
48 using ActorSet = ::std::set<::Actor*>;
49
50public:
51 // member variables
52 // NOLINTBEGIN
53 ::ll::TypedStorage<8, 16, ::gsl::not_null<::Bedrock::UniqueOwnerPointer<::TrustedSkinHelper>>> mTrustedSkinHelper;
54 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::CameraRegistry>>> mCameraRegistry;
55 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::EntitySystems>>> mCameraSystems;
56 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::VolumeEntityManagerClient>> mVolumeEntityManager;
57 ::ll::TypedStorage<8, 16, ::gsl::not_null<::Bedrock::UniqueOwnerPointer<::SubChunkManager>>> mSubChunkManager;
58 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnSubChunkLoaded;
59 ::ll::TypedStorage<8, 16, ::gsl::not_null<::Bedrock::UniqueOwnerPointer<::DisplayActorManager>>>
60 mDisplayActorManager;
61 ::ll::TypedStorage<8, 40, ::PlayerSleepManager> mPlayerSleepManager;
62 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ArmorTrimIconGenerator>> mArmorTrimIconGenerator;
63 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ArmorTrimUnloader>> mArmorTrimUnloader;
64 ::ll::TypedStorage<8, 16, ::gsl::not_null<::Bedrock::UniqueOwnerPointer<::MapDataManager>>> mMapDataManager;
65 // NOLINTEND
66
67public:
68 // prevent constructor by default
69 MultiPlayerLevel();
70
71public:
72 // virtual functions
73 // NOLINTBEGIN
74 virtual ~MultiPlayerLevel() /*override*/;
75
76 virtual bool initialize(
77 ::std::string const& levelName,
78 ::LevelSettings const& levelSettings,
79 ::Experiments const& experiments,
80 ::std::string const* levelId,
81 ::std::optional<::std::reference_wrapper<
82 ::std::unordered_map<::std::string, ::std::unique_ptr<::BiomeJsonDocumentGlue::ResolvedBiomeData>>>>
83 biomeIdToResolvedData
84 ) /*override*/;
85
86 virtual ::Tick const getCurrentServerTick() const /*override*/;
87
88 virtual void startLeaveGame() /*override*/;
89
90 virtual ::Actor* addEntity(::BlockSource& region, ::OwnerPtr<::EntityContext> entity) /*override*/;
91
92 virtual ::OwnerPtr<::EntityContext> removeActorFromWorldAndTakeEntity(::WeakEntityRef) /*override*/;
93
94 virtual ::OwnerPtr<::EntityContext> takeEntity(::WeakEntityRef entityRef, ::LevelChunk&) /*override*/;
95
96 virtual ::Actor* addDisplayEntity(::BlockSource& region, ::OwnerPtr<::EntityContext> entity) /*override*/;
97
98 virtual void removeDisplayEntity(::WeakEntityRef entity) /*override*/;
99
100 virtual ::Bedrock::NonOwnerPointer<::DisplayActorManager> getDisplayActorManager() /*override*/;
101
102 virtual ::PlayerSleepManager const& getPlayerSleepManager() const /*override*/;
103
104 virtual ::PlayerSleepManager& getPlayerSleepManager() /*override*/;
105
106 virtual void notifySubChunkRequestManager(::SubChunkPacket const& packet) /*override*/;
107
108 virtual ::SubChunkRequestManager* getSubChunkRequestManager() /*override*/;
109
110 virtual void onSubChunkLoaded(
111 ::ChunkSource& source,
112 ::LevelChunk& lc,
113 short absoluteSubChunkIndex,
114 bool subChunkVisibilityChanged
115 ) /*override*/;
116
117 virtual ::Bedrock::NonOwnerPointer<::SubChunkManager> getSubChunkManager() /*override*/;
118
119 virtual bool canUseSkin(
120 ::SerializedSkinRef const& skin,
121 ::NetworkIdentifier const& networkIdentifier,
122 ::ActorUniqueID const& playerId
123 ) const /*override*/;
124
125 virtual ::Bedrock::NonOwnerPointer<::TrustedSkinHelper const> getTrustedSkinHelper() const /*override*/;
126
127 virtual ::MultiPlayerLevel* asMultiPlayerLevel() /*override*/;
128
129 virtual ::Bedrock::NonOwnerPointer<::CameraRegistry const> getCameraRegistry() const /*override*/;
130
131 virtual ::Bedrock::NonOwnerPointer<::CameraRegistry> getCameraRegistry() /*override*/;
132
133 virtual ::Bedrock::NonOwnerPointer<::EntitySystems> getCameraSystems() /*override*/;
134
135 virtual ::ArmorTrimUnloader* getArmorTrimUnloader() /*override*/;
136
137 virtual ::Bedrock::NotNullNonOwnerPtr<::MapDataManager> getMapDataManager() /*override*/;
138
139 virtual void subChunkTickAndSendRequests() /*override*/;
140
141 virtual ::MapDataManager& _getMapDataManager() /*override*/;
142
143 virtual void _subTick() /*override*/;
144 // NOLINTEND
145
146public:
147 // member functions
148 // NOLINTBEGIN
149 MCAPI explicit MultiPlayerLevel(::MultiPlayerLevelArguments&& args);
150
151 MCAPI void _initializeSubChunkManager();
152
153 MCAPI void _onSubChunkLoaded(
154 ::ChunkSource& source,
155 ::LevelChunk& lc,
156 short absoluteSubChunkIndex,
157 bool subChunkVisibilityChanged
158 );
159 // NOLINTEND
160
161public:
162 // constructor thunks
163 // NOLINTBEGIN
164 MCAPI void* $ctor(::MultiPlayerLevelArguments&& args);
165 // NOLINTEND
166
167public:
168 // destructor thunk
169 // NOLINTBEGIN
170 MCAPI void $dtor();
171 // NOLINTEND
172
173public:
174 // virtual function thunks
175 // NOLINTBEGIN
176 MCAPI bool $initialize(
177 ::std::string const& levelName,
178 ::LevelSettings const& levelSettings,
179 ::Experiments const& experiments,
180 ::std::string const* levelId,
181 ::std::optional<::std::reference_wrapper<
182 ::std::unordered_map<::std::string, ::std::unique_ptr<::BiomeJsonDocumentGlue::ResolvedBiomeData>>>>
183 biomeIdToResolvedData
184 );
185
186 MCAPI ::Tick const $getCurrentServerTick() const;
187
188 MCAPI void $startLeaveGame();
189
190 MCAPI ::Actor* $addEntity(::BlockSource& region, ::OwnerPtr<::EntityContext> entity);
191
192 MCAPI ::OwnerPtr<::EntityContext> $removeActorFromWorldAndTakeEntity(::WeakEntityRef);
193
194 MCAPI ::OwnerPtr<::EntityContext> $takeEntity(::WeakEntityRef entityRef, ::LevelChunk&);
195
196 MCAPI ::Actor* $addDisplayEntity(::BlockSource& region, ::OwnerPtr<::EntityContext> entity);
197
198 MCAPI void $removeDisplayEntity(::WeakEntityRef entity);
199
200 MCAPI ::Bedrock::NonOwnerPointer<::DisplayActorManager> $getDisplayActorManager();
201
202 MCFOLD ::PlayerSleepManager const& $getPlayerSleepManager() const;
203
204 MCFOLD ::PlayerSleepManager& $getPlayerSleepManager();
205
206 MCAPI void $notifySubChunkRequestManager(::SubChunkPacket const& packet);
207
208 MCAPI ::SubChunkRequestManager* $getSubChunkRequestManager();
209
210 MCAPI void $onSubChunkLoaded(
211 ::ChunkSource& source,
212 ::LevelChunk& lc,
213 short absoluteSubChunkIndex,
214 bool subChunkVisibilityChanged
215 );
216
217 MCAPI ::Bedrock::NonOwnerPointer<::SubChunkManager> $getSubChunkManager();
218
219 MCAPI bool $canUseSkin(
220 ::SerializedSkinRef const& skin,
221 ::NetworkIdentifier const& networkIdentifier,
222 ::ActorUniqueID const& playerId
223 ) const;
224
225 MCAPI ::Bedrock::NonOwnerPointer<::TrustedSkinHelper const> $getTrustedSkinHelper() const;
226
227 MCFOLD ::MultiPlayerLevel* $asMultiPlayerLevel();
228
229 MCFOLD ::Bedrock::NonOwnerPointer<::CameraRegistry const> $getCameraRegistry() const;
230
231 MCFOLD ::Bedrock::NonOwnerPointer<::CameraRegistry> $getCameraRegistry();
232
233 MCAPI ::Bedrock::NonOwnerPointer<::EntitySystems> $getCameraSystems();
234
235 MCFOLD ::ArmorTrimUnloader* $getArmorTrimUnloader();
236
237 MCAPI ::Bedrock::NotNullNonOwnerPtr<::MapDataManager> $getMapDataManager();
238
239 MCAPI void $subChunkTickAndSendRequests();
240
241 MCAPI ::MapDataManager& $_getMapDataManager();
242
243 MCAPI void $_subTick();
244 // NOLINTEND
245
246public:
247 // vftables
248 // NOLINTBEGIN
249 MCNAPI static void** $vftableForILevel();
250
252
253 MCNAPI static void** $vftableForBlockSourceListener();
254 // NOLINTEND
255};
Definition Actor.h:105
Definition BeforeLevelForLevelHoldingOwnership.h:5
Definition BlockSource.h:68
Definition ChunkSource.h:37
Definition DisplayActorManager.h:21
Definition EntityContext.h:16
Definition EntitySystems.h:25
Definition Experiments.h:14
Definition LevelChunk.h:79
Definition LevelSettings.h:39
Definition Level.h:249
Definition MapDataManager.h:24
Definition MultiPlayerLevel.h:5
static MCAPI void ** $vftableForBlockSourceListener()
static MCAPI void ** $vftableForILevel()
static MCAPI void ** $vftableForIWorldRegistriesProvider()
Definition NetworkIdentifier.h:10
Definition SerializedSkinRef.h:22
Definition SubChunkPacket.h:19
Definition SubChunkRequestManager.h:18
Definition WeakEntityRef.h:14
Definition ActorUniqueID.h:5
Definition ArmorTrimIconGenerator.h:5
Definition ArmorTrimUnloader.h:5
Definition CameraRegistry.h:5
Definition MultiPlayerLevelArguments.h:5
Definition SubChunkManager.h:5
Definition Tick.h:5
Definition TrustedSkinHelper.h:5
Definition VolumeEntityManagerClient.h:5