LeviLamina
Loading...
Searching...
No Matches
ResourcePackRepository.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/resource/ContentIdentity.h"
8#include "mc/deps/core/resource/PackCategory.h"
9#include "mc/deps/core/resource/PackOrigin.h"
10#include "mc/deps/core/resource/PackType.h"
11#include "mc/deps/core/threading/Async.h"
12#include "mc/deps/core/utility/NonOwnerPointer.h"
13#include "mc/resources/IContentSourceRepository.h"
14#include "mc/resources/IResourcePackRepository.h"
15#include "mc/resources/repository_loading/IRepositoryLoader.h"
16
17// auto generated forward declare list
18// clang-format off
22class InvalidPacks;
23class PackInstance;
28class RepositoryPacks;
31class ResourcePack;
34class TaskGroup;
36struct PackIdVersion;
37struct PackInstanceId;
38namespace Core { class FilePathManager; }
39namespace Core { class Path; }
40namespace PackCommand { class IPackCommandPipeline; }
41namespace RepositoryLoading { struct AllRefreshTaskData; }
42namespace RepositoryLoading { struct BuildTaskDataOptions; }
43namespace RepositoryLoading { struct VanillaPacks; }
44namespace mce { class UUID; }
45// clang-format on
46
48public:
49 // ResourcePackRepository inner types declare
50 // clang-format off
52 // clang-format on
53
54 // ResourcePackRepository inner types define
56 public:
57 // member variables
58 // NOLINTBEGIN
59 ::ll::TypedStorage<8, 8, ::ResourcePackRepository&> mRepository;
60 // NOLINTEND
61
62 public:
63 // prevent constructor by default
67
68 public:
69 // virtual functions
70 // NOLINTBEGIN
71 // vIndex: 1
72 virtual ::std::shared_ptr<::RepositoryLoading::AllRefreshTaskData>
73 buildTaskData(::RepositoryLoading::BuildTaskDataOptions const& ops) /*override*/;
74
75 // vIndex: 2
76 virtual void applyTaskResults(::RepositoryLoading::AllRefreshTaskData&& taskData) /*override*/;
77
78 // vIndex: 3
79 virtual ::std::shared_ptr<::RepositoryPacks const> getPacks() const /*override*/;
80
81 // vIndex: 0
82 virtual ~RepositoryLoaderImpl() /*override*/ = default;
83 // NOLINTEND
84
85 public:
86 // virtual function thunks
87 // NOLINTBEGIN
88 MCNAPI ::std::shared_ptr<::RepositoryLoading::AllRefreshTaskData>
90
92
93 MCNAPI ::std::shared_ptr<::RepositoryPacks const> $getPacks() const;
94 // NOLINTEND
95
96 public:
97 // vftables
98 // NOLINTBEGIN
99 MCNAPI static void** $vftable();
100 // NOLINTEND
101 };
102
103public:
104 // member variables
105 // NOLINTBEGIN
106 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager>> mFilePathManager;
107 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::RepositoryPacks>>> mAllResourcePacks;
108 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::InvalidPacks>>> mInvalidPacks;
109 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::IRepositoryFactory>>> mFactory;
110 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::RepositorySources>>> mSources;
111 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PackSourceReport>> mPackSourceReport;
112 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::RepositoryLoading::VanillaPacks>>> mVanillaPacks;
113 ::ll::TypedStorage<8, 24, ::std::vector<::PackIdVersion>> mServicePacks;
114 ::ll::TypedStorage<8, 8, ::PackManifestFactory&> mManifestFactory;
115 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IContentAccessibilityProvider>> mContentAccessibility;
116 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mCurrentWorldPath;
117 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mCurrentPremiumWorldTemplatePath;
118 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ContentIdentity, ::std::string>> mTempCacheContentKeys;
119 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PackSettingsFactory>> mPackSettingsFactory;
120 ::ll::TypedStorage<8, 8, ::PackSourceFactory&> mPackSourceFactory;
121 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::PackCommand::IPackCommandPipeline>> mCommands;
122 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::TaskGroup>>> mTaskGroup;
123 ::ll::TypedStorage<8, 24, ::ContentIdentity> mCurrentPremiumWorldTemplateIdentity;
124 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::ResourcePackRepositoryRefreshQueue>>> mRefresher;
125 // NOLINTEND
126
127public:
128 LLAPI void addCustomResourcePackPath(std::filesystem::path const& path, PackType type);
129
130public:
131 // prevent constructor by default
135
136public:
137 // virtual functions
138 // NOLINTBEGIN
139 // vIndex: 0
140 virtual ~ResourcePackRepository() /*override*/;
141
142 // vIndex: 1
143 virtual void getResourcePacksByPackId(
144 ::std::vector<::PackInstanceId> const& packInstanceIds,
145 ::std::vector<::PackInstance>& result
146 ) const /*override*/;
147
148 // vIndex: 2
149 virtual ::std::shared_ptr<::ResourcePack> getResourcePackForPackId(::PackIdVersion const& idAndVersion) const
150 /*override*/;
151
152 // vIndex: 3
153 virtual ::ResourcePack* getResourcePackOfDifferentVersionForPackId(::PackIdVersion const& idAndVersion) const
154 /*override*/;
155
156 // vIndex: 4
157 virtual ::ResourcePack*
158 getResourcePackForPackIdInPath(::PackIdVersion const& idAndVersion, ::Core::Path const& fullPath) const
159 /*override*/;
160
161 // vIndex: 5
162 virtual ::ResourcePack* getResourcePackByUUID(::mce::UUID const& id) const /*override*/;
163
164 // vIndex: 6
165 virtual ::ResourcePack* getResourcePackForPackIdOwned(::PackIdVersion const& idAndVersion) const /*override*/;
166
167 // vIndex: 7
168 virtual ::std::shared_ptr<::ResourcePack>
169 getResourcePackSatisfiesPackId(::PackIdVersion const& idAndVersion, bool requireOwnership) const /*override*/;
170
171 // vIndex: 8
172 virtual ::ResourcePack* getResourcePackContainingModule(::PackIdVersion const& idAndVersion) const /*override*/;
173
174 // vIndex: 9
175 virtual ::Bedrock::Threading::Async<::std::shared_ptr<::ResourcePack>>
176 getResourcePackInPath(::Core::Path const& path) const /*override*/;
177
178 // vIndex: 10
179 virtual bool isResourcePackLoaded(::PackIdVersion const& identity, ::PackOrigin const& location) /*override*/;
180
181 // vIndex: 11
182 virtual ::PackSourceReport const* getPackLoadingReport() const /*override*/;
183
184 // vIndex: 12
185 virtual ::std::shared_ptr<::ResourcePack> getEditorPack() const /*override*/;
186
187 // vIndex: 13
188 virtual ::std::shared_ptr<::ResourcePack> getVanillaPack() const /*override*/;
189
190 // vIndex: 14
191 virtual bool setServicePacks(::std::vector<::PackIdVersion> servicePackIds) /*override*/;
192
193 // vIndex: 15
194 virtual bool hasServicePacks(::std::vector<::PackIdVersion> const& servicePacksIds) const /*override*/;
195
196 // vIndex: 16
197 virtual ::std::vector<::PackIdVersion> const& getServicePacks() const /*override*/;
198
199 // vIndex: 17
200 virtual void addServicePacksToStack(::ResourcePackStack& stack) const /*override*/;
201
202 // vIndex: 18
203 virtual void
204 addCachedResourcePacks(::std::unordered_map<::ContentIdentity, ::std::string> const* tempCacheKeys) /*override*/;
205
206 // vIndex: 19
207 virtual void addWorldResourcePacks(::Core::Path const& levelPath) /*override*/;
208
209 // vIndex: 20
210 virtual void addPremiumWorldTemplateResourcePacks(
211 ::Core::Path const& worldTemplatePath,
212 ::ContentIdentity const& premiumWorldIdentity
213 ) /*override*/;
214
215 // vIndex: 23
216 virtual void addTempWorldTemplateResourcePacks(::mce::UUID const& worldTemplateUUID) /*override*/;
217
218 // vIndex: 21
219 virtual void addWorldPackSource(::Core::Path const& levelPath) /*override*/;
220
221 // vIndex: 22
222 virtual void addPremiumWorldTemplatePackSource(
223 ::Core::Path const& worldTemplatePath,
224 ::ContentIdentity const& premiumWorldIdentity
225 ) /*override*/;
226
227 // vIndex: 24
228 virtual void removePacksLoadedFromCache() /*override*/;
229
230 // vIndex: 25
231 virtual void removePacksLoadedFromWorld() /*override*/;
232
233 // vIndex: 26
234 virtual ::Core::PathBuffer<::std::string> const getResourcePacksPath() const /*override*/;
235
236 // vIndex: 27
237 virtual ::Core::PathBuffer<::std::string> const getBehaviorPacksPath() const /*override*/;
238
239 // vIndex: 28
240 virtual ::Core::PathBuffer<::std::string> const getSkinPacksPath() const /*override*/;
241
242 // vIndex: 29
243 virtual ::Core::PathBuffer<::std::string> const getDevelopmentResourcePacksPath() const /*override*/;
244
245 // vIndex: 30
246 virtual ::Core::PathBuffer<::std::string> const getDevelopmentBehaviorPacksPath() const /*override*/;
247
248 // vIndex: 31
249 virtual ::Core::PathBuffer<::std::string> const getDevelopmentSkinPacksPath() const /*override*/;
250
251 // vIndex: 32
252 virtual ::Core::PathBuffer<::std::string> const getTreatmentPacksPath() const /*override*/;
253
254 // vIndex: 33
255 virtual void refreshPacks() /*override*/;
256
257 // vIndex: 34
258 virtual ::Bedrock::Threading::Async<void> refreshPacksAsync() /*override*/;
259
260 // vIndex: 35
261 virtual void requestReloadUserPacks() /*override*/;
262
263 // vIndex: 36
264 virtual ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> getKeyProvider() const /*override*/;
265
266 // vIndex: 37
267 virtual ::PackManifestFactory& getPackManifestFactory() /*override*/;
268
269 // vIndex: 38
270 virtual ::PackSettingsFactory& getPackSettingsFactory() const /*override*/;
271
272 // vIndex: 39
273 virtual ::PackSourceFactory& getPackSourceFactory() /*override*/;
274
275 // vIndex: 40
276 virtual ::std::vector<::ResourcePack*> getPacksByResourceLocation(::PackOrigin type) const /*override*/;
277
278 // vIndex: 41
279 virtual ::std::vector<::ResourcePack*> getPacksByType(::PackType type) const /*override*/;
280
281 // vIndex: 42
282 virtual ::std::vector<::gsl::not_null<::std::shared_ptr<::ResourcePack>>>
283 getPacksByCategory(::PackCategory category) const /*override*/;
284
285 // vIndex: 43
286 virtual void forEachPack(::std::function<void(::ResourcePack const&)> const& callback) const /*override*/;
287
288 // vIndex: 45
289 virtual ::std::vector<::ResourceLocation> const& getInvalidPacks(::PackType type) const /*override*/;
290
291 // vIndex: 44
292 virtual ::std::vector<::ResourceLocation> getInvalidPacks(::InvalidPacksFilterGroup const& packTypes) const
293 /*override*/;
294
295 // vIndex: 46
296 virtual void deletePack(::ResourceLocation const& packLocation) /*override*/;
297
298 // vIndex: 47
299 virtual void deletePackFiles(::ResourceLocation const& packLocation) /*override*/;
300
301 // vIndex: 48
302 virtual void postDeletePack(::ResourceLocation const& packLocation) /*override*/;
303
304 // vIndex: 49
305 virtual void untrackInvalidPack(::ResourceLocation const& packLocation) /*override*/;
306
307 // vIndex: 50
308 virtual bool isInitialized() const /*override*/;
309
310 // vIndex: 4
311 virtual ::ResourcePackStack createStack(::std::vector<::PackInstanceId> const& identities) /*override*/;
312
313 // vIndex: 51
314 virtual ::Bedrock::NotNullNonOwnerPtr<::IContentSourceRepository> getContentSourceRepository() /*override*/;
315 // NOLINTEND
316
317public:
318 // member functions
319 // NOLINTBEGIN
321 ::gsl::not_null<::std::shared_ptr<::RepositoryPacks>> repositoryPacks,
322 ::PackManifestFactory& manifestFactory,
323 ::Bedrock::NotNullNonOwnerPtr<::IContentAccessibilityProvider> const& contentAccessibility,
324 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager> const& pathManager,
325 ::Bedrock::NonOwnerPointer<::PackCommand::IPackCommandPipeline> commands,
326 ::PackSourceFactory& packSourceFactory,
327 bool initAsync,
328 ::std::unique_ptr<::IRepositoryFactory> factory
329 );
330 // NOLINTEND
331
332public:
333 // constructor thunks
334 // NOLINTBEGIN
335 MCAPI void* $ctor(
336 ::gsl::not_null<::std::shared_ptr<::RepositoryPacks>> repositoryPacks,
337 ::PackManifestFactory& manifestFactory,
338 ::Bedrock::NotNullNonOwnerPtr<::IContentAccessibilityProvider> const& contentAccessibility,
339 ::Bedrock::NotNullNonOwnerPtr<::Core::FilePathManager> const& pathManager,
340 ::Bedrock::NonOwnerPointer<::PackCommand::IPackCommandPipeline> commands,
341 ::PackSourceFactory& packSourceFactory,
342 bool initAsync,
343 ::std::unique_ptr<::IRepositoryFactory> factory
344 );
345 // NOLINTEND
346
347public:
348 // destructor thunk
349 // NOLINTBEGIN
350 MCAPI void $dtor();
351 // NOLINTEND
352
353public:
354 // virtual function thunks
355 // NOLINTBEGIN
356 MCAPI void $getResourcePacksByPackId(
357 ::std::vector<::PackInstanceId> const& packInstanceIds,
358 ::std::vector<::PackInstance>& result
359 ) const;
360
361 MCAPI ::std::shared_ptr<::ResourcePack> $getResourcePackForPackId(::PackIdVersion const& idAndVersion) const;
362
363 MCAPI ::ResourcePack* $getResourcePackOfDifferentVersionForPackId(::PackIdVersion const& idAndVersion) const;
364
365 MCAPI ::ResourcePack*
366 $getResourcePackForPackIdInPath(::PackIdVersion const& idAndVersion, ::Core::Path const& fullPath) const;
367
368 MCAPI ::ResourcePack* $getResourcePackByUUID(::mce::UUID const& id) const;
369
370 MCAPI ::ResourcePack* $getResourcePackForPackIdOwned(::PackIdVersion const& idAndVersion) const;
371
372 MCAPI ::std::shared_ptr<::ResourcePack>
373 $getResourcePackSatisfiesPackId(::PackIdVersion const& idAndVersion, bool requireOwnership) const;
374
375 MCAPI ::ResourcePack* $getResourcePackContainingModule(::PackIdVersion const& idAndVersion) const;
376
377 MCAPI ::Bedrock::Threading::Async<::std::shared_ptr<::ResourcePack>>
378 $getResourcePackInPath(::Core::Path const& path) const;
379
380 MCAPI bool $isResourcePackLoaded(::PackIdVersion const& identity, ::PackOrigin const& location);
381
382 MCFOLD ::PackSourceReport const* $getPackLoadingReport() const;
383
384 MCAPI ::std::shared_ptr<::ResourcePack> $getEditorPack() const;
385
386 MCAPI ::std::shared_ptr<::ResourcePack> $getVanillaPack() const;
387
388 MCAPI bool $setServicePacks(::std::vector<::PackIdVersion> servicePackIds);
389
390 MCAPI bool $hasServicePacks(::std::vector<::PackIdVersion> const& servicePacksIds) const;
391
392 MCFOLD ::std::vector<::PackIdVersion> const& $getServicePacks() const;
393
394 MCAPI void $addServicePacksToStack(::ResourcePackStack& stack) const;
395
396 MCAPI void $addCachedResourcePacks(::std::unordered_map<::ContentIdentity, ::std::string> const* tempCacheKeys);
397
398 MCAPI void $addWorldResourcePacks(::Core::Path const& levelPath);
399
400 MCAPI void $addPremiumWorldTemplateResourcePacks(
401 ::Core::Path const& worldTemplatePath,
402 ::ContentIdentity const& premiumWorldIdentity
403 );
404
405 MCAPI void $addTempWorldTemplateResourcePacks(::mce::UUID const& worldTemplateUUID);
406
407 MCAPI void $addWorldPackSource(::Core::Path const& levelPath);
408
409 MCAPI void $addPremiumWorldTemplatePackSource(
410 ::Core::Path const& worldTemplatePath,
411 ::ContentIdentity const& premiumWorldIdentity
412 );
413
414 MCAPI void $removePacksLoadedFromCache();
415
416 MCAPI void $removePacksLoadedFromWorld();
417
418 MCAPI ::Core::PathBuffer<::std::string> const $getResourcePacksPath() const;
419
420 MCAPI ::Core::PathBuffer<::std::string> const $getBehaviorPacksPath() const;
421
422 MCAPI ::Core::PathBuffer<::std::string> const $getSkinPacksPath() const;
423
424 MCAPI ::Core::PathBuffer<::std::string> const $getDevelopmentResourcePacksPath() const;
425
426 MCAPI ::Core::PathBuffer<::std::string> const $getDevelopmentBehaviorPacksPath() const;
427
428 MCAPI ::Core::PathBuffer<::std::string> const $getDevelopmentSkinPacksPath() const;
429
430 MCAPI ::Core::PathBuffer<::std::string> const $getTreatmentPacksPath() const;
431
432 MCAPI void $refreshPacks();
433
434 MCAPI ::Bedrock::Threading::Async<void> $refreshPacksAsync();
435
436 MCAPI void $requestReloadUserPacks();
437
438 MCAPI ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> $getKeyProvider() const;
439
440 MCFOLD ::PackManifestFactory& $getPackManifestFactory();
441
442 MCFOLD ::PackSettingsFactory& $getPackSettingsFactory() const;
443
444 MCFOLD ::PackSourceFactory& $getPackSourceFactory();
445
446 MCAPI ::std::vector<::ResourcePack*> $getPacksByResourceLocation(::PackOrigin type) const;
447
448 MCAPI ::std::vector<::ResourcePack*> $getPacksByType(::PackType type) const;
449
450 MCAPI ::std::vector<::gsl::not_null<::std::shared_ptr<::ResourcePack>>>
451 $getPacksByCategory(::PackCategory category) const;
452
453 MCAPI void $forEachPack(::std::function<void(::ResourcePack const&)> const& callback) const;
454
455 MCAPI ::std::vector<::ResourceLocation> const& $getInvalidPacks(::PackType type) const;
456
457 MCAPI ::std::vector<::ResourceLocation> $getInvalidPacks(::InvalidPacksFilterGroup const& packTypes) const;
458
459 MCAPI void $deletePack(::ResourceLocation const& packLocation);
460
461 MCAPI void $deletePackFiles(::ResourceLocation const& packLocation);
462
463 MCAPI void $postDeletePack(::ResourceLocation const& packLocation);
464
465 MCAPI void $untrackInvalidPack(::ResourceLocation const& packLocation);
466
467 MCAPI bool $isInitialized() const;
468
469 MCAPI ::ResourcePackStack $createStack(::std::vector<::PackInstanceId> const& identities);
470
471 MCAPI ::Bedrock::NotNullNonOwnerPtr<::IContentSourceRepository> $getContentSourceRepository();
472 // NOLINTEND
473
474public:
475 // vftables
476 // NOLINTBEGIN
478
480 // NOLINTEND
481};
Definition ContentIdentity.h:8
Definition Path.h:11
Definition IContentAccessibilityProvider.h:13
Definition IContentKeyProvider.h:13
Definition IContentSourceRepository.h:13
Definition IRepositoryFactory.h:12
Definition IResourcePackRepository.h:34
Definition InvalidPacks.h:10
Definition PackInstance.h:16
Definition PackManifestFactory.h:21
Definition PackSettingsFactory.h:20
Definition PackSourceFactory.h:33
Definition PackSourceReport.h:5
Definition Path.h:16
Definition IRepositoryLoader.h:14
Definition RepositoryPacks.h:20
Definition RepositorySources.h:13
Definition ResourceLocation.h:14
Definition ResourcePackRepositoryRefreshQueue.h:15
Definition ResourcePackRepository.h:55
MCAPI ::std::shared_ptr<::RepositoryPacks const > $getPacks() const
MCAPI void $applyTaskResults(::RepositoryLoading::AllRefreshTaskData &&taskData)
MCAPI ::std::shared_ptr<::RepositoryLoading::AllRefreshTaskData > $buildTaskData(::RepositoryLoading::BuildTaskDataOptions const &ops)
Definition ResourcePackRepository.h:47
static MCAPI void ** $vftableForIContentSourceRepository()
static MCAPI void ** $vftableForIResourcePackRepository()
Definition ResourcePackStack.h:22
Definition ResourcePack.h:18
Definition TaskGroup.h:48
Definition UUID.h:7
STL namespace.
Definition InvalidPacksFilterGroup.h:5
Definition PackIdVersion.h:10
Definition PackInstanceId.h:8
Definition AllRefreshTaskData.h:7
Definition BuildTaskDataOptions.h:7