mirror of
https://github.com/quizhizhe/LiteLoaderBDS-1.16.40.git
synced 2025-06-03 04:23:39 +00:00
Fix ResourcePackRepository::getPackSourceFactory()
Fix `ResourcePackRepository::setCustomResourcePackPath()`
This commit is contained in:
parent
55ab798f36
commit
14df9b1345
@ -19,9 +19,9 @@ public:
|
||||
};
|
||||
LIAPI void setCustomResourcePackPath(PackType, const std::string& path);
|
||||
|
||||
inline class PackSourceFactory & getPackSourceFactory(){
|
||||
inline class PackSourceFactory* getPackSourceFactory(){
|
||||
//ResourcePackRepository::_initializeWorldPackSource Line62
|
||||
return dAccess<PackSourceFactory>(this, 46 * 8);
|
||||
return dAccess<PackSourceFactory*>(this, 46 * 8);
|
||||
};
|
||||
#undef AFTER_EXTRA
|
||||
#ifndef DISABLE_CONSTRUCTOR_PREVENTION_RESOURCEPACKREPOSITORY
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
void ResourcePackRepository::setCustomResourcePackPath(PackType type, const std::string& path) {
|
||||
auto CompositePack = dAccess<CompositePackSource*>(this, 48);
|
||||
auto& PackSourceFactory = getPackSourceFactory();
|
||||
auto& DirectoryPackSource = PackSourceFactory.createDirectoryPackSource(Core::Path(path), type, PackOrigin::PackOrigin_Dev, 0);
|
||||
auto PackSourceFactory = getPackSourceFactory();
|
||||
auto& DirectoryPackSource = PackSourceFactory->createDirectoryPackSource(Core::Path(path), type, PackOrigin::PackOrigin_Dev, 0);
|
||||
CompositePack->addPackSource((PackSource*)&DirectoryPackSource);
|
||||
refreshPacks();
|
||||
}
|
Loading…
Reference in New Issue
Block a user