Only add -XstartOnFirstThread on mac os
parent
d9d89d1674
commit
f875e34a67
|
@ -28,6 +28,7 @@ import net.fabricmc.loom.LoomGradleExtension;
|
|||
import net.fabricmc.loom.providers.MappingsProvider;
|
||||
import net.fabricmc.loom.util.Constants;
|
||||
import net.fabricmc.loom.util.MinecraftVersionInfo;
|
||||
import net.fabricmc.loom.util.OperatingSystem;
|
||||
import org.gradle.api.tasks.JavaExec;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -78,7 +79,9 @@ public class RunClientTask extends JavaExec {
|
|||
LoomGradleExtension extension = this.getProject().getExtensions().getByType(LoomGradleExtension.class);
|
||||
List<String> args = new ArrayList<>(super.getJvmArgs());
|
||||
args.add("-Dfabric.development=true");
|
||||
if(OperatingSystem.getOS().equalsIgnoreCase("osx")){
|
||||
args.add("-XstartOnFirstThread");
|
||||
}
|
||||
return args;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ public class RunServerTask extends JavaExec {
|
|||
LoomGradleExtension extension = this.getProject().getExtensions().getByType(LoomGradleExtension.class);
|
||||
List<String> args = new ArrayList<>(super.getJvmArgs());
|
||||
args.add("-Dfabric.development=true");
|
||||
args.add("-XstartOnFirstThread");
|
||||
return args;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 "";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue