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