Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/QuestCraft' into QuestCraft
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/pojlib/instance/MinecraftInstance.java
#	src/main/java/pojlib/util/CustomMods.java
#	src/main/java/pojlib/util/ModsJson.java
  • Loading branch information
The Judge committed Apr 12, 2024
2 parents 9487b95 + 0522ead commit 02b360a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/main/java/pojlib/account/MinecraftAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import static pojlib.account.Msa.checkMcProfile;

import android.app.Activity;

import com.google.gson.Gson;

import org.json.JSONException;
Expand Down Expand Up @@ -33,8 +35,8 @@ public static MinecraftAccount login(String gameDir, String[] response) throws I
return account;
}

public static boolean logout(String path) {
File accountFile = new File(path + "/account.json");
public static boolean logout(Activity activity) {
File accountFile = new File(activity.getFilesDir() + "/accounts/account.json");
return accountFile.delete();
}

Expand Down
8 changes: 5 additions & 3 deletions src/main/java/pojlib/api/API_V1.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class API_V1 {
public static String memoryValue = "1800";
public static boolean developerMods;
public static MinecraftAccount currentAcc;

public static boolean advancedDebugger;


Expand Down Expand Up @@ -126,11 +127,11 @@ public static void launchInstance(Activity activity, MinecraftAccount account, M
/**
* Logs the user out
*
* @param home The base directory where minecraft should be setup
* @param activity The base directory where minecraft should be setup
* @return True if logout was successful
*/
public static boolean logout(String home) {
return MinecraftAccount.logout(home);
public static boolean logout(Activity activity) {
return MinecraftAccount.logout(activity);
}

public static void login(Activity activity)
Expand Down Expand Up @@ -159,6 +160,7 @@ public static void login(Activity activity)
API_V1.profileName = API_V1.currentAcc.username;
}
}

LoginHelper.beginLogin(activity);
}
}
2 changes: 1 addition & 1 deletion src/main/java/pojlib/util/JREUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static int launchJavaVM(final Activity activity, final List<String> JVMAr
userArgs.add("-Xms" + API_V1.memoryValue + "M");
userArgs.add("-Xmx" + API_V1.memoryValue + "M");
} else {
if (API_V1.model.equals("Meta Quest Pro")) {
if (API_V1.model.equals("Meta Quest Pro") || API_V1.model.equals("Oculus Headset1")) {
userArgs.add("-Xms" + 4096 + "M");
userArgs.add("-Xmx" + 4096 + "M");
} else {
Expand Down

0 comments on commit 02b360a

Please sign in to comment.