Make sure that there's only one added resource pack in 1.17+

This commit is contained in:
artdeell 2021-07-22 22:28:47 +03:00
parent 752d46ea12
commit 74ed615157

View File

@ -139,7 +139,7 @@ public class V117CompatUtil {
String path = Tools.DIR_GAME_NEW; String path = Tools.DIR_GAME_NEW;
if(cfg.gamePath != null && !cfg.gamePath.isEmpty()) path = cfg.gamePath; if(cfg.gamePath != null && !cfg.gamePath.isEmpty()) path = cfg.gamePath;
copyResourcePack(path,ctx.getAssets()); copyResourcePack(path,ctx.getAssets());
packList.add(0,"\"assets-v0.zip\""); if(!packList.contains("\"assets-v0.zip\"")) packList.add(0,"\"assets-v0.zip\"");
MCOptionUtils.set("resourcePacks",regenPackList(packList)); MCOptionUtils.set("resourcePacks",regenPackList(packList));
MCOptionUtils.save(); MCOptionUtils.save();
PerVersionConfig.update(); PerVersionConfig.update();