fix mojmap reading
All checks were successful
Publish to snapshot maven / build (push) Successful in 20s

This commit is contained in:
moehreag 2024-06-13 16:02:05 +02:00
parent 422fa6aa3a
commit ba6c5ea32c
2 changed files with 4 additions and 4 deletions

View file

@ -8,7 +8,7 @@ plugins {
} }
group = "dev.frogmc" group = "dev.frogmc"
version = "0.0.1-alpha.1" version = "0.0.1-alpha.2"
repositories { repositories {
mavenCentral() mavenCentral()

View file

@ -34,11 +34,11 @@ public class MojmapProvider {
System.out.println("Loading version: " + versionName); System.out.println("Loading version: " + versionName);
for (Map<String, ?> version : (List<Map<String, ?>>) manifest.get("versions")) { for (UnmodifiableConfig version : (List<UnmodifiableConfig>) manifest.get("versions")) {
if (version.get("id").equals(versionName)) { if (version.get("id").equals(versionName)) {
UnmodifiableConfig versionManifest = HttpHelper.getJson((String) version.get("url")).orElseThrow(); UnmodifiableConfig versionManifest = HttpHelper.getJson(version.get("url")).orElseThrow();
String mappingsUrl = (String) ((Map<?, ?>) ((Map<?, ?>) versionManifest String mappingsUrl = ((UnmodifiableConfig) ((UnmodifiableConfig) versionManifest
.get("downloads")).get("client_mappings")).get("url"); .get("downloads")).get("client_mappings")).get("url");
return HttpHelper.getString(mappingsUrl).map(s -> { return HttpHelper.getString(mappingsUrl).map(s -> {