diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modrinth/ModrinthRemoteModRepository.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modrinth/ModrinthRemoteModRepository.java index 4b60bf3cdd..3734a4b5e9 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modrinth/ModrinthRemoteModRepository.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/modrinth/ModrinthRemoteModRepository.java @@ -576,6 +576,9 @@ public static class ProjectSearchResult implements RemoteMod.IMod { private final List categories; + @SerializedName("display_categories") + private final List displayCategories; + @SerializedName("project_type") private final String projectType; @@ -600,11 +603,12 @@ public static class ProjectSearchResult implements RemoteMod.IMod { @SerializedName("latest_version") private final String latestVersion; - public ProjectSearchResult(String slug, String title, String description, List categories, String projectType, int downloads, String iconUrl, String projectId, String author, List versions, Instant dateCreated, Instant dateModified, String latestVersion) { + public ProjectSearchResult(String slug, String title, String description, List categories, List displayCategories, String projectType, int downloads, String iconUrl, String projectId, String author, List versions, Instant dateCreated, Instant dateModified, String latestVersion) { this.slug = slug; this.title = title; this.description = description; this.categories = categories; + this.displayCategories = displayCategories; this.projectType = projectType; this.downloads = downloads; this.iconUrl = iconUrl; @@ -632,6 +636,10 @@ public List getCategories() { return categories; } + public List getDisplayCategories() { + return displayCategories; + } + public String getProjectType() { return projectType; } @@ -691,7 +699,7 @@ public RemoteMod toMod() { author, title, description, - categories, + displayCategories, String.format("https://modrinth.com/%s/%s", projectType, projectId), iconUrl, this