Skip to content

Commit

Permalink
update name
Browse files Browse the repository at this point in the history
  • Loading branch information
zkitefly authored Jan 27, 2025
1 parent 255a0d5 commit c41d944
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public void updateItem(RemoteVersion remoteVersion, boolean empty) {
break;
}
if (remoteVersion.getUrls().stream().anyMatch(url -> url.contains("unlisted-versions-of-minecraft"))) {
content.getTags().add("UVMC");
content.getTags().add("Unlisted Minecraft");
}
} else {
VersionIconType iconType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public String getVersionListURL() {
}

@Override
public String getUvmcListURL() {
return getPreferredDownloadProvider().getUvmcListURL();
public String getUnlistedMinecraftURL() {
return getPreferredDownloadProvider().getUnlistedMinecraftURL();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public String getVersionListURL() {
}

@Override
public String getUvmcListURL() {
return versionListProvider.getUvmcListURL();
public String getUnlistedMinecraftURL() {
return versionListProvider.getUnlistedMinecraftURL();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public String getVersionListURL() {
}

@Override
public String getUvmcListURL() {
public String getUnlistedMinecraftURL() {
return "https://vip.123pan.cn/1821946486/unlisted-versions-of-minecraft/version_manifest.json";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public String getVersionListURL() {
}

@Override
public String getUvmcListURL() {
public String getUnlistedMinecraftURL() {
throw new UnsupportedOperationException();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public interface DownloadProvider {

String getVersionListURL();

String getUvmcListURL();
String getUnlistedMinecraftURL();

String getAssetBaseURL();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public String getVersionListURL() {
}

@Override
public String getUvmcListURL() {
public String getUnlistedMinecraftURL() {
return "https://zkitefly.github.io/unlisted-versions-of-minecraft/version_manifest.json";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ public CompletableFuture<?> refreshAsync() {
CompletableFuture<GameRemoteVersions> primaryFuture = HttpRequest.GET(downloadProvider.getVersionListURL())
.getJsonAsync(GameRemoteVersions.class);

CompletableFuture<GameRemoteVersions> uvmcFuture = HttpRequest.GET(downloadProvider.getUvmcListURL())
CompletableFuture<GameRemoteVersions> unlistedMinecraftFuture = HttpRequest.GET(downloadProvider.getUnlistedMinecraftURL())
.getJsonAsync(GameRemoteVersions.class);

return CompletableFuture.allOf(primaryFuture, uvmcFuture)
return CompletableFuture.allOf(primaryFuture, unlistedMinecraftFuture)
.thenAcceptAsync(ignored -> {
lock.writeLock().lock();
try {
versions.clear();

Stream.of(primaryFuture.join(), uvmcFuture.join())
Stream.of(primaryFuture.join(), unlistedMinecraftFuture.join())
.flatMap(gameRemoteVersions -> gameRemoteVersions.getVersions().stream())
.forEach(remoteVersion -> versions.put(
remoteVersion.getGameVersion(),
Expand Down

0 comments on commit c41d944

Please sign in to comment.