Allow piston-data.mojang.com in VersionInfo#hashFromUrl

This commit is contained in:
Doc 2022-06-23 12:54:03 -04:00
parent 1fbeb7f712
commit 668e05a24d
No known key found for this signature in database
GPG key ID: 20C3B20323EFD295

View file

@ -55,7 +55,7 @@ public class VersionInfo
{ {
return hashFromUrl( mappingsUrl ); return hashFromUrl( mappingsUrl );
} }
private static final Pattern URL_PATTERN = Pattern.compile( "https://launcher.mojang.com/v1/objects/([0-9a-f]{40})/.*" ); private static final Pattern URL_PATTERN = Pattern.compile( "https://(?:launcher|piston-data).mojang.com/v1/objects/([\\da-f]{40})/.*" );
public static String hashFromUrl(String url) public static String hashFromUrl(String url)
{ {