Only add -XstartOnFirstThread on mac os

This commit is contained in:
modmuss50
2018-12-12 18:10:47 +00:00
parent d9d89d1674
commit f875e34a67
3 changed files with 12 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ public class RunConfig {
ideaClient.projectName = project.getName();
ideaClient.configName = "Minecraft Client";
ideaClient.runDir = "file://$PROJECT_DIR$/" + extension.runDir;
ideaClient.vmArgs = "-Dfabric.development=true -XstartOnFirstThread";
ideaClient.vmArgs = "-Dfabric.development=true" + getOSClientJVMArgs();
ideaClient.programArgs = "--tweakClass " + Constants.FABRIC_CLIENT_TWEAKER + " --assetIndex " + minecraftVersionInfo.assetIndex.getFabricId(extension.getMinecraftProvider().minecraftVersion) + " --assetsDir \"" + new File(extension.getUserCache(), "assets").getAbsolutePath() + "\"";
return ideaClient;
@@ -125,4 +125,11 @@ public class RunConfig {
return dummyConfig;
}
public static String getOSClientJVMArgs(){
if(OperatingSystem.getOS().equalsIgnoreCase("osx")){
return " -XstartOnFirstThread";
}
return "";
}
}