35class ResourcePackManager :
public ::ResourceLoader {
39 ::ll::TypedStorage<8, 64, ::std::unordered_set<::gsl::not_null<::ResourcePackListener*>>> mListeners;
40 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackStack>> mLevelStack;
41 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackStack>> mGlobalStack;
42 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackStack>> mTreatmentStack;
43 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackStack>> mBaseGameStack;
44 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ResourcePackStack>> mFullStack;
45 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PackSourceReport>> mLoadingReport;
46 ::ll::TypedStorage<8, 32, ::std::string> mLocaleCode;
47 ::ll::TypedStorage<1, 1, bool> mInitializing;
48 ::ll::TypedStorage<1, 1, bool> mPendingRestack;
49 ::ll::TypedStorage<1, 1, bool> mUseGlobalPackStack;
50 ::ll::TypedStorage<1, 1, bool> mGameplayResourcesLoaded;
51 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mFullStackAccess;
52 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const>> mContentTierManager;
53 ::ll::TypedStorage<8, 24, ::SemVersion> mFullStackMinEngineVersion_DEPRECATED_DONOTUSE;
58 ResourcePackManager();
63 virtual ~ResourcePackManager() ;
65 virtual bool load(
::ResourceLocation const& resourceLocation, ::std::string& resourceStream)
const ;
69 ::std::string& resourceStream,
70 ::gsl::span<::std::string const> extensionList
75 ::std::string& resourceStream,
76 ::gsl::span<::std::string const> extensionList
79 virtual bool loadText(
::ResourceLocation const& resourceLocation, ::std::string& resourceStream)
const ;
81 virtual ::std::vector<::LoadedResourceData> loadAllVersionsOf(
::ResourceLocation const& resourceLocation)
const
88 virtual bool isInStreamableLocation(
::ResourceLocation const& resourceLocation)
const ;
90 virtual bool isInStreamableLocation(
92 ::gsl::span<::std::string const> extensionList
95 virtual ::Core::PathBuffer<::std::string> getPath(
::ResourceLocation const& resourceLocation)
const ;
97 virtual ::Core::PathBuffer<::std::string>
98 getPath(
::ResourceLocation const& resourceLocation, ::gsl::span<::std::string const> extensionList)
const
101 virtual ::Core::PathBuffer<::std::string>
104 virtual ::Core::PathBuffer<::std::string> getPathContainingResource(
106 ::gsl::span<::std::string const> extensionList
109 virtual ::std::pair<int, ::std::string_view> getPackStackIndexOfResource(
111 ::gsl::span<::std::string const> extensionList
114 virtual bool hasCapability(::std::string_view requiredCapability)
const;
120 MCAPI ResourcePackManager(
122 ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const>
const& contentTierManager,
123 bool needsToInitialize
126 MCAPI
void _calculateMinEngineVersionFromFullStack();
128 MCAPI
void _composeFullStack();
130 MCAPI
bool _doStackOperation(
131 ::ResourcePackStackType stackType,
135 MCAPI
void _getResourcesOfGroup(
137 ::std::string
const& group,
138 ::std::vector<::Core::Path>& resources
141 MCAPI
void _updateLanguageSubpacks();
144 MCAPI
bool areGameplayResourcesLoaded()
const;
146 MCAPI ::ContentTierIncompatibleReason canSupportPacks();
148 MCAPI
void clearPackReports();
151 MCAPI
void clearStack(::ResourcePackStackType stackType);
153 MCAPI
int composeFullStack(
160 MCAPI
void ensureSupportedSubpacks();
162 MCAPI ::std::vector<::ResourceLocationPair> findAllTexturesInUse()
const;
164 MCAPI ::std::vector<::PackIdVersion> findInPacks(
::ResourceLocation const& resourceLocation)
const;
168 MCAPI
void forceStackCompose_DEPRECATED();
170 MCFOLD ::std::shared_mutex& getFullStackAccess()
const;
172 MCAPI ::SemVersion getFullStackMinEngineVersion_DEPRECATED()
const;
174 MCAPI ::std::vector<::PackInstance> getIncompatiblePacks()
const;
177 MCAPI ::PackInstance* getPackForResource(
::Core::Path const& resourceName)
const;
179 MCFOLD ::PackSourceReport
const* getPackSourceReport()
const;
182 MCAPI ::std::vector<::PackInstance> getPacksWhereAssetExtractionNotViable(
184 ::std::string
const& sourceContext
188 MCAPI ::ResourceGroup getResourcesOfGroup(::std::string
const& group)
const;
190 MCAPI ::ResourceGroup getResourcesOfGroup(
::PackInstance const& packInstance, ::std::string
const& group)
const;
192 MCAPI ::ResourcePackStack
const& getStack(::ResourcePackStackType stackType)
const;
194 MCAPI
void handlePendingStackChanges();
199 MCAPI
bool hasResource(
202 ::gsl::span<::std::string const> extensionList
207 MCAPI
bool hasTexture(::ResourcePackStackType stackType,
::ResourceLocation const& resourceLocation)
const;
210 MCAPI
bool isAssetExtractionViableForFullStack(
212 ::std::string
const& sourceContext
215 MCAPI
bool isOnlyBaseGamePacks()
const;
217 MCAPI
void iteratePacks(::std::function<
void(
::PackInstance const&)>
const& pred)
const;
223 MCAPI
void mergePackReports(::std::vector<::PackReport>& packReports);
225 MCAPI
void notifyJsonResourcesChanged();
227 MCAPI
void onBaseGamePackDownloadComplete();
229 MCAPI
void onLanguageChanged();
231 MCAPI
void onLoadingFinished();
233 MCAPI
bool refreshStack(::ResourcePackStackType stackType);
235 MCAPI
void regeneratePackAssetSet();
240 MCAPI
void removeIf(::std::function<
bool(
::PackInstance const&)>
const& pred);
243 MCAPI
void removePacks(::std::vector<::gsl::not_null<::ResourcePack const*>>
const& packs);
245 MCAPI
void removeUnsupportedPacks();
247 MCAPI
void setCanUseGlobalPackStack(
bool canUseGlobalPackStack);
250 MCAPI
void setGameplayResourcesLoaded(
bool gameplayResourcesLoaded);
254 MCAPI
bool setStack(::std::unique_ptr<::ResourcePackStack> stack, ::ResourcePackStackType stackType);
257 MCAPI
bool supportsVibrantVisuals()
const;
259 MCAPI
void unRegisterAllResourcePackListener();
270 ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const>
const& contentTierManager,
271 bool needsToInitialize
284 MCAPI
bool $load(
::ResourceLocation const& resourceLocation, ::std::string& resourceStream)
const;
288 ::std::string& resourceStream,
289 ::gsl::span<::std::string const> extensionList
294 ::std::string& resourceStream,
295 ::gsl::span<::std::string const> extensionList
298 MCAPI
bool $loadText(
::ResourceLocation const& resourceLocation, ::std::string& resourceStream)
const;
300 MCAPI ::std::vector<::LoadedResourceData> $loadAllVersionsOf(
::ResourceLocation const& resourceLocation)
const;
304 MCAPI
bool $isInStreamableLocation(
306 ::gsl::span<::std::string const> extensionList
309 MCAPI ::Core::PathBuffer<::std::string> $getPath(
::ResourceLocation const& resourceLocation)
const;
311 MCAPI ::Core::PathBuffer<::std::string>
312 $getPath(
::ResourceLocation const& resourceLocation, ::gsl::span<::std::string const> extensionList)
const;
314 MCAPI ::Core::PathBuffer<::std::string>
317 MCAPI ::Core::PathBuffer<::std::string> $getPathContainingResource(
319 ::gsl::span<::std::string const> extensionList
322 MCAPI ::std::pair<int, ::std::string_view> $getPackStackIndexOfResource(
324 ::gsl::span<::std::string const> extensionList
327 MCAPI
bool $hasCapability(::std::string_view requiredCapability)
const;