mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-14 19:25:23 -05:00
Fix duplicate resource pack names (#3557)
(cherry picked from commit b66dcf78f1
)
This commit is contained in:
parent
f3561f053e
commit
ac6e104df9
2 changed files with 3 additions and 2 deletions
|
@ -94,7 +94,8 @@ public class ModNioResourcePack implements ResourcePack, ModResourcePack {
|
|||
|
||||
if (paths.isEmpty()) return null;
|
||||
|
||||
ModNioResourcePack ret = new ModNioResourcePack(id, mod, paths, type, activationType, modBundled);
|
||||
String packId = subPath == null ? id : id + "_" + subPath;
|
||||
ModNioResourcePack ret = new ModNioResourcePack(packId, mod, paths, type, activationType, modBundled);
|
||||
|
||||
return ret.getNamespaces(type).isEmpty() ? null : ret;
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ public class ModResourcePackCreator implements ResourcePackProvider {
|
|||
? Text.translatable("pack.name.fabricMod", pack.getFabricModMetadata().getName())
|
||||
: Text.translatable("pack.name.fabricMod.subPack", pack.getFabricModMetadata().getName(), Text.translatable("resourcePack." + subPath + ".name"));
|
||||
ResourcePackProfile profile = ResourcePackProfile.create(
|
||||
subPath == null ? pack.getName() : pack.getName() + "_" + subPath,
|
||||
pack.getName(),
|
||||
displayName,
|
||||
subPath == null,
|
||||
new ModResourcePackFactory(pack),
|
||||
|
|
Loading…
Reference in a new issue