fix: move validation layer under debugLogs option that already exists for things like that
ci/woodpecker/push/docs Pipeline was successful Details
ci/woodpecker/push/jfmod Pipeline failed Details

This commit is contained in:
Johannes Frohnmeyer 2024-05-04 19:57:02 +02:00
parent 9b9fbf844a
commit 35dc868d3b
Signed by: Johannes
GPG Key ID: E76429612C2929F4
4 changed files with 5 additions and 9 deletions

View File

@ -2,9 +2,8 @@
If you run into issues with respackopts and cannot find a solution here,
please contact me directly for support or help (details are at the bottom of this page)
## Enable the validation layer
The validation layer will check your configuration for common issues and report them to you.
This can help you identify common issues with your configuration more quickly.
## Enable debug logs
If debug logs are enabled, respackopts will enable additional checks that make finding common issue much easier.
It is not enabled by default for performance reasons, but if you are making a pack or debugging, it is recommended to enable it.

View File

@ -33,11 +33,11 @@ public class Respackopts implements ModInitializer, SaveHook {
@Override
public void onInitialize() {
if (RespackoptsConfig.validationLayer) ValidationLayer.Pre.INSTANCE.register();
if (RespackoptsConfig.debugLogs) ValidationLayer.Pre.INSTANCE.register();
DirFilterEvents.INSTANCE.register();
FileFilterEvents.INSTANCE.register();
if (RespackoptsConfig.ioLogs) DebugEvents.INSTANCE.register();
if (RespackoptsConfig.validationLayer) ValidationLayer.Post.INSTANCE.register();
if (RespackoptsConfig.debugLogs) ValidationLayer.Post.INSTANCE.register();
ServerInstanceHolder.init();
}

View File

@ -16,7 +16,6 @@ public class RespackoptsConfig implements JfCustomConfig {
public static boolean debugCommands = false;
public static boolean debugLogs = false;
public static boolean ioLogs = false;
public static boolean validationLayer = false;
public static boolean dashloaderCompat = true;
public static ScanState scanState = ScanState.NONE;
@ -41,7 +40,6 @@ public class RespackoptsConfig implements JfCustomConfig {
.value("debugCommands", debugCommands, () -> debugCommands, v -> debugCommands = v)
.value("debugLogs", debugLogs, () -> debugLogs, v -> debugLogs = v)
.value("ioLogs", ioLogs, () -> ioLogs, v -> ioLogs = v)
.value("validationLayer", validationLayer, () -> validationLayer, v -> validationLayer = v)
.value("dashloaderCompat", dashloaderCompat, () -> dashloaderCompat, v -> dashloaderCompat = v)
// Not using Respackopts.FALLBACK_CONF_DIR to avoid premature initialization with libjf-unsafe and libjf-config-reflect
.setPath(dir.resolve("_respackopts.conf"))

View File

@ -5,10 +5,9 @@
"respackopts.jfconfig.title": "ResPackOpts",
"respackopts.jfconfig.debugCommands": "Debug Commands",
"respackopts.jfconfig.debugLogs": "Debug Logs",
"respackopts.jfconfig.debugLogs.tooltip": "Logs some information useful for debugging packs or the mod itself. (requires restart)",
"respackopts.jfconfig.ioLogs": "IO Logs",
"respackopts.jfconfig.ioLogs.tooltip": "Log every resource access. WARNING: This WILL result in giant log files! (requires restart)",
"respackopts.jfconfig.validationLayer": "Validation Layer",
"respackopts.jfconfig.validationLayer.tooltip": "Enable the validation layer to automatically detect some types of problems (requires restart)",
"respackopts.jfconfig.dashloaderCompat": "Dashloader compatibility",
"respackopts.invalid": "Invalid value",
"respackopts.dumpSucceeded": "Successfully dumped the resource to %s",