Skip to content

Commit

Permalink
Add a system property to disable unsupported mod warnings (#434)
Browse files Browse the repository at this point in the history
The system property is `loader.ignore_unsupported_mods` - set this to true with `-Dloader.ignore_unsupported_mods=true` to ignore all unsupported mods.

This is a straightforward solution to #433.
  • Loading branch information
voidpointer0x00 authored May 29, 2024
1 parent 3d8a6ac commit e3962c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,11 @@ private void populateModsGuiTab(ModSolveResultImpl result) {
}
}

if (SystemProperties.getBoolean(SystemProperties.IGNORE_UNSUPPORTED_MODS, false)) {
/* skip unsupported mod checking */
return;
}

Map<UnsupportedType, SortedMap<String, UnsupportedModDetails>> filesList = new HashMap<>();

for (PathLoadState loadState : modPaths.values()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ private SystemProperties() {}
public static final String ALWAYS_DEFER_FILESYSTEM_OPERATIONS = "loader.workaround.defer_all_filesystem_operations";
public static final String DISABLE_QUILT_CLASS_PATH_CUSTOM_TABLE = "loader.quilt_class_path.disable_custom_table";
public static final String DISABLE_BUILTIN_MIXIN_EXTRAS = "loader.disable_builtin_mixin_extras";
/** whether the loader should display unsupported mods with the GUI or ignore and continue starting up the game. */
public static final String IGNORE_UNSUPPORTED_MODS = "loader.ignore_unsupported_mods";

/** Disables loader from registering its {@link URLStreamHandlerFactory} with
* {@link URL#setURLStreamHandlerFactory(URLStreamHandlerFactory)}. This */
Expand Down

0 comments on commit e3962c8

Please sign in to comment.