Merge 1.19.2 into 1.19.4

This commit is contained in:
embeddedt 2023-07-24 16:05:00 -04:00
commit 512ed02db2
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
3 changed files with 9 additions and 5 deletions

View File

@ -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()) {

View File

@ -50,8 +50,6 @@ public class ConfigFixer {
this.actualHandler.accept(modConfigEvent);
}
} else {
if(modConfigEvent.getConfig().getConfigData() != null)
ModernFix.LOGGER.warn("Unable to sync on a {} config object", modConfigEvent.getConfig().getConfigData().getClass().getName());
this.actualHandler.accept(modConfigEvent);
}
}

View File

@ -35,6 +35,7 @@ import java.lang.reflect.Field;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
@ -51,7 +52,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;
}