From 8a0c05eadb2313cffa05d5224c9063fc3e539c0a Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 10 Dec 2018 20:47:02 -0500 Subject: [PATCH] Add -XstartOnFirstThread, required when running on macOS --- src/main/java/net/fabricmc/loom/task/RunClientTask.java | 1 + src/main/java/net/fabricmc/loom/task/RunServerTask.java | 1 + src/main/java/net/fabricmc/loom/util/IdeaRunConfig.java | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/fabricmc/loom/task/RunClientTask.java b/src/main/java/net/fabricmc/loom/task/RunClientTask.java index 5fe80e0..6bbf0a6 100644 --- a/src/main/java/net/fabricmc/loom/task/RunClientTask.java +++ b/src/main/java/net/fabricmc/loom/task/RunClientTask.java @@ -79,6 +79,7 @@ public class RunClientTask extends JavaExec { LoomGradleExtension extension = this.getProject().getExtensions().getByType(LoomGradleExtension.class); List args = new ArrayList<>(); args.add("-Dfabric.development=true"); + args.add("-XstartOnFirstThread"); return args; } diff --git a/src/main/java/net/fabricmc/loom/task/RunServerTask.java b/src/main/java/net/fabricmc/loom/task/RunServerTask.java index 5f13981..e5a214c 100644 --- a/src/main/java/net/fabricmc/loom/task/RunServerTask.java +++ b/src/main/java/net/fabricmc/loom/task/RunServerTask.java @@ -75,6 +75,7 @@ public class RunServerTask extends JavaExec { LoomGradleExtension extension = this.getProject().getExtensions().getByType(LoomGradleExtension.class); List args = new ArrayList<>(); args.add("-Dfabric.development=true"); + args.add("-XstartOnFirstThread"); return args; } diff --git a/src/main/java/net/fabricmc/loom/util/IdeaRunConfig.java b/src/main/java/net/fabricmc/loom/util/IdeaRunConfig.java index 5e528ed..4e95477 100644 --- a/src/main/java/net/fabricmc/loom/util/IdeaRunConfig.java +++ b/src/main/java/net/fabricmc/loom/util/IdeaRunConfig.java @@ -92,7 +92,7 @@ public class IdeaRunConfig { ideaClient.projectName = project.getName(); ideaClient.configName = "Minecraft Client"; ideaClient.runDir = "file://$PROJECT_DIR$/" + extension.runDir; - ideaClient.vmArgs = "-Dfabric.development=true"; + ideaClient.vmArgs = "-Dfabric.development=true -XstartOnFirstThread"; ideaClient.programArgs = "--tweakClass " + Constants.FABRIC_CLIENT_TWEAKER + " --assetIndex " + minecraftVersionInfo.assetIndex.getFabricId(extension.getMinecraftProvider().minecraftVersion) + " --assetsDir \"" + new File(extension.getUserCache(), "assets").getAbsolutePath() + "\""; return ideaClient;