diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-07-22 11:26:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-22 11:26:02 +0100 |
commit | 57430fd189aed592a170d597de61b3acabaaa43d (patch) | |
tree | b3727db40fdea31d24541c0c8181c43df13e774c /launcher/minecraft/mod/tasks/LocalResourceParse.cpp | |
parent | ec85266860b7503b24ff3840fb6bf74588acc7c8 (diff) | |
parent | 6ffcfcd7e9d96ae0a2846d1cf23b27425a838709 (diff) | |
download | PrismLauncher-57430fd189aed592a170d597de61b3acabaaa43d.tar.gz PrismLauncher-57430fd189aed592a170d597de61b3acabaaa43d.tar.bz2 PrismLauncher-57430fd189aed592a170d597de61b3acabaaa43d.zip |
Merge branch 'develop' into better-launch
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/minecraft/mod/tasks/LocalResourceParse.cpp')
-rw-r--r-- | launcher/minecraft/mod/tasks/LocalResourceParse.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/launcher/minecraft/mod/tasks/LocalResourceParse.cpp b/launcher/minecraft/mod/tasks/LocalResourceParse.cpp index 4d760df2..0894049c 100644 --- a/launcher/minecraft/mod/tasks/LocalResourceParse.cpp +++ b/launcher/minecraft/mod/tasks/LocalResourceParse.cpp @@ -44,7 +44,11 @@ static const QMap<PackedResourceType, QString> s_packed_type_names = { namespace ResourceUtils { PackedResourceType identify(QFileInfo file){ if (file.exists() && file.isFile()) { - if (ResourcePackUtils::validate(file)) { + if (ModUtils::validate(file)) { + // mods can contain resource and data packs so they must be tested first + qDebug() << file.fileName() << "is a mod"; + return PackedResourceType::Mod; + } else if (ResourcePackUtils::validate(file)) { qDebug() << file.fileName() << "is a resource pack"; return PackedResourceType::ResourcePack; } else if (TexturePackUtils::validate(file)) { @@ -53,9 +57,6 @@ PackedResourceType identify(QFileInfo file){ } else if (DataPackUtils::validate(file)) { qDebug() << file.fileName() << "is a data pack"; return PackedResourceType::DataPack; - } else if (ModUtils::validate(file)) { - qDebug() << file.fileName() << "is a mod"; - return PackedResourceType::Mod; } else if (WorldSaveUtils::validate(file)) { qDebug() << file.fileName() << "is a world save"; return PackedResourceType::WorldSave; |