Re-introduce "outdated" notification on Mods button in main menu (#7123)

This commit is contained in:
Take Weiland 2020-08-04 00:11:06 +02:00 committed by GitHub
parent b4a6d186de
commit 20702456ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,6 +56,7 @@ import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.fml.BrandingControl;
import net.minecraftforge.fml.LoadingFailedException;
import net.minecraftforge.fml.LogicalSidedProvider;
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.ModLoader;
import net.minecraftforge.fml.ModLoadingStage;
import net.minecraftforge.fml.ModLoadingWarning;
@ -138,7 +139,12 @@ public class ClientModLoader
public static VersionChecker.Status checkForUpdates()
{
return VersionChecker.Status.UP_TO_DATE;
boolean anyOutdated = ModList.get().getMods().stream()
.map(VersionChecker::getResult)
.map(result -> result.status)
.anyMatch(status -> status == VersionChecker.Status.OUTDATED || status == VersionChecker.Status.BETA_OUTDATED);
return anyOutdated ? VersionChecker.Status.OUTDATED : null;
}
public static boolean completeModLoading()