mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-08-03 03:16:35 -04:00
why does the ui crash
This commit is contained in:
parent
b1c6c3549f
commit
07357db42d
1
.gitignore
vendored
Normal file → Executable file
1
.gitignore
vendored
Normal file → Executable file
@ -22,5 +22,6 @@ hs_err_pid*
|
||||
|
||||
HMCLAPI/build/
|
||||
HMCL/build/
|
||||
HMCL/src/main/org/jackhuang/hellominecraft/launcher/servers/
|
||||
HMCSM/build/
|
||||
MetroLookAndFeel/build/
|
||||
|
26
.gitignore~
Executable file
26
.gitignore~
Executable file
@ -0,0 +1,26 @@
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
.gradle
|
||||
.nb-gradle
|
||||
|
||||
*.bat
|
||||
*.log
|
||||
.mine*
|
||||
*.json
|
||||
*.hmd
|
||||
|
||||
HMCLAPI/build/
|
||||
HMCL/build/
|
||||
HMCSM/build/
|
||||
MetroLookAndFeel/build/
|
0
.nb-gradle-properties
Normal file → Executable file
0
.nb-gradle-properties
Normal file → Executable file
0
HMCL/HMCLauncher.exe
Normal file → Executable file
0
HMCL/HMCLauncher.exe
Normal file → Executable file
0
HMCL/build.gradle
Normal file → Executable file
0
HMCL/build.gradle
Normal file → Executable file
0
HMCL/icon.ico
Normal file → Executable file
0
HMCL/icon.ico
Normal file → Executable file
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
0
HMCL/obfuscate_2.3.3.map
Normal file → Executable file
0
HMCL/obfuscate_2.3.3.map
Normal file → Executable file
0
HMCL/obfuscate_2.3.4.map
Normal file → Executable file
0
HMCL/obfuscate_2.3.4.map
Normal file → Executable file
0
HMCL/proguard.pro
vendored
Normal file → Executable file
0
HMCL/proguard.pro
vendored
Normal file → Executable file
0
HMCL/src/main/icon.icns
Normal file → Executable file
0
HMCL/src/main/icon.icns
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/Launcher.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/Launcher.java
Normal file → Executable file
15
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/Main.java
Normal file → Executable file
15
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/Main.java
Normal file → Executable file
@ -33,6 +33,7 @@ import javax.swing.ImageIcon;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.UnsupportedLookAndFeelException;
|
||||
import org.jackhuang.hellominecraft.HMCLog;
|
||||
import org.jackhuang.hellominecraft.launcher.api.PluginManager;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.GameLauncher;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.CrashReporter;
|
||||
import org.jackhuang.hellominecraft.logging.Configuration;
|
||||
@ -75,7 +76,7 @@ public final class Main implements Runnable {
|
||||
|
||||
try {
|
||||
sslContext = SSLContext.getInstance("TLS");
|
||||
X509TrustManager[] xtmArray = new X509TrustManager[] {XTM};
|
||||
X509TrustManager[] xtmArray = new X509TrustManager[]{XTM};
|
||||
sslContext.init(null, xtmArray, new java.security.SecureRandom());
|
||||
} catch (GeneralSecurityException gse) {
|
||||
}
|
||||
@ -86,7 +87,7 @@ public final class Main implements Runnable {
|
||||
}
|
||||
|
||||
public static final String LAUNCHER_NAME = "Hello Minecraft! Launcher";
|
||||
public static final byte VERSION_FIRST = 2, VERSION_SECOND = 3, VERSION_THIRD = 1, VERSION_FORTH = 6;
|
||||
public static final byte VERSION_FIRST = 2, VERSION_SECOND = 3, VERSION_THIRD = 5, VERSION_FORTH = 7;
|
||||
public static final int MINIMUM_LAUNCHER_VERSION = 16;
|
||||
//public static Proxy PROXY;
|
||||
|
||||
@ -109,10 +110,13 @@ public final class Main implements Runnable {
|
||||
}
|
||||
|
||||
public static final Main INSTANCE = new Main();
|
||||
public static HelloMinecraftLookAndFeel LOOK_AND_FEEL;
|
||||
|
||||
@SuppressWarnings({"CallToPrintStackTrace", "UseSpecificCatch"})
|
||||
public static void main(String[] args) {
|
||||
{
|
||||
//PluginManager.getServerPlugin();
|
||||
|
||||
if (IUpgrader.NOW_UPGRADER.parseArguments(new VersionNumber(VERSION_FIRST, VERSION_SECOND, VERSION_THIRD), args))
|
||||
return;
|
||||
|
||||
@ -136,14 +140,15 @@ public final class Main implements Runnable {
|
||||
LogWindow.INSTANCE.setTerminateGame(GameLauncher.PROCESS_MANAGER::stopAllProcesses);
|
||||
|
||||
try {
|
||||
UIManager.setLookAndFeel(new HelloMinecraftLookAndFeel());
|
||||
LOOK_AND_FEEL = new HelloMinecraftLookAndFeel(Settings.getInstance().getTheme().settings);
|
||||
UIManager.setLookAndFeel(LOOK_AND_FEEL);
|
||||
} catch (ParseException | UnsupportedLookAndFeelException ex) {
|
||||
HMCLog.warn("Failed to set look and feel...", ex);
|
||||
}
|
||||
|
||||
Settings.UPDATE_CHECKER.outdated.register(IUpgrader.NOW_UPGRADER);
|
||||
Settings.UPDATE_CHECKER.process(false).subscribeOn(Schedulers.newThread()).subscribe(t
|
||||
-> Main.invokeUpdate());
|
||||
-> Main.invokeUpdate());
|
||||
|
||||
if (StrUtils.isNotBlank(Settings.getInstance().getProxyHost()) && StrUtils.isNotBlank(Settings.getInstance().getProxyPort()) && MathUtils.canParseInt(Settings.getInstance().getProxyPort())) {
|
||||
HMCLog.log("Initializing customized proxy");
|
||||
@ -159,7 +164,7 @@ public final class Main implements Runnable {
|
||||
}
|
||||
|
||||
try {
|
||||
MainFrame.showMainFrame(Settings.isFirstLoading());
|
||||
PluginManager.NOW_PLUGIN.showUI();
|
||||
} catch (Throwable t) {
|
||||
new CrashReporter(false).uncaughtException(Thread.currentThread(), t);
|
||||
System.exit(1);
|
||||
|
62
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/api/IPlugin.java
Executable file
62
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/api/IPlugin.java
Executable file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.api;
|
||||
|
||||
import org.jackhuang.hellominecraft.launcher.launch.IMinecraftProvider;
|
||||
import org.jackhuang.hellominecraft.launcher.settings.Profile;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.AuthenticationException;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.IAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.UserProfileProvider;
|
||||
import org.jackhuang.hellominecraft.utils.functions.Consumer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public interface IPlugin {
|
||||
|
||||
/**
|
||||
* You can modify the application actions by this method.
|
||||
*
|
||||
* @param profile info to the Minecraft Loader
|
||||
* @return For example, you can implement IMinecraftProvider to support
|
||||
* MultiMC
|
||||
*/
|
||||
IMinecraftProvider provideMinecraftProvider(Profile profile);
|
||||
|
||||
/**
|
||||
* Register authenticators by calling IAuthenticator.LOGINS.add.
|
||||
*
|
||||
* @param apply call apply.accept(your authenticator)
|
||||
*/
|
||||
void onRegisterAuthenticators(Consumer<IAuthenticator> apply);
|
||||
|
||||
/**
|
||||
* Open your customized UI.
|
||||
*/
|
||||
void showUI();
|
||||
|
||||
/**
|
||||
* Add your server ip or modify the access token.
|
||||
*
|
||||
* @param result What you want.
|
||||
*/
|
||||
void onProcessingLoginResult(UserProfileProvider result) throws AuthenticationException;
|
||||
|
||||
void onInitializingProfile(Profile p);
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.api;
|
||||
|
||||
import org.jackhuang.hellominecraft.HMCLog;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.DefaultPlugin;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class PluginManager {
|
||||
|
||||
public static IPlugin NOW_PLUGIN = new DefaultPlugin();
|
||||
|
||||
public static void getServerPlugin() {
|
||||
try {
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
Class c = cl.loadClass("org.jackhuang.hellominecraft.launcher.servers.ServerPlugin");
|
||||
IPlugin p = (IPlugin) c.newInstance();
|
||||
NOW_PLUGIN = p;
|
||||
} catch (ClassNotFoundException ignore) {
|
||||
} catch (Exception e) {
|
||||
HMCLog.err("Failed to new instance");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/AbstractMinecraftLoader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/AbstractMinecraftLoader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/DefaultGameLauncher.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/DefaultGameLauncher.java
Normal file → Executable file
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.launch;
|
||||
|
||||
import org.jackhuang.hellominecraft.launcher.api.IPlugin;
|
||||
import org.jackhuang.hellominecraft.launcher.settings.Profile;
|
||||
import org.jackhuang.hellominecraft.launcher.settings.Settings;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.IAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.OfflineAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.SkinmeAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.UserProfileProvider;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.YggdrasilAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.version.MinecraftVersionManager;
|
||||
import org.jackhuang.hellominecraft.launcher.views.MainFrame;
|
||||
import org.jackhuang.hellominecraft.utils.functions.Consumer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class DefaultPlugin implements IPlugin {
|
||||
|
||||
protected static YggdrasilAuthenticator YGGDRASIL_LOGIN;
|
||||
protected static OfflineAuthenticator OFFLINE_LOGIN;
|
||||
protected static SkinmeAuthenticator SKINME_LOGIN;
|
||||
|
||||
@Override
|
||||
public IMinecraftProvider provideMinecraftProvider(Profile profile) {
|
||||
return new MinecraftVersionManager(profile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegisterAuthenticators(Consumer<IAuthenticator> apply) {
|
||||
String clientToken = Settings.getInstance().getClientToken();
|
||||
OFFLINE_LOGIN = new OfflineAuthenticator(clientToken);
|
||||
YGGDRASIL_LOGIN = new YggdrasilAuthenticator(clientToken);
|
||||
YGGDRASIL_LOGIN.onLoadSettings(Settings.getInstance().getYggdrasilConfig());
|
||||
SKINME_LOGIN = new SkinmeAuthenticator(clientToken);
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(()
|
||||
-> Settings.getInstance().setYggdrasilConfig(YGGDRASIL_LOGIN.onSaveSettings())
|
||||
));
|
||||
apply.accept(OFFLINE_LOGIN);
|
||||
apply.accept(YGGDRASIL_LOGIN);
|
||||
apply.accept(SKINME_LOGIN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showUI() {
|
||||
MainFrame.showMainFrame(Settings.isFirstLoading());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProcessingLoginResult(UserProfileProvider result) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitializingProfile(Profile p) {
|
||||
|
||||
}
|
||||
|
||||
}
|
16
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/GameLauncher.java
Normal file → Executable file
16
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/GameLauncher.java
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@ -26,6 +26,7 @@ import java.io.UnsupportedEncodingException;
|
||||
import java.util.List;
|
||||
import org.jackhuang.hellominecraft.C;
|
||||
import org.jackhuang.hellominecraft.HMCLog;
|
||||
import org.jackhuang.hellominecraft.launcher.api.PluginManager;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.IAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.LoginInfo;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.UserProfileProvider;
|
||||
@ -73,7 +74,9 @@ public class GameLauncher {
|
||||
result = login.login(info);
|
||||
else
|
||||
result = login.loginBySettings();
|
||||
if (result == null) throw new AuthenticationException("Result can not be null.");
|
||||
if (result == null)
|
||||
throw new IllegalStateException("Result can not be null.");
|
||||
PluginManager.NOW_PLUGIN.onProcessingLoginResult(result);
|
||||
} catch (Throwable e) {
|
||||
String error = C.i18n("login.failed") + e.getMessage();
|
||||
HMCLog.warn("Login failed by method: " + login.getName(), e);
|
||||
@ -98,7 +101,7 @@ public class GameLauncher {
|
||||
failEvent.execute(C.i18n("launch.failed"));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
HMCLog.log("Unpacking natives...");
|
||||
if (!decompressNativesEvent.execute(provider.getDecompressLibraries())) {
|
||||
failEvent.execute(C.i18n("launch.failed"));
|
||||
@ -115,7 +118,8 @@ public class GameLauncher {
|
||||
*/
|
||||
public void launch(List str) {
|
||||
try {
|
||||
provider.onLaunch();
|
||||
if (!provider.onLaunch())
|
||||
return;
|
||||
if (StrUtils.isNotBlank(getProfile().getPrecalledCommand())) {
|
||||
Process p = Runtime.getRuntime().exec(getProfile().getPrecalledCommand());
|
||||
try {
|
||||
@ -128,9 +132,9 @@ public class GameLauncher {
|
||||
HMCLog.log("Starting process");
|
||||
ProcessBuilder builder = new ProcessBuilder(str);
|
||||
if (get == null || get.getSelectedMinecraftVersion() == null || StrUtils.isBlank(get.getCanonicalGameDir()))
|
||||
throw new NullPointerException("Fucking bug!");
|
||||
throw new Error("Fucking bug!");
|
||||
builder.directory(provider.getRunDirectory(get.getSelectedMinecraftVersion().id))
|
||||
.environment().put("APPDATA", get.getCanonicalGameDir());
|
||||
.environment().put("APPDATA", get.getCanonicalGameDir());
|
||||
JavaProcess jp = new JavaProcess(str, builder.start(), PROCESS_MANAGER);
|
||||
launchEvent.execute(jp);
|
||||
} catch (Exception e) {
|
||||
|
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftAssetService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftAssetService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftDownloadService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftDownloadService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftLoader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftLoader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftModService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftModService.java
Normal file → Executable file
20
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftProvider.java
Normal file → Executable file
20
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftProvider.java
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@ -37,7 +37,7 @@ public abstract class IMinecraftProvider {
|
||||
public IMinecraftProvider(Profile profile) {
|
||||
this.profile = profile;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To download mod packs.
|
||||
*/
|
||||
@ -51,15 +51,15 @@ public abstract class IMinecraftProvider {
|
||||
* @return the run directory
|
||||
*/
|
||||
public abstract File getRunDirectory(String id);
|
||||
|
||||
|
||||
public File getRunDirectory(String id, String subFolder) {
|
||||
return new File(getRunDirectory(getSelectedMinecraftVersion().id), subFolder);
|
||||
}
|
||||
|
||||
public abstract void open(String version, String folder);
|
||||
|
||||
|
||||
public abstract IMinecraftModService getModService();
|
||||
|
||||
|
||||
public abstract IMinecraftDownloadService getDownloadService();
|
||||
|
||||
public abstract IMinecraftAssetService getAssetService();
|
||||
@ -89,7 +89,7 @@ public abstract class IMinecraftProvider {
|
||||
* Provide the Minecraft Loader to generate the launching command.
|
||||
*
|
||||
* @see org.jackhuang.hellominecraft.launcher.launch.IMinecraftLoader
|
||||
* @param p player informations, including username & auth_token
|
||||
* @param p player informations, including username & auth_token
|
||||
*
|
||||
* @return what you want
|
||||
*
|
||||
@ -149,7 +149,7 @@ public abstract class IMinecraftProvider {
|
||||
* @return the Minecraft json instance
|
||||
*/
|
||||
public abstract MinecraftVersion getVersionById(String id);
|
||||
|
||||
|
||||
public MinecraftVersion getSelectedVersion() {
|
||||
return profile.getSelectedMinecraftVersion();
|
||||
}
|
||||
@ -181,7 +181,7 @@ public abstract class IMinecraftProvider {
|
||||
* Refind the versions in this profile.
|
||||
*/
|
||||
public abstract void refreshVersions();
|
||||
|
||||
|
||||
/**
|
||||
* Clean redundant files.
|
||||
*/
|
||||
@ -189,7 +189,9 @@ public abstract class IMinecraftProvider {
|
||||
|
||||
/**
|
||||
* When GameLauncher launches the game, this function will be called.
|
||||
*
|
||||
* @return if false, will break the launch process.
|
||||
*/
|
||||
public abstract void onLaunch();
|
||||
public abstract boolean onLaunch();
|
||||
|
||||
}
|
||||
|
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/IMinecraftService.java
Normal file → Executable file
@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.launch;
|
||||
|
||||
import java.util.List;
|
||||
import org.jackhuang.hellominecraft.launcher.settings.LauncherVisibility;
|
||||
import org.jackhuang.hellominecraft.launcher.views.MainFrame;
|
||||
import org.jackhuang.hellominecraft.utils.Event;
|
||||
import org.jackhuang.hellominecraft.utils.system.JavaProcessMonitor;
|
||||
import org.jackhuang.hellominecraft.views.LogWindow;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class LaunchFinisher implements Event<List<String>> {
|
||||
|
||||
@Override
|
||||
public boolean call(Object sender, List<String> str) {
|
||||
final GameLauncher obj = (GameLauncher) sender;
|
||||
obj.launchEvent.register((sender1, p) -> {
|
||||
if (obj.getProfile().getLauncherVisibility() == LauncherVisibility.CLOSE && !LogWindow.INSTANCE.isVisible())
|
||||
System.exit(0);
|
||||
else if (obj.getProfile().getLauncherVisibility() == LauncherVisibility.KEEP)
|
||||
MainFrame.INSTANCE.closeMessage();
|
||||
else {
|
||||
if (LogWindow.INSTANCE.isVisible())
|
||||
LogWindow.INSTANCE.setExit(() -> true);
|
||||
MainFrame.INSTANCE.dispose();
|
||||
}
|
||||
JavaProcessMonitor jpm = new JavaProcessMonitor(p);
|
||||
jpm.stoppedEvent.register((sender3, t) -> {
|
||||
if (obj.getProfile().getLauncherVisibility() != LauncherVisibility.KEEP && !LogWindow.INSTANCE.isVisible())
|
||||
System.exit(0);
|
||||
return true;
|
||||
});
|
||||
jpm.start();
|
||||
return true;
|
||||
});
|
||||
obj.launch(str);
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.launch;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.swing.JOptionPane;
|
||||
import org.jackhuang.hellominecraft.C;
|
||||
import org.jackhuang.hellominecraft.HMCLog;
|
||||
import org.jackhuang.hellominecraft.launcher.views.MainFrame;
|
||||
import org.jackhuang.hellominecraft.utils.Event;
|
||||
import org.jackhuang.hellominecraft.utils.MessageBox;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class LaunchScriptFinisher implements Event<List<String>> {
|
||||
|
||||
@Override
|
||||
public boolean call(Object sender, List str) {
|
||||
boolean flag = false;
|
||||
try {
|
||||
String s = JOptionPane.showInputDialog(C.i18n("mainwindow.enter_script_name"));
|
||||
if (s != null)
|
||||
MessageBox.Show(C.i18n("mainwindow.make_launch_succeed") + " " + ((GameLauncher) sender).makeLauncher(s, str).getAbsolutePath());
|
||||
flag = true;
|
||||
} catch (IOException ex) {
|
||||
MessageBox.Show(C.i18n("mainwindow.make_launch_script_failed"));
|
||||
HMCLog.err("Failed to create script file.", ex);
|
||||
}
|
||||
MainFrame.INSTANCE.closeMessage();
|
||||
return flag;
|
||||
}
|
||||
|
||||
}
|
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/LibraryDownloadTask.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/LibraryDownloadTask.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/MinecraftCrashAdvicer.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/MinecraftCrashAdvicer.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/MinecraftLoader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/launch/MinecraftLoader.java
Normal file → Executable file
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.servers;
|
||||
|
||||
import org.jackhuang.hellominecraft.launcher.api.IPlugin;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.IMinecraftProvider;
|
||||
import org.jackhuang.hellominecraft.launcher.servers.mfcraft.CheckModsMinecraftProvider;
|
||||
import org.jackhuang.hellominecraft.launcher.servers.mfcraft.MFCraftAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.servers.mfcraft.Servers;
|
||||
import org.jackhuang.hellominecraft.launcher.settings.Profile;
|
||||
import org.jackhuang.hellominecraft.launcher.settings.Settings;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.AuthenticationException;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.IAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.UserProfileProvider;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.YggdrasilAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.version.ServerInfo;
|
||||
import org.jackhuang.hellominecraft.launcher.views.MainFrame;
|
||||
import org.jackhuang.hellominecraft.launcher.views.ServerListView;
|
||||
import org.jackhuang.hellominecraft.utils.functions.Consumer;
|
||||
import org.jackhuang.hellominecraft.views.Selector;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class ServerPlugin implements IPlugin {
|
||||
|
||||
protected static YggdrasilAuthenticator YGGDRASIL_LOGIN;
|
||||
protected static MFCraftAuthenticator MFCRAFT_LOGIN;
|
||||
|
||||
@Override
|
||||
public IMinecraftProvider provideMinecraftProvider(Profile profile) {
|
||||
return new CheckModsMinecraftProvider(profile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegisterAuthenticators(Consumer<IAuthenticator> apply) {
|
||||
String clientToken = Settings.getInstance().getClientToken();
|
||||
MFCRAFT_LOGIN = new MFCraftAuthenticator(clientToken);
|
||||
YGGDRASIL_LOGIN = new YggdrasilAuthenticator(clientToken);
|
||||
YGGDRASIL_LOGIN.onLoadSettings(Settings.getInstance().getYggdrasilConfig());
|
||||
apply.accept(MFCRAFT_LOGIN);
|
||||
apply.accept(YGGDRASIL_LOGIN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showUI() {
|
||||
MainFrame.showMainFrame(Settings.isFirstLoading());
|
||||
}
|
||||
|
||||
public static ServerInfo lastServerInfo;
|
||||
|
||||
@Override
|
||||
public void onProcessingLoginResult(UserProfileProvider result) throws AuthenticationException {
|
||||
Servers s = Servers.getInstance();
|
||||
String[] sel = new String[s.areas.size()];
|
||||
for (int i = 0; i < sel.length; i++)
|
||||
sel[i] = s.areas.get(i).name;
|
||||
Selector selector = new Selector(null, sel, "选择你要登录的服务器大区");
|
||||
int ind = selector.getChoice();
|
||||
for (ServerInfo si : s.areas.get(ind).servers)
|
||||
si.downloadIcon();
|
||||
ServerListView slv = new ServerListView(s.areas.get(ind).servers.toArray(new ServerInfo[0]));
|
||||
int c = slv.getChoice();
|
||||
if (c == -1)
|
||||
throw new AuthenticationException("未选择服务器");
|
||||
lastServerInfo = s.areas.get(ind).servers.get(ind);
|
||||
result.setServer(lastServerInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitializingProfile(Profile p) {
|
||||
p.initialize(1);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.servers.mfcraft;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.jackhuang.hellominecraft.HMCLog;
|
||||
import org.jackhuang.hellominecraft.launcher.servers.ServerPlugin;
|
||||
import org.jackhuang.hellominecraft.launcher.settings.Profile;
|
||||
import org.jackhuang.hellominecraft.launcher.version.MinecraftModService;
|
||||
import org.jackhuang.hellominecraft.launcher.version.MinecraftVersionManager;
|
||||
import org.jackhuang.hellominecraft.utils.ArrayUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class CheckModsMinecraftProvider extends MinecraftVersionManager {
|
||||
|
||||
public CheckModsMinecraftProvider(Profile p) {
|
||||
super(p);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLaunch() {
|
||||
try {
|
||||
super.onLaunch();
|
||||
String[] md5s = ((MinecraftModService) getModService()).checkMd5s();
|
||||
String[] md5 = ServerPlugin.lastServerInfo.md5;
|
||||
return ArrayUtils.equals(md5s, md5);
|
||||
} catch (IOException ex) {
|
||||
HMCLog.err("Failed to check md5");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.servers.mfcraft;
|
||||
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import java.io.IOException;
|
||||
import org.jackhuang.hellominecraft.C;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.AuthenticationException;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.IAuthenticator;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.LoginInfo;
|
||||
import static org.jackhuang.hellominecraft.launcher.utils.auth.OfflineAuthenticator.getUUIDFromUserName;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.UserProfileProvider;
|
||||
import org.jackhuang.hellominecraft.launcher.version.ServerInfo;
|
||||
import org.jackhuang.hellominecraft.utils.NetUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class MFCraftAuthenticator extends IAuthenticator {
|
||||
|
||||
public MFCraftAuthenticator(String clientToken) {
|
||||
super(clientToken);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserProfileProvider login(LoginInfo info) throws AuthenticationException {
|
||||
try {
|
||||
UserProfileProvider result = new UserProfileProvider();
|
||||
String url = String.format("http://zh.mfcraft.cn/index.php?c=user_public&a=clientlogin&user=%s&pass=%s", info.username, info.password);
|
||||
String response = NetUtils.get(url);
|
||||
if (response.contains("error"))
|
||||
throw new AuthenticationException(C.i18n("login.wrong_password"));
|
||||
result.setUserName(info.username);
|
||||
String uuid = getUUIDFromUserName(info.username);
|
||||
result.setSession(uuid);
|
||||
result.setUserId(uuid);
|
||||
result.setAccessToken(uuid);
|
||||
result.setUserType("Legacy");
|
||||
return result;
|
||||
} catch (IOException | JsonSyntaxException ex) {
|
||||
throw new AuthenticationException(C.i18n("login.failed.connect_authentication_server"), ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "MFCraft";
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserProfileProvider loginBySettings() throws AuthenticationException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logout() {
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.servers.mfcraft;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import org.jackhuang.hellominecraft.launcher.version.ServerInfo;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class ServerArea {
|
||||
|
||||
public String name;
|
||||
public ArrayList<ServerInfo> servers;
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||
*/
|
||||
package org.jackhuang.hellominecraft.launcher.servers.mfcraft;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.jackhuang.hellominecraft.C;
|
||||
import org.jackhuang.hellominecraft.HMCLog;
|
||||
import org.jackhuang.hellominecraft.utils.NetUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author huangyuhui
|
||||
*/
|
||||
public class Servers {
|
||||
|
||||
public static Servers instance;
|
||||
|
||||
public static Servers getInstance() {
|
||||
if (instance == null) {
|
||||
String servers = null;
|
||||
try {
|
||||
servers = NetUtils.get("http://zh.mfcraft.cn/View/servers.php");
|
||||
instance = C.gson.fromJson(servers, Servers.class);
|
||||
} catch (IOException ex) {
|
||||
HMCLog.err("Failed to get servers");
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public ArrayList<ServerArea> areas;
|
||||
}
|
24
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/settings/Config.java
Normal file → Executable file
24
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/settings/Config.java
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@ -24,6 +24,9 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import java.util.UUID;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.auth.IAuthenticator;
|
||||
import org.jackhuang.hellominecraft.lookandfeel.Theme;
|
||||
import org.jackhuang.hellominecraft.utils.EventHandler;
|
||||
import org.jackhuang.hellominecraft.utils.system.JdkVersion;
|
||||
|
||||
/**
|
||||
@ -55,12 +58,15 @@ public final class Config {
|
||||
return java == null ? java = new ArrayList<>() : java;
|
||||
}
|
||||
|
||||
public int getTheme() {
|
||||
return theme;
|
||||
public transient final EventHandler<Theme> themeChangedEvent = new EventHandler<>(this);
|
||||
|
||||
public Theme getTheme() {
|
||||
return Theme.values()[theme];
|
||||
}
|
||||
|
||||
public void setTheme(int theme) {
|
||||
this.theme = theme;
|
||||
themeChangedEvent.execute(getTheme());
|
||||
Settings.save();
|
||||
}
|
||||
|
||||
@ -90,6 +96,7 @@ public final class Config {
|
||||
this.bgpath = bgpath;
|
||||
Settings.save();
|
||||
}
|
||||
|
||||
public boolean isEnableAnimation() {
|
||||
return enableAnimation;
|
||||
}
|
||||
@ -112,7 +119,13 @@ public final class Config {
|
||||
return clientToken;
|
||||
}
|
||||
|
||||
public IAuthenticator getAuthenticator() {
|
||||
return IAuthenticator.LOGINS.get(getLoginType());
|
||||
}
|
||||
|
||||
public int getLoginType() {
|
||||
if (logintype < 0 || logintype >= IAuthenticator.LOGINS.size())
|
||||
logintype = 0;
|
||||
return logintype;
|
||||
}
|
||||
|
||||
@ -162,8 +175,9 @@ public final class Config {
|
||||
clientToken = UUID.randomUUID().toString();
|
||||
username = "";
|
||||
logintype = downloadtype = 0;
|
||||
enableShadow = false; enableAnimation = true;
|
||||
theme = 0;
|
||||
enableShadow = false;
|
||||
enableAnimation = true;
|
||||
theme = 4;
|
||||
}
|
||||
|
||||
public DownloadType getDownloadSource() {
|
||||
|
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/settings/LauncherVisibility.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/settings/LauncherVisibility.java
Normal file → Executable file
22
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/settings/Profile.java
Normal file → Executable file
22
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/settings/Profile.java
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@ -18,6 +18,7 @@
|
||||
package org.jackhuang.hellominecraft.launcher.settings;
|
||||
|
||||
import java.io.File;
|
||||
import org.jackhuang.hellominecraft.launcher.api.PluginManager;
|
||||
import org.jackhuang.hellominecraft.launcher.launch.IMinecraftProvider;
|
||||
import org.jackhuang.hellominecraft.utils.system.IOUtils;
|
||||
import org.jackhuang.hellominecraft.launcher.utils.MCUtils;
|
||||
@ -27,7 +28,7 @@ import org.jackhuang.hellominecraft.launcher.version.GameDirType;
|
||||
import org.jackhuang.hellominecraft.utils.StrUtils;
|
||||
import org.jackhuang.hellominecraft.utils.Utils;
|
||||
import org.jackhuang.hellominecraft.launcher.version.MinecraftVersion;
|
||||
import org.jackhuang.hellominecraft.launcher.version.MinecraftVersionManager;
|
||||
import org.jackhuang.hellominecraft.utils.EventHandler;
|
||||
import org.jackhuang.hellominecraft.utils.system.Java;
|
||||
import org.jackhuang.hellominecraft.utils.system.OS;
|
||||
|
||||
@ -65,9 +66,14 @@ public final class Profile {
|
||||
gameDir = MCUtils.getInitGameDir().getPath();
|
||||
debug = fullscreen = canceledWrapper = false;
|
||||
launcherVisibility = gameDirType = 0;
|
||||
PluginManager.NOW_PLUGIN.onInitializingProfile(this);
|
||||
javaDir = java = minecraftArgs = serverIp = precalledCommand = "";
|
||||
}
|
||||
|
||||
public void initialize(int gameDirType) {
|
||||
this.gameDirType = gameDirType;
|
||||
}
|
||||
|
||||
public Profile(Profile v) {
|
||||
this();
|
||||
if (v == null)
|
||||
@ -94,12 +100,12 @@ public final class Profile {
|
||||
|
||||
public IMinecraftProvider getMinecraftProvider() {
|
||||
if (minecraftProvider == null) {
|
||||
minecraftProvider = new MinecraftVersionManager(this);
|
||||
minecraftProvider = PluginManager.NOW_PLUGIN.provideMinecraftProvider(this);
|
||||
minecraftProvider.initializeMiencraft();
|
||||
}
|
||||
return minecraftProvider;
|
||||
}
|
||||
|
||||
|
||||
public String getSelectedMinecraftVersionName() {
|
||||
return selectedMinecraftVersion;
|
||||
}
|
||||
@ -120,9 +126,12 @@ public final class Profile {
|
||||
return v;
|
||||
}
|
||||
|
||||
public transient final EventHandler<String> selectedVersionChangedEvent = new EventHandler<>(this);
|
||||
|
||||
public void setSelectedMinecraftVersion(String selectedMinecraftVersion) {
|
||||
this.selectedMinecraftVersion = selectedMinecraftVersion;
|
||||
Settings.save();
|
||||
selectedVersionChangedEvent.execute(selectedMinecraftVersion);
|
||||
}
|
||||
|
||||
public String getGameDir() {
|
||||
@ -361,12 +370,13 @@ public final class Profile {
|
||||
public void checkFormat() {
|
||||
gameDir = gameDir.replace('/', OS.os().fileSeparator).replace('\\', OS.os().fileSeparator);
|
||||
}
|
||||
|
||||
|
||||
transient final InstallerService is = new InstallerService(this);
|
||||
|
||||
public InstallerService getInstallerService() {
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
public DownloadType getDownloadType() {
|
||||
return Settings.getInstance().getDownloadSource();
|
||||
}
|
||||
|
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/settings/Settings.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/settings/Settings.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/CrashReporter.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/CrashReporter.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/FileNameFilter.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/FileNameFilter.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/MCUtils.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/MCUtils.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/ModInfo.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/ModInfo.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/AssetsIndex.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/AssetsIndex.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/AssetsMojangLoader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/AssetsMojangLoader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/AssetsObject.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/AssetsObject.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/Contents.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/Contents.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/IAssetsHandler.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/assets/IAssetsHandler.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/AuthenticationException.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/AuthenticationException.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/BestLogin.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/BestLogin.java
Normal file → Executable file
28
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/IAuthenticator.java
Normal file → Executable file
28
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/IAuthenticator.java
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@ -19,7 +19,7 @@ package org.jackhuang.hellominecraft.launcher.utils.auth;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.jackhuang.hellominecraft.launcher.settings.Settings;
|
||||
import org.jackhuang.hellominecraft.launcher.api.PluginManager;
|
||||
|
||||
/**
|
||||
* Login interface
|
||||
@ -28,23 +28,10 @@ import org.jackhuang.hellominecraft.launcher.settings.Settings;
|
||||
*/
|
||||
public abstract class IAuthenticator {
|
||||
|
||||
public static final YggdrasilAuthenticator YGGDRASIL_LOGIN;
|
||||
public static final OfflineAuthenticator OFFLINE_LOGIN;
|
||||
public static final SkinmeAuthenticator SKINME_LOGIN;
|
||||
|
||||
public static final List<IAuthenticator> LOGINS;
|
||||
public static final List<IAuthenticator> LOGINS = new ArrayList<>();
|
||||
|
||||
static {
|
||||
String clientToken = Settings.getInstance().getClientToken();
|
||||
LOGINS = new ArrayList<>();
|
||||
LOGINS.add(OFFLINE_LOGIN = new OfflineAuthenticator(clientToken));
|
||||
LOGINS.add(YGGDRASIL_LOGIN = new YggdrasilAuthenticator(clientToken));
|
||||
LOGINS.add(SKINME_LOGIN = new SkinmeAuthenticator(clientToken));
|
||||
YGGDRASIL_LOGIN.onLoadSettings(Settings.getInstance().getYggdrasilConfig());
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(()
|
||||
-> Settings.getInstance().setYggdrasilConfig(YGGDRASIL_LOGIN.onSaveSettings())
|
||||
));
|
||||
PluginManager.NOW_PLUGIN.onRegisterAuthenticators(LOGINS::add);
|
||||
}
|
||||
|
||||
protected String clientToken;
|
||||
@ -59,7 +46,8 @@ public abstract class IAuthenticator {
|
||||
* @param info username & password
|
||||
*
|
||||
* @return login result
|
||||
* @throws org.jackhuang.hellominecraft.launcher.utils.auth.AuthenticationException
|
||||
* @throws
|
||||
* org.jackhuang.hellominecraft.launcher.utils.auth.AuthenticationException
|
||||
*/
|
||||
public abstract UserProfileProvider login(LoginInfo info) throws AuthenticationException;
|
||||
|
||||
@ -72,10 +60,10 @@ public abstract class IAuthenticator {
|
||||
/**
|
||||
* Has password?
|
||||
*
|
||||
* @return Need to hide password box?
|
||||
* @return has password?
|
||||
*/
|
||||
public boolean hasPassword() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isLoggedIn() {
|
||||
|
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/LoginInfo.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/LoginInfo.java
Normal file → Executable file
6
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/OfflineAuthenticator.java
Normal file → Executable file
6
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/OfflineAuthenticator.java
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@ -33,7 +33,7 @@ public final class OfflineAuthenticator extends IAuthenticator {
|
||||
|
||||
@Override
|
||||
public UserProfileProvider login(LoginInfo info) throws AuthenticationException {
|
||||
if(StrUtils.isBlank(info.username))
|
||||
if (StrUtils.isBlank(info.username))
|
||||
throw new AuthenticationException(C.i18n("login.no_Player007"));
|
||||
UserProfileProvider result = new UserProfileProvider();
|
||||
result.setUserName(info.username);
|
||||
@ -56,7 +56,7 @@ public final class OfflineAuthenticator extends IAuthenticator {
|
||||
|
||||
@Override
|
||||
public boolean hasPassword() {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/SkinmeAuthenticator.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/SkinmeAuthenticator.java
Normal file → Executable file
11
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/UserProfileProvider.java
Normal file → Executable file
11
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/UserProfileProvider.java
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Hello Minecraft! Launcher.
|
||||
* Copyright (C) 2013 huangyuhui <huanghongxun2008@126.com>
|
||||
*
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@ -59,14 +59,6 @@ public final class UserProfileProvider {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
|
||||
public String getErrorReason() {
|
||||
return error;
|
||||
}
|
||||
|
||||
public void setErrorReason(String error) {
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public String getUserProperties() {
|
||||
return userProperties;
|
||||
}
|
||||
@ -111,7 +103,6 @@ public final class UserProfileProvider {
|
||||
private String userId = "";
|
||||
private String session = "";
|
||||
private String accessToken = "";
|
||||
private String error = "";
|
||||
private String userProperties = "{}";
|
||||
private String userPropertyMap = "{}";
|
||||
private String otherInfo = "";
|
||||
|
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/YggdrasilAuthenticator.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/YggdrasilAuthenticator.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/AuthenticationRequest.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/AuthenticationRequest.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/GameProfile.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/GameProfile.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/Property.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/Property.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/PropertyMap.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/PropertyMap.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/RefreshRequest.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/RefreshRequest.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/Response.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/Response.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/UUIDTypeAdapter.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/UUIDTypeAdapter.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/User.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/User.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/YggdrasilAuthentication.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/auth/yggdrasil/YggdrasilAuthentication.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/BMCLAPIDownloadProvider.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/BMCLAPIDownloadProvider.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/DownloadType.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/DownloadType.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/IDownloadProvider.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/IDownloadProvider.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/MojangDownloadProvider.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/MojangDownloadProvider.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/RapidDataDownloadProvider.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/download/RapidDataDownloadProvider.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallProfile.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallProfile.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallerService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallerService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallerType.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallerType.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallerVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallerVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallerVersionNewerComparator.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/InstallerVersionNewerComparator.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/PackMinecraftInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/PackMinecraftInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/ForgeInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/ForgeInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/ForgeOldInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/ForgeOldInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/Install.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/Install.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/MinecraftForgeVersion.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/MinecraftForgeVersion.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/MinecraftForgeVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/MinecraftForgeVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/MinecraftForgeVersionRoot.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/forge/MinecraftForgeVersionRoot.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderMCVersions.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderMCVersions.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderVersion.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderVersion.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderVersionsMeta.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderVersionsMeta.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderVersionsRoot.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/liteloader/LiteLoaderVersionsRoot.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/OptiFineInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/OptiFineInstaller.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/OptiFineVersion.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/OptiFineVersion.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/bmcl/OptiFineBMCLVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/bmcl/OptiFineBMCLVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/vanilla/OptiFineDownloadFormatter.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/vanilla/OptiFineDownloadFormatter.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/vanilla/OptiFineVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/installers/optifine/vanilla/OptiFineVersionList.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/upgrade/AppDataUpgrader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/upgrade/AppDataUpgrader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/upgrade/IUpgrader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/upgrade/IUpgrader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/upgrade/NewFileUpgrader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/utils/upgrade/NewFileUpgrader.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/Extract.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/Extract.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/GameDirType.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/GameDirType.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/IMinecraftLibrary.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/IMinecraftLibrary.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/MinecraftAssetService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/MinecraftAssetService.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/MinecraftClassicVersion.java
Normal file → Executable file
0
HMCL/src/main/java/org/jackhuang/hellominecraft/launcher/version/MinecraftClassicVersion.java
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user