// Create a new Update checker, in this example for the mod "modmenu", available at https://modrinth.com/mod/modmenuUpdateCheckerupdateChecker = newUpdateChecker("modmenu");
// Set a filter.updateChecker.setFilter(version -> {
// This will only queue versions that support the quilt loader. Only for the sake of the example, please don't use quilt :(booleansupportsQuilt = version.loaders().contains("quilt");
// This will only queue versions that support 1.20.4.booleansupports_1_20_4 = version.gameVersions().contains("1.20.4");
// return the filter result.returnsupportsQuilt && supports_1_20_4;
});
// Run a check. This will send an HTTP-Request via the modrinth api, to the given mod. It will run the below action for every version that matches the above filter.System.out.println("Checking for updates...");
List<Version> versions = updateChecker.checkNow();
if (!versions.isEmpty()) {
System.out.println("Found the following matching versions:");
versions.forEach(version -> System.out.println(version.fileVersion() + " | " + version.gameVersions() + " | " + version.loaders()));
}