mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 14:26:43 -04:00
May fix missing hmclversion.cfg
This commit is contained in:
parent
295f44b947
commit
d5924fa6ab
@ -33,6 +33,7 @@ import org.jackhuang.hellominecraft.launcher.core.version.MinecraftVersion;
|
||||
import org.jackhuang.hellominecraft.launcher.setting.Config;
|
||||
import org.jackhuang.hellominecraft.launcher.setting.Profile;
|
||||
import org.jackhuang.hellominecraft.launcher.setting.Settings;
|
||||
import org.jackhuang.hellominecraft.launcher.util.HMCLMinecraftService;
|
||||
import org.jackhuang.hellominecraft.util.C;
|
||||
import org.jackhuang.hellominecraft.util.Pair;
|
||||
import org.jackhuang.hellominecraft.util.StrUtils;
|
||||
@ -97,14 +98,13 @@ public class ModpackWizard extends WizardBranchController {
|
||||
progress.failed(C.i18n("modpack.export_error") + ": " + StrUtils.getStackTrace(ex), true);
|
||||
}
|
||||
try {
|
||||
String gameVersion = (String) settings.get(ModpackInitializationPanel.KEY_GAME_VERSION);
|
||||
File loc = new File((String) settings.get(ModpackInitializationPanel.KEY_MODPACK_LOCATION));
|
||||
File modpack = loc;
|
||||
if ((Boolean) settings.get(ModpackInitializationPanel.KEY_INCLUDING_LAUNCHER))
|
||||
modpack = new File(loc.getAbsolutePath() + ".temp");
|
||||
ModpackManager.export(modpack,
|
||||
profile.service().version(),
|
||||
(String) settings.get(ModpackInitializationPanel.KEY_GAME_VERSION),
|
||||
blackList, map, null);
|
||||
ModpackManager.export(modpack, profile.service().version(), gameVersion, blackList, map,
|
||||
t -> t.putTextFile(C.GSON.toJson(((HMCLMinecraftService) profile.service()).getVersionSetting(gameVersion)), "minecraft/hmclversion.cfg"));
|
||||
String summary = "<html>" + C.i18n("modpack.export_finished") + ": " + loc.getAbsolutePath();
|
||||
boolean including = false;
|
||||
if ((Boolean) settings.get(ModpackInitializationPanel.KEY_INCLUDING_LAUNCHER)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user