Skip to content

Commit 3a96f63

Browse files
committed
Merge 1.19.2 into 1.19.4
2 parents b24f82d + 18db311 commit 3a96f63

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

common/src/main/java/org/embeddedt/modernfix/core/ModernFixMixinPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ModernFixMixinPlugin() {
4141

4242
if (option.isUserDefined()) {
4343
source = "user configuration";
44-
} else if (!ModernFixPlatformHooks.isLoadingNormally()) {
44+
} else if (!ModernFixPlatformHooks.isEarlyLoadingNormally()) {
4545
source = "load error";
4646
} else if (option.isModDefined()) {
4747
source = "mods [" + String.join(", ", option.getDefiningMods()) + "]";

common/src/main/java/org/embeddedt/modernfix/core/config/ModernFixEarlyConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ private ModernFixEarlyConfig(File file) {
242242

243243
private void disableIfModPresent(String configName, String... ids) {
244244
for(String id : ids) {
245-
if(!ModernFixPlatformHooks.isLoadingNormally() || modPresent(id)) {
245+
if(!ModernFixPlatformHooks.isEarlyLoadingNormally() || modPresent(id)) {
246246
Option option = this.options.get(configName);
247247
if(option != null)
248248
option.addModOverride(false, id);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ public static MinecraftServer getCurrentServer() {
5656
throw new AssertionError();
5757
}
5858

59+
@ExpectPlatform
60+
public static boolean isEarlyLoadingNormally() {
61+
throw new AssertionError();
62+
}
63+
5964
@ExpectPlatform
6065
public static boolean isLoadingNormally() {
6166
throw new AssertionError();

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
@@ -59,6 +59,10 @@ public static MinecraftServer getCurrentServer() {
5959
return ModernFixFabric.theServer.get();
6060
}
6161

62+
public static boolean isEarlyLoadingNormally() {
63+
return true;
64+
}
65+
6266
public static boolean isLoadingNormally() {
6367
return true;
6468
}

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ public static MinecraftServer getCurrentServer() {
6868
return ServerLifecycleHooks.getCurrentServer();
6969
}
7070

71+
public static boolean isEarlyLoadingNormally() {
72+
return LoadingModList.get().getErrors().isEmpty();
73+
}
74+
7175
public static boolean isLoadingNormally() {
72-
if(!LoadingModList.get().getErrors().isEmpty())
73-
return false;
74-
return ModLoader.isLoadingStateValid();
76+
return isEarlyLoadingNormally() && ModLoader.isLoadingStateValid();
7577
}
7678

7779
public static Path getGameDirectory() {

0 commit comments

Comments
 (0)