mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 22:26:56 -04:00
launcher_profiles.json, Hold slot item of hotbar to drop
This commit is contained in:
parent
8b64eb8abc
commit
0d04a1ab1b
Binary file not shown.
0
app/src/main/assets/launcher_profiles.json
Normal file
0
app/src/main/assets/launcher_profiles.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package net.kdt.pojavlaunch.value.launcherprofiles;
|
||||||
|
import com.google.gson.*;
|
||||||
|
import net.kdt.pojavlaunch.*;
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
public class LauncherProfiles
|
||||||
|
{
|
||||||
|
public static MinecraftLauncherProfiles mainProfileJson;
|
||||||
|
public static File launcherProfilesFile = new File(Tools.MAIN_PATH + "/launcher_profiles.json");
|
||||||
|
public static MinecraftLauncherProfiles getJson() {
|
||||||
|
try {
|
||||||
|
if (launcherProfilesFile.exists()) {
|
||||||
|
if (mainProfileJson == null) {
|
||||||
|
mainProfileJson = new Gson().fromJson(Tools.read(launcherProfilesFile.getAbsolutePath()), MinecraftLauncherProfiles.class);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mainProfileJson = new MinecraftLauncherProfiles();
|
||||||
|
}
|
||||||
|
insertMissing();
|
||||||
|
return mainProfileJson;
|
||||||
|
} catch (Throwable th) {
|
||||||
|
throw new RuntimeException(th);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String insert
|
||||||
|
|
||||||
|
private static void insertMissing() {
|
||||||
|
if (mainProfileJson.authenticationDatabase == null) {
|
||||||
|
MinecraftAuthenticationDatabase mad = new MinecraftAuthenticationDatabase();
|
||||||
|
mainProfileJson.authenticationDatabase = mad;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,7 @@ package net.kdt.pojavlaunch.value.launcherprofiles;
|
|||||||
|
|
||||||
public class MinecraftAuthenticationDatabase
|
public class MinecraftAuthenticationDatabase
|
||||||
{
|
{
|
||||||
public static String accessToken;
|
public String accessToken;
|
||||||
public static String username;
|
public String username;
|
||||||
public static MinecraftProfile[] profiles;
|
public MinecraftProfile[] profiles;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,12 @@ package net.kdt.pojavlaunch.value.launcherprofiles;
|
|||||||
|
|
||||||
public class MinecraftLauncherProfiles
|
public class MinecraftLauncherProfiles
|
||||||
{
|
{
|
||||||
public static MinecraftProfile[] profiles;
|
public MinecraftProfile[] profiles;
|
||||||
public static String clientToken;
|
public String clientToken;
|
||||||
public static MinecraftAuthenticationDatabase authenticationDatabase;
|
public MinecraftAuthenticationDatabase[] authenticationDatabase;
|
||||||
|
// public Map launcherVersion;
|
||||||
|
public MinecraftLauncherSettings settings;
|
||||||
|
// public Map analyticsToken;
|
||||||
|
public int analyticsFailcount;
|
||||||
|
public MinecraftSelectedUser selectedUser;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
package net.kdt.pojavlaunch.value.launcherprofiles;
|
||||||
|
|
||||||
|
public class MinecraftLauncherSettings
|
||||||
|
{
|
||||||
|
public boolean enableSnapshots;
|
||||||
|
public boolean enableAdvanced;
|
||||||
|
public boolean keepLauncherOpen;
|
||||||
|
public boolean showGameLog;
|
||||||
|
public String locale;
|
||||||
|
public boolean showMenu;
|
||||||
|
public boolean enableHistorical;
|
||||||
|
public String profileSorting;
|
||||||
|
public boolean crashAssistance;
|
||||||
|
public boolean enableAnalytics;
|
||||||
|
}
|
@ -2,16 +2,16 @@ package net.kdt.pojavlaunch.value.launcherprofiles;
|
|||||||
|
|
||||||
public class MinecraftProfile
|
public class MinecraftProfile
|
||||||
{
|
{
|
||||||
public static String name;
|
public String name;
|
||||||
public static String type;
|
public String type;
|
||||||
public static String created;
|
public String created;
|
||||||
public static String lastUsed;
|
public String lastUsed;
|
||||||
public static String icon;
|
public String icon;
|
||||||
public static String lastVersionId;
|
public String lastVersionId;
|
||||||
public static String gameDir;
|
public String gameDir;
|
||||||
public static String javaDir;
|
public String javaDir;
|
||||||
public static String javaArgs;
|
public String javaArgs;
|
||||||
public static String logConfig;
|
public String logConfig;
|
||||||
public static boolean logConfigIsXML;
|
public boolean logConfigIsXML;
|
||||||
public static MinecraftResolution[]resolution;
|
public MinecraftResolution[] resolution;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,6 @@ package net.kdt.pojavlaunch.value.launcherprofiles;
|
|||||||
|
|
||||||
public class MinecraftResolution
|
public class MinecraftResolution
|
||||||
{
|
{
|
||||||
public static int width;
|
public int width;
|
||||||
public static int height;
|
public int height;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
package net.kdt.pojavlaunch.value.launcherprofiles;
|
||||||
|
|
||||||
|
public class MinecraftSelectedUser
|
||||||
|
{
|
||||||
|
public String account;
|
||||||
|
public String profile;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user