Skip to content

Commit 4943702

Browse files
committed
Add platform name to hooks
1 parent 60525ad commit 4943702

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

common/src/main/java/org/embeddedt/modernfix/platform/ModernFixPlatformHooks.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,9 @@ public static Multimap<String, String> getCustomModOptions() {
9696
public static void onLaunchComplete() {
9797

9898
}
99+
100+
@ExpectPlatform
101+
public static String getPlatformName() {
102+
throw new AssertionError();
103+
}
99104
}

fabric/src/main/java/org/embeddedt/modernfix/platform/fabric/ModernFixPlatformHooksImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,8 @@ public static void onLaunchComplete() {
118118
CommonModUtil.runWithoutCrash(() -> SparkLaunchProfiler.stop("launch"), "Failed to stop profiler");
119119
}
120120
}
121+
122+
public static String getPlatformName() {
123+
return "Fabric";
124+
}
121125
}

forge/src/main/java/org/embeddedt/modernfix/platform/forge/ModernFixPlatformHooksImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,8 @@ public static void onLaunchComplete() {
257257
CommonModUtil.runWithoutCrash(() -> SparkLaunchProfiler.stop("launch"), "Failed to stop profiler");
258258
}
259259
}
260+
261+
public static String getPlatformName() {
262+
return "Forge";
263+
}
260264
}

0 commit comments

Comments
 (0)