Merge 1.16 into 1.18
This commit is contained in:
commit
000e9746ba
|
|
@ -41,7 +41,7 @@ public class ModernFixMixinPlugin implements IMixinConfigPlugin {
|
|||
|
||||
if (option.isUserDefined()) {
|
||||
source = "user configuration";
|
||||
} else if (!ModernFixPlatformHooks.isLoadingNormally()) {
|
||||
} else if (!ModernFixPlatformHooks.isEarlyLoadingNormally()) {
|
||||
source = "load error";
|
||||
} else if (option.isModDefined()) {
|
||||
source = "mods [" + String.join(", ", option.getDefiningMods()) + "]";
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ public class ModernFixEarlyConfig {
|
|||
|
||||
private void disableIfModPresent(String configName, String... ids) {
|
||||
for(String id : ids) {
|
||||
if(!ModernFixPlatformHooks.isLoadingNormally() || modPresent(id)) {
|
||||
if(!ModernFixPlatformHooks.isEarlyLoadingNormally() || modPresent(id)) {
|
||||
Option option = this.options.get(configName);
|
||||
if(option != null)
|
||||
option.addModOverride(false, id);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,11 @@ public class ModernFixPlatformHooks {
|
|||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
public static boolean isEarlyLoadingNormally() {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
public static boolean isLoadingNormally() {
|
||||
throw new AssertionError();
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@ public class ModernFixPlatformHooksImpl {
|
|||
return ModernFixFabric.theServer.get();
|
||||
}
|
||||
|
||||
public static boolean isEarlyLoadingNormally() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean isLoadingNormally() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,10 +71,12 @@ public class ModernFixPlatformHooksImpl {
|
|||
return ServerLifecycleHooks.getCurrentServer();
|
||||
}
|
||||
|
||||
public static boolean isEarlyLoadingNormally() {
|
||||
return LoadingModList.get().getErrors().isEmpty();
|
||||
}
|
||||
|
||||
public static boolean isLoadingNormally() {
|
||||
if(!LoadingModList.get().getErrors().isEmpty())
|
||||
return false;
|
||||
return ModLoader.isLoadingStateValid();
|
||||
return isEarlyLoadingNormally() && ModLoader.isLoadingStateValid();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user