mirror of
https://github.com/FabricMC/fabric.git
synced 2025-03-27 23:29:58 -04:00
Fix duplicate resource pack names (#3557)
This commit is contained in:
parent
43ddf4264d
commit
b66dcf78f1
2 changed files with 3 additions and 2 deletions
fabric-resource-loader-v0/src/main/java/net/fabricmc/fabric/impl/resource/loader
|
@ -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…
Add table
Reference in a new issue