Skip to content

Commit 18db311

Browse files
committed
Merge 1.18 into 1.19.2
2 parents bbcc58f + 000e974 commit 18db311

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
@@ -58,6 +58,11 @@ public static MinecraftServer getCurrentServer() {
5858
throw new AssertionError();
5959
}
6060

61+
@ExpectPlatform
62+
public static boolean isEarlyLoadingNormally() {
63+
throw new AssertionError();
64+
}
65+
6166
@ExpectPlatform
6267
public static boolean isLoadingNormally() {
6368
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
@@ -72,10 +72,12 @@ public static MinecraftServer getCurrentServer() {
7272
return ServerLifecycleHooks.getCurrentServer();
7373
}
7474

75+
public static boolean isEarlyLoadingNormally() {
76+
return LoadingModList.get().getErrors().isEmpty();
77+
}
78+
7579
public static boolean isLoadingNormally() {
76-
if(!LoadingModList.get().getErrors().isEmpty())
77-
return false;
78-
return ModLoader.isLoadingStateValid();
80+
return isEarlyLoadingNormally() && ModLoader.isLoadingStateValid();
7981
}
8082

8183

0 commit comments

Comments
 (0)