Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ResourcePackManager.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/ResourcePackStackType.h"
8#include "mc/deps/core/sem_ver/SemVersion.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/game_refs/OwnerPtr.h"
11#include "mc/deps/resource_processing/category/CategoryFileMapping.h"
12#include "mc/deps/resource_processing/category/CategoryMergeStrategyFactory.h"
13#include "mc/resources/ResourcePackLoader.h"
14
15// auto generated forward declare list
16// clang-format off
21class PackInstance;
23class ResourcePack;
27// clang-format on
28
29class ResourcePackManager : public ::ResourcePackLoader {
30public:
31 // ResourcePackManager inner types declare
32 // clang-format off
34 // clang-format on
35
36 // ResourcePackManager inner types define
37 struct ResourcePackManagerArgs {
38 public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<8, 64, ::std::function<::Core::PathBuffer<::std::string>()>> getPath;
42 ::ll::TypedStorage<8, 8, ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const> const&> contentTierManager;
43 ::ll::TypedStorage<1, 1, bool> needsToInitialize;
44 ::ll::TypedStorage<8, 64, ::Bedrock::Resources::CategoryFileMapping> categoryFileMapping;
45 ::ll::TypedStorage<
46 8,
47 64,
49 mergeStrategyFactory;
50 // NOLINTEND
51
52 public:
53 // prevent constructor by default
54 ResourcePackManagerArgs& operator=(ResourcePackManagerArgs const&);
55 ResourcePackManagerArgs(ResourcePackManagerArgs const&);
56 ResourcePackManagerArgs();
57
58 public:
59 // member functions
60 // NOLINTBEGIN
62 // NOLINTEND
63
64 public:
65 // destructor thunk
66 // NOLINTBEGIN
67 MCNAPI void $dtor();
68 // NOLINTEND
69 };
70
71public:
72 // member variables
73 // NOLINTBEGIN
74 ::ll::TypedStorage<8, 64, ::std::unordered_set<::gsl::not_null<::ResourcePackListener*>>> mListeners;
75 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackStack>> mLevelStack;
76 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackStack>> mGlobalStack;
77 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackStack>> mTreatmentStack;
78 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackStack>> mBaseGameStack;
79 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PackSourceReport>> mLoadingReport;
80 ::ll::TypedStorage<8, 32, ::std::string> mLocaleCode;
81 ::ll::TypedStorage<1, 1, bool> mInitializing;
82 ::ll::TypedStorage<1, 1, bool> mPendingRestack;
83 ::ll::TypedStorage<1, 1, bool> mUseGlobalPackStack;
84 ::ll::TypedStorage<1, 1, bool> mGameplayResourcesLoaded;
85 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mFullStackAccess;
86 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const>> mContentTierManager;
87 ::ll::TypedStorage<8, 24, ::SemVersion> mFullStackMinEngineVersion_DEPRECATED_DONOTUSE;
88 // NOLINTEND
89
90public:
91 // prevent constructor by default
92 ResourcePackManager();
93
94public:
95 // virtual functions
96 // NOLINTBEGIN
97 virtual ~ResourcePackManager() /*override*/ = default;
98 // NOLINTEND
99
100public:
101 // member functions
102 // NOLINTBEGIN
103 MCNAPI
105
107
108 MCAPI void _composeFullStack();
109
111
112#ifdef LL_PLAT_C
113 MCNAPI ::ContentTierIncompatibleReason canSupportPacks();
114#endif
115
116 MCNAPI void clearStack(::ResourcePackStackType stackType);
117
118 MCAPI int composeFullStack(
119 ::ResourcePackStack& output,
120 ::ResourcePackStack const& globalStack,
121 ::ResourcePackStack const& levelStack
122 ) const;
123
124#ifdef LL_PLAT_C
125 MCNAPI void finishLoadingLinkedAssets(::LinkedAssetValidator& validator);
126
127 MCNAPI ::SemVersion getFullStackMinEngineVersion_DEPRECATED() const;
128
129 MCNAPI ::std::vector<::PackInstance> getIncompatiblePacks() const;
130#endif
131
132 MCAPI void iteratePacks(::std::function<void(::PackInstance const&)> const& pred) const;
133
134#ifdef LL_PLAT_C
135 MCNAPI void onLanguageChanged();
136
137 MCNAPI void releasePreloadCacheHandles();
138#endif
139
140 MCNAPI void removeIf(::std::function<bool(::PackInstance const&)> const& pred);
141
142#ifdef LL_PLAT_C
143 MCNAPI void removePacks(::std::vector<::gsl::not_null<::ResourcePack const*>> const& packs);
144
145 MCNAPI void removeUnsupportedPacks();
146#endif
147
148 MCAPI bool setStack(::std::unique_ptr<::ResourcePackStack> stack, ::ResourcePackStackType stackType);
149 // NOLINTEND
150
151public:
152 // static functions
153 // NOLINTBEGIN
154 MCNAPI static ::OwnerPtr<::ResourcePackManager> create(::ResourcePackManager::ResourcePackManagerArgs args);
155 // NOLINTEND
156
157public:
158 // constructor thunks
159 // NOLINTBEGIN
161 // NOLINTEND
162};
Definition CategoryMergeStrategyFactory.h:8
Definition ContentTierIncompatibleReason.h:10
Definition IContentTierManager.h:13
Definition LinkedAssetValidator.h:9
Definition LoadedResourceData.h:5
Definition PackInstance.h:16
Definition PackSourceReport.h:11
Definition ResourcePackListener.h:10
MCAPI void _calculateMinEngineVersionFromFullStack()
MCAPI void clearStack(::ResourcePackStackType stackType)
MCAPI void removeIf(::std::function< bool(::PackInstance const &)> const &pred)
MCAPI ResourcePackManager(::ResourcePackLoader::ConstructorKey, ::ResourcePackManager::ResourcePackManagerArgs args)
MCAPI void _updateLanguageSubpacks()
MCAPI void * $ctor(::ResourcePackLoader::ConstructorKey, ::ResourcePackManager::ResourcePackManagerArgs args)
static MCAPI ::OwnerPtr<::ResourcePackManager > create(::ResourcePackManager::ResourcePackManagerArgs args)
Definition ResourcePackStack.h:23
Definition ResourcePack.h:25
Definition ResourceMergeOptions.h:14
Definition ResourcePackLoader.h:46
Definition ResourcePackManager.h:37