Display ModernFix version in early part of log
This commit is contained in:
parent
bb5e71c651
commit
7f44701670
|
|
@ -32,8 +32,8 @@ public class ModernFixMixinPlugin implements IMixinConfigPlugin {
|
|||
throw new RuntimeException("Could not load configuration file for ModernFix", e);
|
||||
}
|
||||
|
||||
this.logger.info("Loaded configuration file for ModernFix: {} options available, {} override(s) found",
|
||||
config.getOptionCount(), config.getOptionOverrideCount());
|
||||
this.logger.info("Loaded configuration file for ModernFix {}: {} options available, {} override(s) found",
|
||||
ModernFixPlatformHooks.getVersionString(), config.getOptionCount(), config.getOptionOverrideCount());
|
||||
|
||||
config.getOptionMap().values().forEach(option -> {
|
||||
if (option.isOverridden()) {
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ import java.net.URLClassLoader;
|
|||
import java.nio.file.Path;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
|
|
@ -68,7 +69,12 @@ public class ModernFixPlatformHooksImpl {
|
|||
|
||||
public static String getVersionString() {
|
||||
if(verString == null) {
|
||||
verString = LoadingModList.get().getModFileById("modernfix").getMods().get(0).getVersion().toString();
|
||||
try {
|
||||
verString = ModernFixMixinPlugin.class.getPackage().getImplementationVersion();
|
||||
Objects.requireNonNull(verString);
|
||||
} catch(Throwable e) {
|
||||
verString = "[unknown]";
|
||||
}
|
||||
}
|
||||
return verString;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user