Add nogui to server program arguments (#310)

Closes #276
dev/0.11
user11681 2020-12-21 19:44:39 +00:00 committed by GitHub
parent b27bc3d39a
commit 9f6c8486fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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);