Skip to content

Commit 9c551e6

Browse files
author
IMS212
committed
Add JVM argument iris.installer=true if Iris is installed standalone
1 parent e2f6c1f commit 9c551e6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/net/hypercubemc/iris_installer/VanillaLauncherIntegration.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ private static void editVersionJson(Json profileJson) {
6464
entry.asJsonMap().put("url", factory.string("https://raw.githubusercontent.com/IrisShaders/Iris-Installer-Maven/master/"));
6565
}
6666
}
67+
68+
// Add the JVM argument -Diris.installer=true so Iris can detect if the installer is used
69+
json.getOrDefault("arguments", Json.array()).asJsonMap().getOrDefault("jvm", Json.array()).asJsonList().add(factory.string("-Diris.installer=true"));
6770
}
6871

6972
private static void installProfile(Path mcDir, Path instanceDir, String profileName, String versionId, Icon icon, ProfileInstaller.LauncherType launcherType) throws IOException {

0 commit comments

Comments
 (0)