diff options
| author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-18 23:46:19 +0300 |
|---|---|---|
| committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-18 23:46:19 +0300 |
| commit | 015f88bf83ce577b2be4f3a70b41156d76daa00b (patch) | |
| tree | cf876eba9df8704d04611e7adb5979d007dfcf15 /launcher/minecraft/mod/tasks | |
| parent | 002430db4668df1816feba550f5c2f432683996c (diff) | |
| parent | 3fbc25155b71820c233ac2d8383fa5b9bd1867df (diff) | |
| download | PrismLauncher-015f88bf83ce577b2be4f3a70b41156d76daa00b.tar.gz PrismLauncher-015f88bf83ce577b2be4f3a70b41156d76daa00b.tar.bz2 PrismLauncher-015f88bf83ce577b2be4f3a70b41156d76daa00b.zip | |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into import
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/minecraft/mod/tasks')
| -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; |
