From 9f6c8486fbaccf81d9dc73d3af9b8a76e87fdb47 Mon Sep 17 00:00:00 2001 From: user11681 <44427720+user11681@users.noreply.github.com> Date: Mon, 21 Dec 2020 19:44:39 +0000 Subject: [PATCH] Add nogui to server program arguments (#310) Closes #276 --- src/main/java/net/fabricmc/loom/util/RunConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/fabricmc/loom/util/RunConfig.java b/src/main/java/net/fabricmc/loom/util/RunConfig.java index 74c98e1..8fa9c1b 100644 --- a/src/main/java/net/fabricmc/loom/util/RunConfig.java +++ b/src/main/java/net/fabricmc/loom/util/RunConfig.java @@ -113,10 +113,9 @@ public class RunConfig { if ("launchwrapper".equals(extension.getLoaderLaunchMethod())) { runConfig.mainClass = "net.minecraft.launchwrapper.Launch"; - runConfig.programArgs = "--tweakClass " + ("client".equals(mode) ? Constants.LaunchWrapper.DEFAULT_FABRIC_CLIENT_TWEAKER : Constants.LaunchWrapper.DEFAULT_FABRIC_SERVER_TWEAKER); + runConfig.programArgs += "--tweakClass " + ("client".equals(mode) ? Constants.LaunchWrapper.DEFAULT_FABRIC_CLIENT_TWEAKER : Constants.LaunchWrapper.DEFAULT_FABRIC_SERVER_TWEAKER); } else { runConfig.mainClass = "net.fabricmc.devlaunchinjector.Main"; - runConfig.programArgs = ""; runConfig.vmArgs = "-Dfabric.dli.config=" + encodeEscaped(extension.getDevLauncherConfig().getAbsolutePath()) + " -Dfabric.dli.env=" + mode.toLowerCase(); } @@ -155,6 +154,7 @@ public class RunConfig { RunConfig ideaClient = new RunConfig(); ideaClient.configName = "Minecraft Client"; + ideaClient.programArgs = ""; populate(project, extension, ideaClient, "client"); ideaClient.vmArgs += getOSClientJVMArgs(); ideaClient.vmArgs += " -Dfabric.dli.main=" + getMainClass("client", extension); @@ -167,6 +167,7 @@ public class RunConfig { RunConfig ideaServer = new RunConfig(); ideaServer.configName = "Minecraft Server"; + ideaServer.programArgs = "nogui "; populate(project, extension, ideaServer, "server"); ideaServer.vmArgs += " -Dfabric.dli.main=" + getMainClass("server", extension);