Skip to content

Commit 000e974

Browse files
committed
Merge 1.16 into 1.18
2 parents 0c3cade + 7fa6c45 commit 000e974

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

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

74+
public static boolean isEarlyLoadingNormally() {
75+
return LoadingModList.get().getErrors().isEmpty();
76+
}
77+
7478
public static boolean isLoadingNormally() {
75-
if(!LoadingModList.get().getErrors().isEmpty())
76-
return false;
77-
return ModLoader.isLoadingStateValid();
79+
return isEarlyLoadingNormally() && ModLoader.isLoadingStateValid();
7880
}
7981

8082

0 commit comments

Comments
 (0)