From b1faeade216be22a9dce5c712e10e427cc251e05 Mon Sep 17 00:00:00 2001 From: DeathsGun Date: Mon, 27 Sep 2021 23:09:16 +0200 Subject: [PATCH 1/4] Use also the release date to determine differences in versions Signed-off-by: DeathsGun --- .../deathsgun/modmanager/api/mod/Version.kt | 3 +++ .../modmanager/providers/modrinth/Modrinth.kt | 6 +++++ .../modrinth/models/ModrinthVersion.kt | 2 ++ .../modmanager/update/UpdateManager.kt | 23 +++++++++++++++---- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt b/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt index 2009bd9..403ac3e 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt @@ -16,9 +16,12 @@ package xyz.deathsgun.modmanager.api.mod +import java.time.LocalDate + data class Version( val version: String, val changelog: String, + val releaseDate: LocalDate, val type: VersionType, val gameVersions: List, val assets: List diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/providers/modrinth/Modrinth.kt b/src/main/kotlin/xyz/deathsgun/modmanager/providers/modrinth/Modrinth.kt index 9a4f781..23da751 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/providers/modrinth/Modrinth.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/providers/modrinth/Modrinth.kt @@ -39,6 +39,8 @@ import java.net.http.HttpClient import java.net.http.HttpRequest import java.net.http.HttpResponse import java.time.Duration +import java.time.Instant +import java.time.ZoneOffset @OptIn(ExperimentalSerializationApi::class) class Modrinth : IModProvider, IModUpdateProvider { @@ -211,6 +213,10 @@ class Modrinth : IModProvider, IModUpdateProvider { Version( modVersion.version, modVersion.changelog, + // 2021-09-03T10:56:59.402790Z + Instant.parse(modVersion.releaseDate).atOffset( + ZoneOffset.UTC + ).toLocalDate(), getVersionType(modVersion.type), modVersion.gameVersions, assets diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/providers/modrinth/models/ModrinthVersion.kt b/src/main/kotlin/xyz/deathsgun/modmanager/providers/modrinth/models/ModrinthVersion.kt index 90a1ae9..c0d4cf7 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/providers/modrinth/models/ModrinthVersion.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/providers/modrinth/models/ModrinthVersion.kt @@ -24,6 +24,8 @@ data class ModrinthVersion( @SerialName("version_number") val version: String, val changelog: String, + @SerialName("date_published") + val releaseDate: String, @SerialName("version_type") val type: String, @SerialName("game_versions") diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt b/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt index 60edd32..101ecac 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt @@ -136,7 +136,7 @@ class UpdateManager { result = updateProvider.getVersionsForMod(mod.id) val versions = when (result) { is VersionResult.Error -> { - logger.error("Error while getting versions for mod {}", metadata.id) + logger.error("Error while getting versions for mod {}", metadata.id, result.cause) ModManager.modManager.setModState(metadata.id, mod.id, ModState.INSTALLED) return } @@ -177,7 +177,7 @@ class UpdateManager { } val versions = when (val result = provider.getVersionsForMod(id)) { is VersionResult.Error -> { - logger.error("Error while getting versions for mod {}", metadata.id) + logger.error("Error while getting versions for mod {}", metadata.id, result.cause) ModManager.modManager.setModState(metadata.id, id, ModState.INSTALLED) return } @@ -261,25 +261,38 @@ class UpdateManager { private fun findLatestCompatible(installedVersion: String, versions: List): Version? { var latest: Version? = null var latestVersion: SemanticVersion? = null + var installed: Version? = null val installVersion = - VersionDeserializer.deserializeSemantic(installedVersion.split("+")[0]) // Remove additional info from version + VersionDeserializer.deserializeSemantic(installedVersion) for (version in versions) { + if (version.version == installedVersion) { + installed = version + } if (!version.gameVersions.contains(ModManager.getMinecraftVersion()) || !ModManager.modManager.config.isReleaseAllowed(version.type) ) { continue } val ver = try { - VersionDeserializer.deserializeSemantic(version.version.split("+")[0]) // Remove additional info from version + VersionDeserializer.deserializeSemantic(version.version) // Remove additional info from version } catch (e: Exception) { + if (latestVersion == null || version.releaseDate > latest?.releaseDate) { + logger.info("Setting version {} via release date", version.version) + latest = version + latestVersion = null + continue + } logger.warn("Skipping error producing version {}", version.version) continue } - if (latestVersion == null || ver > latestVersion) { + if (latestVersion == null || ver > latestVersion || version.releaseDate > latest?.releaseDate) { latest = version latestVersion = ver } } + if (installed != null && installed.releaseDate > latest?.releaseDate) { + return null + } if (latestVersion?.compareTo(installVersion) == 0) { return null } From 3f060e5603140aae201326f1473e4e0911447577 Mon Sep 17 00:00:00 2001 From: DeathsGun Date: Wed, 29 Sep 2021 12:51:53 +0200 Subject: [PATCH 2/4] Rewrote version finding algorithm, added tests for it Signed-off-by: DeathsGun --- build.gradle | 7 +- .../xyz/deathsgun/modmanager/ModManager.kt | 2 +- .../deathsgun/modmanager/api/mod/Version.kt | 8 +- .../xyz/deathsgun/modmanager/config/Config.kt | 16 +- .../modmanager/update/UpdateManager.kt | 71 +- .../modmanager/update/VersionFinder.kt | 90 ++ .../modmanager/dummy/DummyModrinthProvider.kt | 88 + .../modmanager/update/VersionFinderTest.kt | 162 ++ src/test/resources/version/dynamic-fps.json | 246 +++ src/test/resources/version/iris.json | 220 +++ src/test/resources/version/lithium.json | 359 +++++ src/test/resources/version/modmanager.json | 110 ++ src/test/resources/version/modmenu.json | 1412 +++++++++++++++++ src/test/resources/version/terra.json | 1113 +++++++++++++ 14 files changed, 3845 insertions(+), 59 deletions(-) create mode 100644 src/main/kotlin/xyz/deathsgun/modmanager/update/VersionFinder.kt create mode 100644 src/test/kotlin/xyz/deathsgun/modmanager/dummy/DummyModrinthProvider.kt create mode 100644 src/test/kotlin/xyz/deathsgun/modmanager/update/VersionFinderTest.kt create mode 100644 src/test/resources/version/dynamic-fps.json create mode 100644 src/test/resources/version/iris.json create mode 100644 src/test/resources/version/lithium.json create mode 100644 src/test/resources/version/modmanager.json create mode 100644 src/test/resources/version/modmenu.json create mode 100644 src/test/resources/version/terra.json diff --git a/build.gradle b/build.gradle index 45d29eb..b7b6953 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "fabric-loom" version "0.9-SNAPSHOT" id "com.modrinth.minotaur" version "1.2.1" id "org.jetbrains.kotlin.jvm" version "1.5.30" - id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.30' + id "org.jetbrains.kotlin.plugin.serialization" version "1.5.30" } sourceCompatibility = JavaVersion.VERSION_16 @@ -42,10 +42,13 @@ dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}" modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" + + implementation "com.vdurmont:semver4j:3.1.0" - testImplementation 'org.jetbrains.kotlin:kotlin-test:1.5.21' + testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" } processResources { diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/ModManager.kt b/src/main/kotlin/xyz/deathsgun/modmanager/ModManager.kt index 66ddf1c..f0dfe94 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/ModManager.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/ModManager.kt @@ -56,7 +56,7 @@ class ModManager : ClientModInitializer { @JvmStatic fun getMinecraftVersion(): String { - return MinecraftClient.getInstance()?.game?.version?.releaseTarget ?: "1.17.1" + return MinecraftClient.getInstance()?.game?.version?.name ?: "1.17.1" } } diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt b/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt index 403ac3e..1a7e2a0 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt @@ -25,4 +25,10 @@ data class Version( val type: VersionType, val gameVersions: List, val assets: List -) +) : Comparable { + override fun compareTo(other: Version): Int { + return Comparator.comparing { v: Version -> v.version } + .thenComparing { v -> v.releaseDate }.compare(this, other) + } + +} diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/config/Config.kt b/src/main/kotlin/xyz/deathsgun/modmanager/config/Config.kt index a1ea89a..eb06f10 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/config/Config.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/config/Config.kt @@ -69,15 +69,15 @@ data class Config( fun text(): Text { return TranslatableText(String.format("modmanager.channel.%s", name.lowercase())) } - } - fun isReleaseAllowed(type: VersionType): Boolean { - if (updateChannel == UpdateChannel.ALL) { - return true - } - if (updateChannel == UpdateChannel.STABLE && type == VersionType.RELEASE) { - return true + fun isReleaseAllowed(type: VersionType): Boolean { + if (this == ALL) { + return true + } + if (this == STABLE && type == VersionType.RELEASE) { + return true + } + return this == UNSTABLE } - return updateChannel == UpdateChannel.UNSTABLE } } diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt b/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt index 101ecac..1038eb3 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt @@ -23,9 +23,7 @@ import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json import net.fabricmc.loader.api.FabricLoader -import net.fabricmc.loader.api.SemanticVersion import net.fabricmc.loader.api.metadata.ModMetadata -import net.fabricmc.loader.util.version.VersionDeserializer import net.minecraft.text.TranslatableText import org.apache.commons.io.FileUtils import org.apache.logging.log4j.LogManager @@ -99,7 +97,12 @@ class UpdateManager { } var result = updateProvider.getVersionsForMod(metadata.id) if (result is VersionResult.Success) { - val version = findLatestCompatible(metadata.version.friendlyString, result.versions) + val version = VersionFinder.findUpdate( + metadata.version.friendlyString, + ModManager.getMinecraftVersion(), + ModManager.modManager.config.updateChannel, + result.versions + ) if (version == null) { logger.info("No update for {} found!", metadata.id) ModManager.modManager.setModState(metadata.id, metadata.id, ModState.INSTALLED) @@ -142,7 +145,12 @@ class UpdateManager { } is VersionResult.Success -> result.versions } - val version = findLatestCompatible(metadata.version.friendlyString, versions) + val version = VersionFinder.findUpdate( + metadata.version.friendlyString, + ModManager.getMinecraftVersion(), + ModManager.modManager.config.updateChannel, + versions + ) if (version == null) { logger.info("No update for {} found!", metadata.id) ModManager.modManager.setModState(metadata.id, mod.id, ModState.INSTALLED) @@ -183,7 +191,12 @@ class UpdateManager { } is VersionResult.Success -> result.versions } - val version = findLatestCompatible(metadata.version.friendlyString, versions) + val version = VersionFinder.findUpdate( + metadata.version.friendlyString, + ModManager.getMinecraftVersion(), + ModManager.modManager.config.updateChannel, + versions + ) if (version == null) { logger.info("No update for {} found!", metadata.id) ModManager.modManager.setModState(metadata.id, id, ModState.INSTALLED) @@ -212,7 +225,12 @@ class UpdateManager { is VersionResult.Error -> return ModInstallResult.Error(result.text, result.cause) is VersionResult.Success -> result.versions } - val version = findLatestCompatible("0.0.0.0", versions) + val version = VersionFinder.findUpdate( + "0.0.0.0", + ModManager.getMinecraftVersion(), + ModManager.modManager.config.updateChannel, + versions + ) ?: return ModInstallResult.Error(TranslatableText("modmanager.error.noCompatibleModVersionFound")) val dir = FabricLoader.getInstance().gameDir.resolve("mods") @@ -258,47 +276,6 @@ class UpdateManager { } } - private fun findLatestCompatible(installedVersion: String, versions: List): Version? { - var latest: Version? = null - var latestVersion: SemanticVersion? = null - var installed: Version? = null - val installVersion = - VersionDeserializer.deserializeSemantic(installedVersion) - for (version in versions) { - if (version.version == installedVersion) { - installed = version - } - if (!version.gameVersions.contains(ModManager.getMinecraftVersion()) || - !ModManager.modManager.config.isReleaseAllowed(version.type) - ) { - continue - } - val ver = try { - VersionDeserializer.deserializeSemantic(version.version) // Remove additional info from version - } catch (e: Exception) { - if (latestVersion == null || version.releaseDate > latest?.releaseDate) { - logger.info("Setting version {} via release date", version.version) - latest = version - latestVersion = null - continue - } - logger.warn("Skipping error producing version {}", version.version) - continue - } - if (latestVersion == null || ver > latestVersion || version.releaseDate > latest?.releaseDate) { - latest = version - latestVersion = ver - } - } - if (installed != null && installed.releaseDate > latest?.releaseDate) { - return null - } - if (latestVersion?.compareTo(installVersion) == 0) { - return null - } - return latest - } - fun updateMod(update: Update): ModUpdateResult { val oldUpdate = FabricLoader.getInstance().allMods.find { it.metadata.id == update.fabricId } ?: return ModUpdateResult.Error(TranslatableText("modmanager.error.container.notFound")) diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/update/VersionFinder.kt b/src/main/kotlin/xyz/deathsgun/modmanager/update/VersionFinder.kt new file mode 100644 index 0000000..77ec63f --- /dev/null +++ b/src/main/kotlin/xyz/deathsgun/modmanager/update/VersionFinder.kt @@ -0,0 +1,90 @@ +/* + * Copyright 2021 DeathsGun + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package xyz.deathsgun.modmanager.update + +import net.fabricmc.loader.api.SemanticVersion +import net.fabricmc.loader.api.VersionParsingException +import net.fabricmc.loader.util.version.VersionDeserializer +import xyz.deathsgun.modmanager.api.mod.Version +import xyz.deathsgun.modmanager.config.Config + +object VersionFinder { + + fun findUpdateFallback( + installedVersion: String, + mcVersion: String, + updateChannel: Config.UpdateChannel, + modVersions: List + ): Version? { + val versions = + modVersions.filter { updateChannel.isReleaseAllowed(it.type) } + .filter { it.gameVersions.any { it1 -> it1.startsWith(mcVersion) } } + .sortedByDescending { it.releaseDate } + + val version = versions.firstOrNull() + if (version?.version == installedVersion) { + return null + } + return version + } + + internal fun findUpdateByVersion( + installedVersion: String, + mcVersion: String, + channel: Config.UpdateChannel, + modVersions: List + ): Version? { + val versions = modVersions.filter { channel.isReleaseAllowed(it.type) } + .filter { it.gameVersions.any { it1 -> it1.startsWith(mcVersion) } } + var latestVersion: Version? = null + var latestVer: SemanticVersion? = null + val installedVer = VersionDeserializer.deserializeSemantic(installedVersion) + for (version in versions) { + val parsedVersion = try { + VersionDeserializer.deserializeSemantic(version.version) + } catch (e: VersionParsingException) { + continue + } + if (latestVersion == null) { + latestVersion = version + latestVer = parsedVersion + continue + } + if (latestVer != null && parsedVersion > latestVer) { + latestVersion = version + latestVer = parsedVersion + } + } + if (installedVersion == latestVersion?.version || installedVer >= latestVer) { + return null + } + return latestVersion + } + + fun findUpdate( + installedVersion: String, + mcVersion: String, + channel: Config.UpdateChannel, + modVersions: List + ): Version? { + return try { + findUpdateByVersion(installedVersion, mcVersion, channel, modVersions) + } catch (e: VersionParsingException) { + findUpdateFallback(installedVersion, mcVersion, channel, modVersions) + } + } +} \ No newline at end of file diff --git a/src/test/kotlin/xyz/deathsgun/modmanager/dummy/DummyModrinthProvider.kt b/src/test/kotlin/xyz/deathsgun/modmanager/dummy/DummyModrinthProvider.kt new file mode 100644 index 0000000..9ba9315 --- /dev/null +++ b/src/test/kotlin/xyz/deathsgun/modmanager/dummy/DummyModrinthProvider.kt @@ -0,0 +1,88 @@ +/* + * Copyright 2021 DeathsGun + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package xyz.deathsgun.modmanager.dummy + +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.decodeFromString +import kotlinx.serialization.json.Json +import net.minecraft.text.TranslatableText +import xyz.deathsgun.modmanager.api.http.VersionResult +import xyz.deathsgun.modmanager.api.mod.Asset +import xyz.deathsgun.modmanager.api.mod.Version +import xyz.deathsgun.modmanager.api.mod.VersionType +import xyz.deathsgun.modmanager.api.provider.IModUpdateProvider +import xyz.deathsgun.modmanager.providers.modrinth.models.ModrinthVersion +import java.io.BufferedReader +import java.io.InputStreamReader +import java.time.Instant +import java.time.ZoneOffset + +internal class DummyModrinthVersionProvider : IModUpdateProvider { + + private val json = Json { + ignoreUnknownKeys = true + } + + override fun getName(): String { + return "Modrinth" + } + + @OptIn(ExperimentalSerializationApi::class) + override fun getVersionsForMod(id: String): VersionResult { + return try { + val stream = DummyModrinthVersionProvider::class.java.getResourceAsStream("/version/$id.json") + ?: return VersionResult.Error(TranslatableText("reading.failed")) + val reader = BufferedReader(InputStreamReader(stream)) + val modrinthVersions = json.decodeFromString>(reader.readText()) + val versions = ArrayList() + for (modVersion in modrinthVersions) { + if (!modVersion.loaders.contains("fabric")) { + continue + } + val assets = ArrayList() + for (file in modVersion.files) { + assets.add(Asset(file.url, file.filename, file.hashes, file.primary)) + } + versions.add( + Version( + modVersion.version, + modVersion.changelog, + // 2021-09-03T10:56:59.402790Z + Instant.parse(modVersion.releaseDate).atOffset( + ZoneOffset.UTC + ).toLocalDate(), + getVersionType(modVersion.type), + modVersion.gameVersions, + assets + ) + ) + } + VersionResult.Success(versions) + } catch (e: Exception) { + VersionResult.Error(TranslatableText("modmanager.error.failedToParse", e.message), e) + } + } + + private fun getVersionType(id: String): VersionType { + return when (id) { + "release" -> VersionType.RELEASE + "alpha" -> VersionType.ALPHA + "beta" -> VersionType.BETA + else -> VersionType.UNKNOWN + } + } +} \ No newline at end of file diff --git a/src/test/kotlin/xyz/deathsgun/modmanager/update/VersionFinderTest.kt b/src/test/kotlin/xyz/deathsgun/modmanager/update/VersionFinderTest.kt new file mode 100644 index 0000000..d29a2e2 --- /dev/null +++ b/src/test/kotlin/xyz/deathsgun/modmanager/update/VersionFinderTest.kt @@ -0,0 +1,162 @@ +/* + * Copyright 2021 DeathsGun + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package xyz.deathsgun.modmanager.update + +import net.fabricmc.loader.api.VersionParsingException +import org.apache.logging.log4j.LogManager +import org.junit.jupiter.api.DynamicTest.dynamicTest +import org.junit.jupiter.api.TestFactory +import org.junit.jupiter.api.fail +import xyz.deathsgun.modmanager.api.http.VersionResult +import xyz.deathsgun.modmanager.api.provider.IModUpdateProvider +import xyz.deathsgun.modmanager.config.Config +import xyz.deathsgun.modmanager.dummy.DummyModrinthVersionProvider +import kotlin.test.assertEquals +import kotlin.test.assertNotNull +import kotlin.test.assertNull +import kotlin.test.assertTrue + +internal class VersionFinderTest { + + private val logger = LogManager.getLogger() + private val provider: IModUpdateProvider = DummyModrinthVersionProvider() + + @TestFactory + fun findUpdateByFallback() = listOf( + Scenario( + "lithium", + "mc1.17.1-0.7.4", + "mc1.17.1-0.7.1", + Config.UpdateChannel.STABLE, + "1.17" + ), + Scenario( + "dynamic-fps", + "v2.0.5", + "2.0.5", + Config.UpdateChannel.STABLE, + "1.17" + ), + Scenario( + "iris", + "mc1.17.1-1.1.2", + "mc1.17-v1.1.1", + Config.UpdateChannel.STABLE, + "1.17" + ) + ).map { scenario -> + dynamicTest("${scenario.mod} ${scenario.expectedVersion} ${scenario.channel}") { + val versions = when (val result = provider.getVersionsForMod(scenario.mod)) { + is VersionResult.Error -> fail(result.text.key, result.cause) + is VersionResult.Success -> result.versions + } + val latest = VersionFinder.findUpdateFallback( + scenario.installedVersion, + scenario.mcVersion, + scenario.channel, + versions + ) + assertNotNull(latest) + assertEquals(scenario.expectedVersion, latest.version) + assertTrue(latest.assets.isNotEmpty()) + } + } + + @TestFactory + fun findUpdateByVersionError() = listOf( + Scenario( + "lithium", + "mc1.17.1-0.7.4", + "mc1.17.1-0.7.1", + Config.UpdateChannel.STABLE, + "1.17" + ), + Scenario( + "terra", + "5.4.1-BETA+40e95073", + "fabric-5.3.3-BETA+6027c282", + Config.UpdateChannel.ALL, + "1.17" + ) + ).map { scenario -> + dynamicTest("${scenario.mod} ${scenario.expectedVersion} ${scenario.channel}") { + val versions = when (val result = provider.getVersionsForMod(scenario.mod)) { + is VersionResult.Error -> fail(result.text.key, result.cause) + is VersionResult.Success -> result.versions + } + val latest = try { + VersionFinder.findUpdateByVersion( + scenario.installedVersion, + scenario.mcVersion, + scenario.channel, + versions + ) + } catch (e: VersionParsingException) { + null + } + assertNull(latest) + } + } + + @TestFactory + fun findUpdateByVersion() = listOf( + Scenario( + "modmanager", + "1.0.2+1.17-alpha", + "1.0.0-alpha", + Config.UpdateChannel.ALL, + "1.17" + ), + Scenario( + "terra", + "5.4.1-BETA+40e95073", + "5.3.3-BETA+6027c282", // actually fabric-5.3.3-BETA+6027c282 + Config.UpdateChannel.ALL, + "1.17" + ), + Scenario( + "modmenu", + "2.0.13", + "2.0.5", + Config.UpdateChannel.ALL, + "1.17" + ) + ).map { scenario -> + dynamicTest("${scenario.mod} ${scenario.expectedVersion} ${scenario.channel}") { + val versions = when (val result = provider.getVersionsForMod(scenario.mod)) { + is VersionResult.Error -> fail(result.text.key, result.cause) + is VersionResult.Success -> result.versions + } + val latest = VersionFinder.findUpdateByVersion( + scenario.installedVersion, + scenario.mcVersion, + scenario.channel, + versions + ) + assertNotNull(latest) + assertEquals(scenario.expectedVersion, latest.version) + } + } + + private data class Scenario( + val mod: String, + val expectedVersion: String, + val installedVersion: String, + val channel: Config.UpdateChannel, + val mcVersion: String + ) +} \ No newline at end of file diff --git a/src/test/resources/version/dynamic-fps.json b/src/test/resources/version/dynamic-fps.json new file mode 100644 index 0000000..1dd0cf7 --- /dev/null +++ b/src/test/resources/version/dynamic-fps.json @@ -0,0 +1,246 @@ +[ + { + "id": "RgJGw0dO", + "mod_id": "LQ3K71Q1", + "author_id": "HLI9Dbyv", + "featured": false, + "name": "v2.0.5", + "version_number": "v2.0.5", + "changelog": "- Worked around reload screen fadeout not working (#35—thanks, altrisi!)\n- File size reduced by ~300 KB (#30—thanks, wafflecoffee!)\n- Localization updates: Russian (#28), Chinese (#34)", + "changelog_url": null, + "date_published": "2021-08-08T21:03:25.103818Z", + "downloads": 2929, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "84135f5da20608c732ac90439dd7929dcf61cc6471667e5c8842466ec0cbfdf3199d8dc2cdb2088b5ba76cde55c5df015989b00376d6be65c4b8a1c1d3b13be7", + "sha1": "07eab9095517baedb1ba8426310e7fa66fd9747d" + }, + "url": "https://cdn.modrinth.com/data/LQ3K71Q1/versions/v2.0.5/dynamic-fps-2.0.5.jar", + "filename": "dynamic-fps-2.0.5.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "oIZUkvvs", + "mod_id": "LQ3K71Q1", + "author_id": "HLI9Dbyv", + "featured": false, + "name": "2.0.4", + "version_number": "v2.0.4", + "changelog": "- Added an option to run garbage collection whenever the window loses focus.", + "changelog_url": null, + "date_published": "2021-06-29T12:56:14.536461Z", + "downloads": 1300, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "a172c61df0a4deffa669d19f7dd83282b2ea0210", + "sha512": "539617d9f1b32fc4ef3859ec6c7cf934de20552b0f3255b8881213c8496fbcb7d646375fd5558cf173d8ce7db9e97add9f2f49b3dd05ee181f6334d14b9c666f" + }, + "url": "https://cdn.modrinth.com/data/LQ3K71Q1/versions/v2.0.4/dynamic-fps-2.0.4.jar", + "filename": "dynamic-fps-2.0.4.jar", + "primary": true + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1-pre1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "muZxaaxq", + "mod_id": "LQ3K71Q1", + "author_id": "HLI9Dbyv", + "featured": false, + "name": "2.0.2", + "version_number": "v2.0.2", + "changelog": "- Updated Russian Localization ([#22—Felix14-v2](https://github.com/juliand665/Dynamic-FPS/pull/22))", + "changelog_url": null, + "date_published": "2021-05-08T14:35:25.087402Z", + "downloads": 1524, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "1b080f859e529dbe87a0b5d7c71adfbb6bca5db4", + "sha512": "b3a8a9e008a3cf6c585c3ddd016374f6e202e8f321259c7c2cd014936884d4658ad5ef0de685e0cee92d51840c12ef8a5438efc2a7e7ffaf4dfe3745dad293d5" + }, + "url": "https://cdn.modrinth.com/data/LQ3K71Q1/versions/2.0.2/dynamic-fps-2.0.2.jar", + "filename": "dynamic-fps-2.0.2.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5", + "21w03a", + "21w05a", + "21w05b", + "21w06a", + "21w07a", + "21w08a", + "21w08b", + "21w10a", + "21w11a", + "21w13a", + "21w14a", + "21w15a", + "21w16a", + "21w17a", + "21w18a" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "XlBOTUIQ", + "mod_id": "LQ3K71Q1", + "author_id": "HLI9Dbyv", + "featured": false, + "name": "Localization", + "version_number": "v2.0.1", + "changelog": "", + "changelog_url": null, + "date_published": "2021-01-21T04:25:08.291787Z", + "downloads": 772, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "923eb8206fea45bfc455bb195d71ab3eddf986e1cc2cc48fa9543e7601b34c0e184ad463f4c119622218559a7872ea4e3ebc6815c2dc172f41d1cabe1171ffa2", + "sha1": "672904fc5332f7064db872635549b63a10444f59" + }, + "url": "https://cdn.modrinth.com/data/LQ3K71Q1/versions/v2.0.1/dynamic-fps-2.0.1.jar", + "filename": "dynamic-fps-2.0.1.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.2", + "1.16.3", + "1.16.3-rc1", + "1.16.4", + "1.16.4-pre1", + "1.16.4-pre2", + "1.16.4-rc1", + "1.16.5", + "1.16.5-rc1", + "20w45a", + "20w46a", + "20w48a", + "20w49a", + "20w51a", + "21w03a" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "gVvtLF6M", + "mod_id": "LQ3K71Q1", + "author_id": "HLI9Dbyv", + "featured": false, + "name": "Configurability", + "version_number": "v2.0.0", + "changelog": "", + "changelog_url": null, + "date_published": "2021-01-19T16:53:49.879150Z", + "downloads": 28, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "972a09c66b164dd77e97524e06fc16904a859863", + "sha512": "38e85da3025c9b47905781fae0f4ae10a2437e97716c3fa60bb04510c57154e14e3cbd17a6ee5a8b375ee66621010a0110f9784709abd3a7fbdbbb5220be0be7" + }, + "url": "https://cdn.modrinth.com/data/LQ3K71Q1/versions/v2.0.0/dynamic-fps-2.0.0.jar", + "filename": "dynamic-fps-2.0.0.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.2", + "1.16.3", + "1.16.3-rc1", + "1.16.4", + "1.16.4-pre1", + "1.16.4-pre2", + "1.16.4-rc1", + "1.16.5", + "1.16.5-rc1", + "20w45a", + "20w46a", + "20w48a", + "20w49a", + "20w51a" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "kurPEwi6", + "mod_id": "LQ3K71Q1", + "author_id": "HLI9Dbyv", + "featured": false, + "name": "Localization", + "version_number": "v1.2.1", + "changelog": "", + "changelog_url": "https://cdn.modrinth.com/data/LQ3K71Q1/versions/v1.2.1/changelog.md", + "date_published": "2021-01-07T18:37:47.131931Z", + "downloads": 17, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "2103fd47a4ee86087e908df34eacdcb0bc271d09" + }, + "url": "https://cdn.modrinth.com/data/LQ3K71Q1/versions/v1.2.1/dynamic-fps-1.2.1.jar", + "filename": "dynamic-fps-1.2.1.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.2", + "1.16.2-pre1", + "1.16.2-pre2", + "1.16.2-pre3", + "1.16.2-rc1", + "1.16.2-rc2", + "1.16.3", + "1.16.3-rc1", + "1.16.4", + "1.16.4-pre1", + "1.16.4-pre2", + "1.16.4-rc1", + "20w45a", + "20w46a", + "20w48a", + "20w49a", + "20w51a" + ], + "loaders": [ + "fabric" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/version/iris.json b/src/test/resources/version/iris.json new file mode 100644 index 0000000..66023ff --- /dev/null +++ b/src/test/resources/version/iris.json @@ -0,0 +1,220 @@ +[ + { + "id": "YwBoFV6P", + "mod_id": "YL57xq9U", + "author_id": "v7k4QluE", + "featured": false, + "name": "Iris v1.1.2 + Sodium for MC 1.17.1", + "version_number": "mc1.17.1-1.1.2", + "changelog": "A trimmed changelog is available below. A more detailed changelog is available [on GitHub](https://github.com/IrisShaders/Iris/blob/trunk/docs/changelogs/1.1.2/full.md) for those who are interested.\n\n## Notable Changes\n\n- This release includes a new shadow culling system as well as a new batched entity rendering system, improving performance with many shader packs and fixing a bunch of bugs!\n- For 1.17.1 and above, this release also contains a modified version of Sodium based on 0.3.2 instead of 0.3.0 like before, improving performance and graphics driver compatibility.\n\n## Major changes for all versions\n\n- Shadow culling has been completely rewritten. It no longer incorrectly culls chunks compared to OptiFine, and overall performance has improved greatly compared to the previous system (especially with shader packs like Enhanced Default, BSL, and Complementary Shaders).\n- A Max Shadow Distance slider is now available in Video Settings, allowing you to tweak the render distance of shadows on packs that don't specify one.\n- Batched entity rendering has been completely rewritten, fixing many memory management, correctness, and performance issues.\n- Fog now fully works in most shader packs, including Sildur's Enhanced Default and other vanilla-like shaders\n- Entities now flash red when hurt, and flash white when they are going to explode\n- End portals now properly render with most shader packs\n- blockEntityId and entityId are now fully supported (Fixes many issues with Complementary Shaders' Integrated PBR)\n- Iris now has initial support for the path-traced lighting in SEUS PTGI, and has some fixes to the lighting in SEUS Renewed. (SEUS PTGI is still not officially supported, its water still does not work on Iris.)\n\n## Major fixes for 1.17.1 and above\n\n- End gateway beams no longer appear to render twice with shader packs that use shadows.\n- Fixed separate leads incorrectly rendering as connected\n- Block selection outlines now render properly, even with world curvature enabled. (due to a different issue that will be fixed soon, this doesn't work with some packs like Enhanced Default.)\n- Chunk borders (F3 + G), hitboxes, and other lines now render properly with shaders enabled. (similarly, this doesn't work with some packs like Enhanced Default.)\n- World borders render properly with most packs now.\n- The energy swirl around charged creepers now renders properly.\n\n## Mod compatibility fixes\n\n- Fix most issues with Physics Mod\n- Initial compatibility with Immersive Portals is now available on 1.17.1, though there are still issues. (credit to qouteall for implementing the compatibility code)\n- Fixed an issue where directional shading would be enabled on some blocks rendered with the Fabric Rendering API, even if the shader pack disabled it. (Fixes issues with CTM mods)\n- Added a new screen for when you have an incompatible version of Sodium installed.\n\n## But wait, there's more!\n\nFor the first time, we are releasing versions of Iris for the 1.18 snapshots for everyone to use. These builds do not represent the final version, however, they should be mostly playable (though there are significant performance issues caused by 1.18 itself.) These builds will be released to Patrons first for testing, then released for the general public after a few days once we confirm no major issues are in them. Currently, you can only get 1.18 versions of Iris through Github Releases (for Fabric). Overall, shaders should be mostly usable on 1.18 snapshots!\n", + "changelog_url": null, + "date_published": "2021-09-06T02:38:18.747662Z", + "downloads": 5205, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "55a13a56c6eed76ab98fdce9bcf8f4dbaa66a2b09f6caf254fdd24ff4bd0f147542e380be9f854b85048848eaaa1d478beef84c3b8f4f271a345b529f312a161", + "sha1": "259d43b3b89827a22717f5628dcb67469224adbd" + }, + "url": "https://cdn.modrinth.com//data/YL57xq9U/versions/mc1.17.1-1.1.2/iris-and-sodium-mc1.17-1.1.2+build.9.jar", + "filename": "iris-and-sodium-mc1.17-1.1.2+build.9.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "ZmYHYMB0", + "mod_id": "YL57xq9U", + "author_id": "v7k4QluE", + "featured": false, + "name": "Iris v1.1.2 + Sodium for MC 1.16.5", + "version_number": "mc1.16.5-1.1.2", + "changelog": "A trimmed changelog is available below. A more detailed changelog is available [on GitHub](https://github.com/IrisShaders/Iris/blob/trunk/docs/changelogs/1.1.2/full.md) for those who are interested.\n\n## Notable Changes\n\n- This release includes a new shadow culling system as well as a new batched entity rendering system, improving performance with many shader packs and fixing a bunch of bugs!\n- For 1.17.1 and above, this release also contains a modified version of Sodium based on 0.3.2 instead of 0.3.0 like before, improving performance and graphics driver compatibility.\n\n## Major changes for all versions\n\n- Shadow culling has been completely rewritten. It no longer incorrectly culls chunks compared to OptiFine, and overall performance has improved greatly compared to the previous system (especially with shader packs like Enhanced Default, BSL, and Complementary Shaders).\n- A Max Shadow Distance slider is now available in Video Settings, allowing you to tweak the render distance of shadows on packs that don't specify one.\n- Batched entity rendering has been completely rewritten, fixing many memory management, correctness, and performance issues.\n- Fog now fully works in most shader packs, including Sildur's Enhanced Default and other vanilla-like shaders\n- Entities now flash red when hurt, and flash white when they are going to explode\n- End portals now properly render with most shader packs\n- blockEntityId and entityId are now fully supported (Fixes many issues with Complementary Shaders' Integrated PBR)\n- Iris now has initial support for the path-traced lighting in SEUS PTGI, and has some fixes to the lighting in SEUS Renewed. (SEUS PTGI is still not officially supported, its water still does not work on Iris.)\n\n## Major fixes for 1.17.1 and above\n\n- End gateway beams no longer appear to render twice with shader packs that use shadows.\n- Fixed separate leads incorrectly rendering as connected\n- Block selection outlines now render properly, even with world curvature enabled. (due to a different issue that will be fixed soon, this doesn't work with some packs like Enhanced Default.)\n- Chunk borders (F3 + G), hitboxes, and other lines now render properly with shaders enabled. (similarly, this doesn't work with some packs like Enhanced Default.)\n- World borders render properly with most packs now.\n- The energy swirl around charged creepers now renders properly.\n\n## Mod compatibility fixes\n\n- Fix most issues with Physics Mod\n- Initial compatibility with Immersive Portals is now available on 1.17.1, though there are still issues. (credit to qouteall for implementing the compatibility code)\n- Fixed an issue where directional shading would be enabled on some blocks rendered with the Fabric Rendering API, even if the shader pack disabled it. (Fixes issues with CTM mods)\n- Added a new screen for when you have an incompatible version of Sodium installed.\n\n## But wait, there's more!\n\nFor the first time, we are releasing versions of Iris for the 1.18 snapshots for everyone to use. These builds do not represent the final version, however, they should be mostly playable (though there are significant performance issues caused by 1.18 itself.) These builds will be released to Patrons first for testing, then released for the general public after a few days once we confirm no major issues are in them. Currently, you can only get 1.18 versions of Iris through Github Releases (for Fabric). Overall, shaders should be mostly usable on 1.18 snapshots!\n", + "changelog_url": null, + "date_published": "2021-09-06T02:31:47.141289Z", + "downloads": 1004, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "3a5f8fa1da6973da5714c7577388049dc3183699", + "sha512": "4c4458f0a82141e3a91b92c678ec37503c8304e32e2f47f28141068cb214aec5243b8f5c48fd88e4a880dcf5f2c8cc4707095996deff05692f6b19dddebc6372" + }, + "url": "https://cdn.modrinth.com//data/YL57xq9U/versions/mc1.16.5-1.1.2/iris-and-sodium-mc1.16.5-1.1.2+build.4.jar", + "filename": "iris-and-sodium-mc1.16.5-1.1.2+build.4.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "AosvzXCO", + "mod_id": "YL57xq9U", + "author_id": "DzLrfrbK", + "featured": false, + "name": "Iris v1.1.1 + Sodium for MC 1.16.5", + "version_number": "mc1.16.5-v1.1.1", + "changelog": "This release primarily fixes a number of stability issues in Iris. \n\n\n\nFixes for 1.16.5 & 1.17.1: - Fixed Complementary not compiling on macOS in non-overworld dimensions - Avoid crashes with Physics Mod, but there are still some weird bugs with it - Fixed colored shadows not working (this was a regression shipped in 1.1.0) - Fixed clouds being cut off at low render distances when shaders are disabled - Added rudimentary support for atlasSize, needed by newer versions of Complementary Shaders - Fixed block breaking animations for block entities - Support separateAo for blocks rendered with the Fabric Rendering API - Fixed a number of issues related to the ordering of entity rendering", + "changelog_url": null, + "date_published": "2021-07-29T02:06:23.037856Z", + "downloads": 4309, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "59f6678d834ae190100931d218b250dc56c5ae1f", + "sha512": "a2e6b52c16d42750b19f0dda93a94235df15a8c4ec061866585a4ca4899c2b5caedce30b5af4bb41eb7df7cb6a958d82ff9502c508756ea8e40f0cc23e03c34e" + }, + "url": "https://cdn.modrinth.com/data/YL57xq9U/versions/mc1.16.5-v1.1.1/iris-mc1.16.5-1.1.1.jar", + "filename": "iris-mc1.16.5-1.1.1.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "lAEtBzCu", + "mod_id": "YL57xq9U", + "author_id": "DzLrfrbK", + "featured": false, + "name": "Iris v1.1.1 + Sodium for MC 1.17.1", + "version_number": "mc1.17-v1.1.1", + "changelog": "This release primarily fixes a number of stability issues in the 1.17.1 version of Iris. Previously, the bundled version of Sodium for 1.17 was based on an older beta build, but now we've released to the much more stable Sodium 0.3.0 release. In addition, IMS fixed a memory leak in the sky horizon rendering code on Iris for 1.17.1.\n\n \n\nOverall, Iris 1.1.1 for 1.17.1 is much more stable than Iris 1.1.0 for 1.17.1! We've been working on a much bigger update, but unfortunately that code isn't quite ready yet. Instead of continually holding back critical fixes until that code is ready, we've decided to pull the critical fixes into an intermediate build, giving us time to polish up the next update.\n\n \n\nFixes for 1.16.5 & 1.17.1: - Fixed Complementary not compiling on macOS in non-overworld dimensions - Avoid crashes with Physics Mod, but there are still some weird bugs with it - Fixed colored shadows not working (this was a regression shipped in 1.1.0) - Fixed clouds being cut off at low render distances when shaders are disabled - Added rudimentary support for atlasSize, needed by newer versions of Complementary Shaders - Fixed block breaking animations for block entities - Support separateAo for blocks rendered with the Fabric Rendering API - Fixed a number of issues related to the ordering of entity rendering\n\n \n\nFixes for 1.17.1: - Allow shader packs to detect when the player is in powdered snow - The bundled version of Sodium is now based on the 0.3.0 release instead of a beta build, fixing a memory leak - Fixed vanilla clouds not rendering in packs that use them - Fixed beacon beams not rendering - Fixed a memory leak in horizon rendering", + "changelog_url": null, + "date_published": "2021-07-29T02:04:54.765633Z", + "downloads": 14135, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "6fc947f2b749502ac510c65cebfeab9f64cecfe1", + "sha512": "18aa480d8503cf98e87bc37ba734ca61b2f1c85dd92a52e5501b4e2a5d8fe17dba1de9b748155c054cb6a3f31e1fc9643d4491413ad7cf7f20ba90aec338cb76" + }, + "url": "https://cdn.modrinth.com/data/YL57xq9U/versions/mc1.17-v1.1.1/iris-mc1.17-1.1.1.jar", + "filename": "iris-mc1.17-1.1.1.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "lQjKfhXZ", + "mod_id": "YL57xq9U", + "author_id": "v7k4QluE", + "featured": false, + "name": "Iris v1.1.0 + Sodium for MC 1.17", + "version_number": "mc1.17-v1.1.0", + "changelog": "This release includes fixes for the vast majority of the hardware compatibility issues that Iris 1.0.0 faced. In addition, a compatible version of Sodium is now available for 1.17, allowing people to have incredible performance with shaders on both Minecraft 1.16 and Minecraft 1.17!\n\n", + "changelog_url": null, + "date_published": "2021-06-29T23:26:10.609754Z", + "downloads": 9051, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "80da62de0e01bf4023e640326e4a05bd5b5ee007", + "sha512": "09c473690fb28a7b9df862d2168bf5430e13e91112d67d1936399685900973956e2243669ce3daf1f73ca53f4a8baabc3a6a4bb84791c579ee531cb9ca468c06" + }, + "url": "https://cdn.modrinth.com/data/YL57xq9U/versions/mc1.17-v1.1.0/iris-mc1.17-1.1.0.jar", + "filename": "iris-mc1.17-1.1.0.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "7ULwjID9", + "mod_id": "YL57xq9U", + "author_id": "v7k4QluE", + "featured": false, + "name": "Iris v1.1.0 + Sodium for MC 1.16.5", + "version_number": "mc1.16.5-v1.1.0", + "changelog": "This release includes fixes for the vast majority of the hardware compatibility issues that Iris 1.0.0 faced. It also includes a number of general bug fixes.", + "changelog_url": null, + "date_published": "2021-06-29T23:24:38.723910Z", + "downloads": 3856, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "4c34acec4277eaeb0f4f111a7308c87f8c8fabce66af8c736b7f8492b0a448e6ebf28587208305ae740f5efa751fede24a9315e19dbcfda31473683b931a0f54", + "sha1": "ab3cd5967d11221ebf3e0374f13ecfac2e8ff7bf" + }, + "url": "https://cdn.modrinth.com/data/YL57xq9U/versions/mc1.16.5-v1.1.0/iris-mc1.16.5-1.1.0.jar", + "filename": "iris-mc1.16.5-1.1.0.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "BKUpdPtO", + "mod_id": "YL57xq9U", + "author_id": "DzLrfrbK", + "featured": false, + "name": "Iris - Sodium", + "version_number": "1.0.0-sodium", + "changelog": "This is the recommended version to use, for users who want a stable experience on 1.16.5.", + "changelog_url": null, + "date_published": "2021-06-09T23:01:39.653663Z", + "downloads": 3338, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "faa6f06df478e6c5297e47cb7eb7a9ade4904d4210a2ff27935140187604d2bf071e11468fe9cd479803c8ce4e4d1d3f49a17238cc6f6204864f89784032ec7c", + "sha1": "5d7ea138d8f47a6e26eda6acec849fea06cc6ec1" + }, + "url": "https://cdn.modrinth.com/data/YL57xq9U/versions/1.0.0-sodium/iris-mc1.16.5-1.0.0.jar", + "filename": "iris-mc1.16.5-1.0.0.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/version/lithium.json b/src/test/resources/version/lithium.json new file mode 100644 index 0000000..c5e0ed5 --- /dev/null +++ b/src/test/resources/version/lithium.json @@ -0,0 +1,359 @@ +[ + { + "id": "nVR7Q63z", + "mod_id": "gvQqBUqZ", + "author_id": "uhPSqlnd", + "featured": false, + "name": "Lithium 0.7.4", + "version_number": "mc1.17.1-0.7.4", + "changelog": "The changelog is available on GitHub right [here](https://github.com/CaffeineMC/lithium-fabric/releases/tag/mc1.17.1-0.7.4).", + "changelog_url": null, + "date_published": "2021-08-25T15:11:04.183885Z", + "downloads": 7602, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "32e06c4d401fcba6ef539cd6dbfa0ee032302462", + "sha512": "e3564bef105f23b6d4f77196f080f6bae3eed78b810e795c41b6587e88130ead66d0bbc01225a2ca2a3b1bdaedd7baec35219e28e36b3fe5c7a9b694618dfc76" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.17.1-0.7.4/lithium-fabric-mc1.17.1-0.7.4.jar", + "filename": "lithium-fabric-mc1.17.1-0.7.4.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "cTZv31gu", + "mod_id": "gvQqBUqZ", + "author_id": "uhPSqlnd", + "featured": false, + "name": "Lithium 0.7.3", + "version_number": "mc1.17.1-0.7.3", + "changelog": "The changelog is available on GitHub right [here](https://github.com/CaffeineMC/lithium-fabric/releases/tag/mc1.17.1-0.7.3).", + "changelog_url": null, + "date_published": "2021-07-07T15:19:45.667011Z", + "downloads": 11059, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "9b128f30cf2ac2b48abe69c11da805a52522504d", + "sha512": "302a9ac685e513b75eb4dea0d956335f1dfbda33b5b19e94e8df76172a7502cf02a68faf801c623ff0775f12f3831fc863ff7f83af44105098376956ed331c5c" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.17.1-0.7.3/lithium-fabric-mc1.17.1-0.7.3.jar", + "filename": "lithium-fabric-mc1.17.1-0.7.3.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "aZ0JFf08", + "mod_id": "gvQqBUqZ", + "author_id": "uhPSqlnd", + "featured": false, + "name": "Lithium 0.7.2", + "version_number": "mc1.17-0.7.2", + "changelog": "The changelog is available on GitHub right [here](https://github.com/CaffeineMC/lithium-fabric/releases/tag/mc1.17-0.7.2).", + "changelog_url": null, + "date_published": "2021-06-21T15:47:40.697756Z", + "downloads": 2696, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "ca6b619a6399c9edba99ef70a73f9836ba3dab27dc335f8d709ef732b2121855f245c0bb82dbcffa6932ae2965e9f2ec8b86d3ef3215af2afcaf9fbb8e109bc1", + "sha1": "1c69065da5730027343db347a7bf0ff0e257dd1b" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.17-0.7.2/lithium-fabric-mc1.17-0.7.2.jar", + "filename": "lithium-fabric-mc1.17-0.7.2.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "7jxErppe", + "mod_id": "gvQqBUqZ", + "author_id": "uhPSqlnd", + "featured": false, + "name": "Lithium 0.7.1", + "version_number": "mc1.17-0.7.1", + "changelog": "The changelog is available on GitHub right [here](https://github.com/CaffeineMC/lithium-fabric/releases/tag/mc1.17-0.7.1).", + "changelog_url": null, + "date_published": "2021-06-16T18:38:57.919231Z", + "downloads": 901, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "352fd021048737693d2fbae1b9ad5d10e4c4c1f8", + "sha512": "647b5b626978b2cad5b44616808543445bc565e87b53c7b9bb026bd3d00f10f5c350d8c9e93677268c93d0ace0e7c1d2b27e0fe8b5814be297f01204f7188bb2" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.17-0.7.1/lithium-fabric-mc1.17-0.7.1.jar", + "filename": "lithium-fabric-mc1.17-0.7.1.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "rvsW1zhb", + "mod_id": "gvQqBUqZ", + "author_id": "uhPSqlnd", + "featured": false, + "name": "Lithium 0.6.6", + "version_number": "mc1.16.5-0.6.6", + "changelog": "The changelog is available on GitHub right [here](https://github.com/jellysquid3/lithium-fabric/releases/tag/mc1.16.5-0.6.6).", + "changelog_url": null, + "date_published": "2021-06-09T13:10:44.980214Z", + "downloads": 4534, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "bb2dd085a6c5fcf86ba9a63d680fb5144a5788efe9c00a9417d978722dbb84163e47bb545c310869647924dad89bcfe2bbe04cd64476b304eada914083e5c094", + "sha1": "ff9416b228333b481cdc98ec50c5f9944225d16b" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.16.5-0.6.6/lithium-fabric-mc1.16.5-0.6.6.jar", + "filename": "lithium-fabric-mc1.16.5-0.6.6.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.2", + "1.16.3", + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "Le0tKjFX", + "mod_id": "gvQqBUqZ", + "author_id": "uhPSqlnd", + "featured": false, + "name": "Lithium 0.7.0", + "version_number": "mc1.17-0.7.0", + "changelog": "The changelog is available on GitHub right [here](https://github.com/CaffeineMC/lithium-fabric/releases/tag/mc1.17-0.7.0).", + "changelog_url": null, + "date_published": "2021-06-08T19:45:03.750911Z", + "downloads": 1057, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "533614aa733d74cf049d31a731f53873103987b2", + "sha512": "9c0c9a98896966b4728d9ccb1b7605b3229599197f9ffaf6c12cb15deb28e0cb99be85e46772d1d258820e2385f1aa73aa7cb862ec9383e7e242baefc6eb7921" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.17-0.7.0/lithium-fabric-mc1.17-0.7.0.jar", + "filename": "lithium-fabric-mc1.17-0.7.0.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "pGhOMdTm", + "mod_id": "gvQqBUqZ", + "author_id": "uhPSqlnd", + "featured": false, + "name": "Lithium 0.6.5", + "version_number": "mc1.16.5-0.6.5", + "changelog": "The changelog is available on GitHub right [here](https://github.com/jellysquid3/lithium-fabric/releases/tag/mc1.16.5-0.6.5).", + "changelog_url": null, + "date_published": "2021-06-08T13:48:35.642184Z", + "downloads": 153, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "e15e2563db5d6c0de539e799c04e76e02d3b01378d80477952703e7d32ea65a845eea4b8503ece52f676ed1f2343e9f15bfcc2c0c43d22927a1ac95394876478", + "sha1": "a811c3b2ea4a07c4eb4c070ee1a0fcbd0f5791ff" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.16.5-0.6.5/lithium-fabric-mc1.16.5-0.6.5.jar", + "filename": "lithium-fabric-mc1.16.5-0.6.5.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.2", + "1.16.3", + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "igqdFUYG", + "mod_id": "gvQqBUqZ", + "author_id": "uhPSqlnd", + "featured": false, + "name": "Lithium 0.6.4", + "version_number": "mc1.16.5-0.6.4", + "changelog": "The changelog is available on GitHub right [here](https://github.com/jellysquid3/lithium-fabric/releases/tag/mc1.16.5-0.6.4).", + "changelog_url": null, + "date_published": "2021-02-24T14:15:07.080780Z", + "downloads": 4429, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "a5d54bace83489e878e14ddb1792c97e75b0ecc61bfd43de53342646d4c4ba49543874d5d2f63558a6b52419024e83895b0715c7dec19248de89e9b80b2da092", + "sha1": "188f85adab94146bdfff931592e8405c213cb87a" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.16.5-0.6.4/lithium-fabric-mc1.16.5-0.6.4.jar", + "filename": "lithium-fabric-mc1.16.5-0.6.4.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.2", + "1.16.3", + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "ouTdXXWj", + "mod_id": "gvQqBUqZ", + "author_id": "uhPSqlnd", + "featured": false, + "name": "Lithium 0.6.3", + "version_number": "mc1.16.5-0.6.3", + "changelog": "The changelog is available on GitHub right [here](https://github.com/jellysquid3/lithium-fabric/releases/tag/mc1.16.5-0.6.3).", + "changelog_url": null, + "date_published": "2021-02-02T21:07:33.498154Z", + "downloads": 1178, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "5acd33822982835ca8c7d9abfea00a5088d3800d", + "sha512": "5eda84d07a36b7c2e5d723c35c4c94ec8a487a762ce818290eaa946b68c927492c49bf1cd02f52dd51ab523b55d7b072ffe9806b1ba0f81d4156c1a18a76af4f" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.16.5-0.6.3/lithium-fabric-mc1.16.5-0.6.3.jar", + "filename": "lithium-fabric-mc1.16.5-0.6.3.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.2", + "1.16.3", + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "5fmGl08Y", + "mod_id": "gvQqBUqZ", + "author_id": "TEZXhE2U", + "featured": false, + "name": "Lithium 0.6.1", + "version_number": "mc1.16.5-0.6.1", + "changelog": "The changelog is available on GitHub right [here](https://github.com/jellysquid3/lithium-fabric/releases/tag/mc1.16.5-0.6.1).", + "changelog_url": null, + "date_published": "2021-01-29T02:31:43.508656Z", + "downloads": 245, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "b9e8a58de7013fae72e676bb55593d476727b2c7", + "sha512": "07b00fa9ec12c3c455b3f5c2870ececae11904a6450e206474404b96126bd64753b56be47c4e4d752e364f40cfad3efd78ac4b2862000d91f5b1aa671770395e" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.16.5-v0.6.1/lithium-fabric-mc1.16.5-0.6.1.jar", + "filename": "lithium-fabric-mc1.16.5-0.6.1.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.2", + "1.16.3", + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "EhG1mQzx", + "mod_id": "gvQqBUqZ", + "author_id": "TEZXhE2U", + "featured": false, + "name": "Lithium 0.6.0", + "version_number": "mc1.16.4-0.6.0", + "changelog": "", + "changelog_url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.16.4-0.6.0/changelog.md", + "date_published": "2021-01-03T00:56:52.295118Z", + "downloads": 520, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "6ab1c5adc97ab0c66f9c9afcdb1d143a607db82c" + }, + "url": "https://cdn.modrinth.com/data/gvQqBUqZ/versions/mc1.16.4-0.6.0/lithium-fabric-mc1.16.4-0.6.0.jar", + "filename": "lithium-fabric-mc1.16.4-0.6.0.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4" + ], + "loaders": [ + "fabric" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/version/modmanager.json b/src/test/resources/version/modmanager.json new file mode 100644 index 0000000..bdedf73 --- /dev/null +++ b/src/test/resources/version/modmanager.json @@ -0,0 +1,110 @@ +[ + { + "id": "CdhVgHal", + "mod_id": "6kq7BzRK", + "author_id": "VUdG1FR5", + "featured": false, + "name": "1.0.2+1.17-alpha", + "version_number": "1.0.2+1.17-alpha", + "changelog": "Bugs fixed:\n\n- Fix CPU overload when using ModManager [#48](https://github.com/DeathsGun/ModManager/issues/48)\n- Fix forge artifacts being downloaded [#37](https://github.com/DeathsGun/ModManager/pull/37)\n- Fix NullPointerException while updating a mod [#34](https://github.com/DeathsGun/ModManager/issues/34)\n\nImprovements:\n\n- New loading icon [#40](https://github.com/DeathsGun/ModManager/pull/40)\n- Improved Turkish translation (Special thanks to kuzeeeyk) [#39](https://github.com/DeathsGun/ModManager/pull/39)\n- Added Chinese translation (Special thanks to MineCommanderCN) [#36](https://github.com/DeathsGun/ModManager/pull/36)\n- Added Korean translation (Special thanks to arlytical#1) [#32](https://github.com/DeathsGun/ModManager/pull/32)\n- Added Russian translation (Special thanks to Felix14-v2) [#31](https://github.com/DeathsGun/ModManager/pull/31)\n\n", + "changelog_url": null, + "date_published": "2021-09-03T10:56:59.402790Z", + "downloads": 474, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha512": "24661776bab56c8e77abaac3c66219e01742de2a0e9433945bfd1a6d284b1dd41e891f1d9c62f30c8f34688525e2c784e84e8720bde9355b2d7efa5e4fb53d2d", + "sha1": "c1b802582903dadf56c1965bc5c6a31716250848" + }, + "url": "https://cdn.modrinth.com//data/6kq7BzRK/versions/1.0.2+1.17-alpha/modmanager-1.0.2+1.17-alpha.jar", + "filename": "modmanager-1.0.2+1.17-alpha.jar", + "primary": true + } + ], + "dependencies": [ + { + "version_id": "E4QBMVtO", + "dependency_type": "required" + } + ], + "game_versions": [ + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "gGSLHqJK", + "mod_id": "6kq7BzRK", + "author_id": "VUdG1FR5", + "featured": false, + "name": "1.0.1+1.17-alpha", + "version_number": "1.0.1+1.17-alpha", + "changelog": "Bugs fixed:\n\n- Fixed crash when opening ModMenu [#13](https://github.com/DeathsGun/ModManager/issues/13)\n- Fixed update error on Windows because of file locks [#17](https://github.com/DeathsGun/ModManager/issues/13)\n- Search only when enter key was hit for improved performance [#7](https://github.com/DeathsGun/ModManager/issues/7)\n- Fixed crash when ModManager loses connection while opening a more detailed\n view [#16](https://github.com/DeathsGun/ModManager/issues/16)\n- Fixed icons being mixed up [#22](https://github.com/DeathsGun/ModManager/issues/22)\n- Fixed unknown mods showing up [#18](https://github.com/DeathsGun/ModManager/issues/18)\n\nImprovements:\n\n- Added Turkish translation (Special thanks to kuzeeeyk) [#21](https://github.com/DeathsGun/ModManager/pull/21)\n- Only show \"Updatable mods\" category when there are updatable\n mods [#10](https://github.com/DeathsGun/ModManager/issues/10)\n", + "changelog_url": null, + "date_published": "2021-08-24T17:26:03.297706Z", + "downloads": 225, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha1": "0228ab2ac3cc3120512041d01b31925f03e764e5", + "sha512": "7ec3293ac8f43adf12e02e60f3ce1c1a6410fb21674bf8ab50184d4e32cf34535b428f642b429515c7119328d49d0c852817cb00f7c109cc1135963313c9d474" + }, + "url": "https://cdn.modrinth.com/data/6kq7BzRK/versions/1.0.1+1.17-alpha/modmanager-1.0.1+1.17-alpha.jar", + "filename": "modmanager-1.0.1+1.17-alpha.jar", + "primary": true + } + ], + "dependencies": [ + { + "version_id": "E4QBMVtO", + "dependency_type": "required" + } + ], + "game_versions": [ + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "2J1ys6qf", + "mod_id": "6kq7BzRK", + "author_id": "VUdG1FR5", + "featured": false, + "name": "1.0.0-alpha", + "version_number": "1.0.0-alpha", + "changelog": "This project has reached the alpha stage.\nI think the mod has reached a point in which it can be called an alpha.\n\nWhat can do now?\n* Browse through Modrinth\n* Install, remove and update mods\n* Notify about updates\n* Show you an overview of mods that need an update ", + "changelog_url": null, + "date_published": "2021-08-23T17:00:19.010541Z", + "downloads": 55, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha512": "e57fddfc3d2d7789f6b260e345ba5a469b0de343692535d742762336afaf10d0f753aa537384d48b7aa16a5c6a4d71adff36b22f26f6248862f19f94dfbcd5ce", + "sha1": "a646cc8a6ef18ad2bf8a771776780e87d35e79a1" + }, + "url": "https://cdn.modrinth.com/data/6kq7BzRK/versions/1.0.0-alpha/modmanager-1.0.0-alpha.jar", + "filename": "modmanager-1.0.0-alpha.jar", + "primary": true + } + ], + "dependencies": [ + { + "version_id": "E4QBMVtO", + "dependency_type": "required" + } + ], + "game_versions": [ + "1.17.1" + ], + "loaders": [ + "fabric" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/version/modmenu.json b/src/test/resources/version/modmenu.json new file mode 100644 index 0000000..6604358 --- /dev/null +++ b/src/test/resources/version/modmenu.json @@ -0,0 +1,1412 @@ +[ + { + "id": "PN4NcBa1", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.21 for 1.16.5", + "version_number": "1.16.21", + "changelog": "- Fixed immediate crash when using Java 1.8", + "changelog_url": null, + "date_published": "2021-09-27T01:53:22.474594Z", + "downloads": 39, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "cfdd10585e96d53321d4d84d44d7505b4130527747da05f4c407cb3b072ff2a25ec819df12d7840810bc9ca6d2497a7bc847525a3f15dad08204caa2c68c9844", + "sha1": "96c9741127516103b273fac5fac7e5b179f64270" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.21/modmenu-1.16.21.jar", + "filename": "modmenu-1.16.21.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "jZQ0G78K", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.1.1 for 21w38a", + "version_number": "2.1.1", + "changelog": "- Removed deprecated Mod Menu API, mods must use `com.terraformersmc.modmenu.api.ModMenuApi` now\n- Removed deprecated custom value loading, mods must use the `modmenu` container custom value now", + "changelog_url": null, + "date_published": "2021-09-26T01:50:56.813057Z", + "downloads": 23, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "0053e0a958e2d26b00739b830c015708a12be298", + "sha512": "c665b46f6b9f703a95fbf4f3b7c385851e212ba9f69b3335d98e8e3594b6b14d2b631db6092b8ef5fb5601a86cbb06c99f70961b068bc0204e014a7c848aa150" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.1.1/modmenu-2.1.1.jar", + "filename": "modmenu-2.1.1.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "21w37a", + "21w38a" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "WKj0jgYj", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.13 for 1.17", + "version_number": "2.0.13", + "changelog": "- Updated English (en_PT) translation\n- Updated Mongo (lol_US) translation", + "changelog_url": null, + "date_published": "2021-09-26T01:50:10.779807Z", + "downloads": 277, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "f8cab8735f0ad6c63da5154594397861daae0964", + "sha512": "3bc8647db8f82f141d7f9309ac3f27014f1c915445d3ee68f805f7b659b988c92bc5e68b9dc16a68b370723ac6575e5c8439b1f2f607289f4f303998a293cb10" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.13/modmenu-2.0.13.jar", + "filename": "modmenu-2.0.13.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "JOqf8AZn", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.20 for 1.16.5", + "version_number": "1.16.20", + "changelog": "- Updated English (en_PT) translation\n- Updated Mongo (lol_US) translation", + "changelog_url": null, + "date_published": "2021-09-26T01:49:48.667423Z", + "downloads": 14, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "fae574348ba6a371e7e35e7010fb952b91a85ffa", + "sha512": "2fd7fb090d5430a3c92636933b3dfc8c3fe1cc916109db7f71aed1000ba36f5e713947deefd4232e5dec7038b989b049573ccf004f18647aa96b7cb7d4fe8805" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.20/modmenu-1.16.20.jar", + "filename": "modmenu-1.16.20.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "LVxVja5i", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.1.0 for 21w37a", + "version_number": "2.1.0", + "changelog": "No Changelog Available", + "changelog_url": null, + "date_published": "2021-09-21T14:48:05.867840Z", + "downloads": 50, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "7dfaa4b25877a1892ac30e3609b6d0633c03166310140ad1e4d2c1fe4fb420e4d74591afac7cf0d1a558fbf258f49be7a864a96820ba1da58439fc2b50a7309f", + "sha1": "bfee5982424e18bc68f6927b5658ba6557b155de" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/2.1.0/modmenu-2.1.0.jar", + "filename": "modmenu-2.1.0.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "21w37a", + "21w38a" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "9xECQHnM", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.12 for 1.17", + "version_number": "2.0.12", + "changelog": "- Fixed Minecraft crash caused by broken mod config screens\n- Updated German translation", + "changelog_url": null, + "date_published": "2021-09-21T02:22:22.768837Z", + "downloads": 414, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "5d7f921acd3712b7db606e273fbfe73bee532b63858be844e7d3659b71cc533d8580d2c28dc264df8ac1382452873ec3d1b11e3411377c1aa5bccc1c9fab332c", + "sha1": "01e02fd25f30a1078ca2fccd9064839a5dd181e8" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/2.0.12/modmenu-2.0.12.jar", + "filename": "modmenu-2.0.12.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "aH8qgnVM", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.19 for 1.16.5", + "version_number": "1.16.19", + "changelog": "- Fixed Minecraft crash caused by broken mod config screens\n- Updated German translation", + "changelog_url": null, + "date_published": "2021-09-21T02:20:59.248250Z", + "downloads": 68, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "7be89f7fcaefd034244820fcbd7266805de10724", + "sha512": "9d39c100c031d86492fab9cdd658278658134cb9a596c342be242f22cca9256cd985dd50eb17e34d801b8496d4b29ec8e1b45ae24253a94403469ee8d6acd833" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/1.16.19/modmenu-1.16.19.jar", + "filename": "modmenu-1.16.19.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "FMqdptUn", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.11 for 1.17", + "version_number": "2.0.11", + "changelog": "- Updated Russian translation\n- Updated Russian translation\n- Updated Bulgarian translation\n- Updated English (en_PT) translation\n- Updated English (en_UD) translation\n- Updated English (en_WS) translation\n- Updated Italian translation", + "changelog_url": null, + "date_published": "2021-09-17T16:10:25.681935Z", + "downloads": 379, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "f7ff368917b4c4d6b5655de2a46584cba09e95c80cd6c70f1cd61589f999e2872be26ff3820b038dbf1b27fa79c09928b27fa492ff3d416daf536745121e2a6d", + "sha1": "93f5281f5f446cb43724c2c2bb0fe75e5b47c069" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/2.0.11/modmenu-2.0.11.jar", + "filename": "modmenu-2.0.11.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "VaZTuVan", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.18 for 1.16.5", + "version_number": "1.16.18", + "changelog": "- Updated Russian translation\n- Updated Bulgarian translation\n- Updated English (en_PT) translation\n- Updated English (en_UD) translation\n- Updated English (en_WS) translation\n- Updated Italian translation\n- Updated Russian translation", + "changelog_url": null, + "date_published": "2021-09-17T16:02:07.470359Z", + "downloads": 51, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "c68bde6d376e3387c8afcc2d4c26b43ca761dba9", + "sha512": "27c1b62d44db781021f1b4a3e326a0eee302ec6fe8bc24680e86bf3cd6e43a6dc80b24187485cec9f8d79d7841f8e082b2d5e69d0228c00cd0036d772a37b4a2" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/1.16.18/modmenu-1.16.18.jar", + "filename": "modmenu-1.16.18.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "XtL1i60M", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.10 for 1.17", + "version_number": "2.0.10", + "changelog": "- Fixed Java icon loosing background color when selected", + "changelog_url": null, + "date_published": "2021-09-06T11:46:18.682245Z", + "downloads": 922, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "66b4fc25284a8078060a259313f3814ff289374d", + "sha512": "9c65fbafe8eabc1949d050f76cb0cf05b9a1fcdb98e4f738609ce19434c7960c1fcb1d2a5390b8f7df74c06346963b19fef9683b0f2b1fcb0e508cd7dd204a5f" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/2.0.10/modmenu-2.0.10.jar", + "filename": "modmenu-2.0.10.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "DOitjZ89", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.17 for 1.16.5", + "version_number": "1.16.17", + "changelog": "- Updated Portuguese (Brazil) translation", + "changelog_url": null, + "date_published": "2021-09-06T11:45:40.107879Z", + "downloads": 117, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "848365e77db8871bdfafe3e20fc879aa1cab75c3e75f429c2196dad83aee67e7e2c55242cf1c13470dbaf8256163a73f65c2a92d08b151f630ad5d4679147d55", + "sha1": "0106a8f8fd5d49dc9358880da35605746f71cdde" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/1.16.17/modmenu-1.16.17.jar", + "filename": "modmenu-1.16.17.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "tlM0eBmY", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.9 for 1.17", + "version_number": "2.0.9", + "changelog": "- Fixed a crash when optional dependencies were used in mod config screens", + "changelog_url": null, + "date_published": "2021-09-02T07:41:19.101417Z", + "downloads": 470, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "db2c640258ec56e9403a1089a27e6982b27fdb93", + "sha512": "775905aaac1f7737e1747188792359cab577d4fb0fb30095430eb96e3c453403f18fc18e8f2e172a0fc2eb67b2149adf346b95e91953afe11fafbabd320ca740" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/2.0.9/modmenu-2.0.9.jar", + "filename": "modmenu-2.0.9.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "Wr4GfZdy", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.16 for 1.16.5", + "version_number": "1.16.16", + "changelog": "- Fixed a crash when optional dependencies were used in mod config screens", + "changelog_url": null, + "date_published": "2021-09-02T07:39:28.064909Z", + "downloads": 67, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "d0c8a302fc432d882dc4cedc918bdc85fc64ad84", + "sha512": "326f920e83dc02368ff2126c11fcf86329d1ab129469625fdabc8dbab191553298e832e50a668707c95ab7a7c1a9129d50c83326defeae6cdb424733444ce130" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/1.16.16/modmenu-1.16.16.jar", + "filename": "modmenu-1.16.16.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "GOPQZTVp", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.15 for 1.16.5", + "version_number": "1.16.15", + "changelog": "- Updated Portuguese (Brazil) translation", + "changelog_url": null, + "date_published": "2021-09-01T18:08:13.789812Z", + "downloads": 11, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "c778d3d32523fcebea70614f14bc0950afec6a06", + "sha512": "7a9d99de0ce679111c243c983a2d4e7c38fa1ed12f563534163abea83936b60e3d5f4b3de2c9bc9e78e7916bcddbffa3f69e1b0877c81ee2083f28cbab7f346a" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/1.16.15/modmenu-1.16.15.jar", + "filename": "modmenu-1.16.15.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "JyL5b75a", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.8 for 1.17", + "version_number": "2.0.8", + "changelog": "- Updated Portuguese (Brazil) translation\n- Updated Swedish translation", + "changelog_url": null, + "date_published": "2021-09-01T18:07:59.639490Z", + "downloads": 62, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "205d5aac4f64a5e1a70534ef7c08806596ede109", + "sha512": "05f5ef82bf43e5087a6a481a027588fdda281d7c0168d340e672f689797a9316d4d805f60e999f1ef2e40048b5cdd1e4b1d48ce81d87d5a21bb94a94d5befc46" + }, + "url": "https://cdn.modrinth.com//data/mOgUt4GM/versions/2.0.8/modmenu-2.0.8.jar", + "filename": "modmenu-2.0.8.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "G8sCBZ1X", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.7 for 1.17", + "version_number": "2.0.7", + "changelog": "- Updated ɥsᴉꞁᵷuƎ translation\n- Updated LOLCAT translation\n- Updated Portuguese (Brazil) translation\n- Updated Swedish translation", + "changelog_url": null, + "date_published": "2021-08-30T23:41:16.288205Z", + "downloads": 195, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "5425b82d434a69de9e0ca539d92c7ed7bfef7146", + "sha512": "bb065e91fdde821b1bd7d8190ba7cd5ad35f22438ac6f3ba213a54f7e1ccf2b11599ae457d839eadec37da72ce0fd8c43194f4401936b4839dd7a65293c3dc40" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.7/modmenu-2.0.7.jar", + "filename": "modmenu-2.0.7.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "4Ar2wg0k", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.14 for 1.16.5", + "version_number": "1.16.14", + "changelog": "- Updated ɥsᴉꞁᵷuƎ translation\n- Updated LOLCAT translation\n- Updated Portuguese (Brazil) translation\n- Updated Swedish translation", + "changelog_url": null, + "date_published": "2021-08-30T23:40:57.517439Z", + "downloads": 25, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "e0c23845500c81dfd6ffce29fb0c0bd199413b0b16c0e96b167076e8d26b7d77cd049d94243bbefa416319d590acc5f7cd441553e7dd4e0c350d6db7441adc63", + "sha1": "c909bd99670715573163f47e5b62025cd8ed8ca4" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.14/modmenu-1.16.14.jar", + "filename": "modmenu-1.16.14.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "bojzkt4w", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.6 for 1.17", + "version_number": "2.0.6", + "changelog": "- Added mod list hotkeys: SPACE to open/close a list of child mods, LEFT to select the parent or close the list, RIGHT to open the list or select the first child", + "changelog_url": null, + "date_published": "2021-08-27T21:00:07.614860Z", + "downloads": 404, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "254cb07f4e14f0f3a60c000a92ec1bd578c61172", + "sha512": "bc473a6307bde7bd9dbcc3c5717a11cedfb6105b8f0134e823529af75cb2b1bf72713494b0bd7f3861ef4462ed1a38bae82462db6d22753ff28763a0cfb7350c" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.6/modmenu-2.0.6.jar", + "filename": "modmenu-2.0.6.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "c6uDXZX8", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.13 for 1.16.5", + "version_number": "1.16.13", + "changelog": "- Added mod list hotkeys: SPACE to open/close a list of child mods, LEFT to select the parent or close the list, RIGHT to open the list or select the first child", + "changelog_url": null, + "date_published": "2021-08-27T20:59:37.008093Z", + "downloads": 61, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "ab20c871f3b0ba25a89c636ee10ffcaaf8a8271c", + "sha512": "443ae53b897e6fb77e66570b215d54125ca6c3bb6a95270748456a26434fb3821adc8bd610175e74a590dac6597466ea1ab823998c4ed8015c73c75b0af88349" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.13/modmenu-1.16.13.jar", + "filename": "modmenu-1.16.13.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "E4QBMVtO", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.5 for 1.17", + "version_number": "2.0.5", + "changelog": "- Fixed a crash when mods declare themselves as their own parent\n- Updated Italian translation\n- Added Classical Chinese Language translation\n- Updated German translation\n- Updated French translation\n- Updated Turkish translation\n- Updated Persian translation", + "changelog_url": null, + "date_published": "2021-08-19T12:01:27.204434Z", + "downloads": 871, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "6a74b40142425a6ba3fa75272e7e9bf2604c132a", + "sha512": "136eee2b29b4209680a98a32c301e78ba5f10e539d576c006721a25eae1143d1f95420e4a29af18172a4463e17936ab37638ba2bc35e0081e0b374e24dcd1b08" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.5/modmenu-2.0.5.jar", + "filename": "modmenu-2.0.5.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "u955lyFM", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.12 for 1.16.5", + "version_number": "1.16.12", + "changelog": "- Fixed a crash when mods declare themselves as their own parent\n- Updated German translation\n- Updated French translation\n- Updated Turkish translation\n- Updated Persian translation", + "changelog_url": null, + "date_published": "2021-08-19T12:01:14.906512Z", + "downloads": 124, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "98c6fb528c6f64c0148a62a11ba971efdf4b2f3e", + "sha512": "53a998ab9e803d5b06cb0b7b8b387af67933fb647ecd2910d242b54479393ef05c450f7376977e96d86f6bb75c205667630b250d43b21a4f368337de0946fccd" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.12/modmenu-1.16.12.jar", + "filename": "modmenu-1.16.12.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "oQr5VO7q", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.4 for 1.17", + "version_number": "2.0.4", + "changelog": "- Fixed sounds resuming when exiting Mod Menu with ESC while paused\n- Update Polish Translation", + "changelog_url": null, + "date_published": "2021-07-25T07:44:38.772570Z", + "downloads": 2247, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "fa26fc594dea1370adc376667bf64c8f45b0d8d6", + "sha512": "65ea03ce8e5863840007e37128bd6e15c0c632b67eae10ef5fb722e355ae82e512b52b8d15fb254a4509b5879d0b431fa74f99f1d0773c4bbff58df98b6dea3d" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.4/modmenu-2.0.4.jar", + "filename": "modmenu-2.0.4.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "NyFB1gry", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.11 for 1.16.5", + "version_number": "1.16.11", + "changelog": "- Fixed sounds resuming when exiting Mod Menu with ESC while paused\n- Update Polish Translation", + "changelog_url": null, + "date_published": "2021-07-25T07:44:17.812465Z", + "downloads": 410, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "215bd4c1126e82e247c05f83d9cef70439424bcdcf2b23dcd5e9d12b4c8a2c1a6c124d820dbb3831c64b1d66958f2fd8f31c6111a23ba8815259e8b0649eb11d", + "sha1": "bafd3da269de96601f47cf96fa028255ee4aafaa" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.11/modmenu-1.16.11.jar", + "filename": "modmenu-1.16.11.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "a8bewBQT", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.3 for 1.17", + "version_number": "2.0.3", + "changelog": "No Changelog Available", + "changelog_url": null, + "date_published": "2021-07-20T00:38:02.587253Z", + "downloads": 638, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "4af7c6bb26ee80bd816ebe9068b16902cafb946d", + "sha512": "27984e37c91a90232c77af795d6a58a36b7b3c276aab9d03f456deb49b38c982f88ced3dd6ec2e70a6852c0d247f833ba36e75c8d9ed59fff4d54d1c15c90ede" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.3/modmenu-2.0.3.jar", + "filename": "modmenu-2.0.3.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "bHODZExo", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.10 for 1.16.5", + "version_number": "1.16.10", + "changelog": "- Added Korean Translation", + "changelog_url": null, + "date_published": "2021-07-20T00:33:33.033376Z", + "downloads": 93, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "07861d3eea9bbee3cece379b3f9169329078ffd0533aecb9f6a1bf3d026cecc55f1dd2bba7def13724c186fbbb228a2d4bb33a5b60b663dccea216dd53b455d0", + "sha1": "49ae9c7668df07fc576fcd74299c81ffa417ec76" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.10/modmenu-1.16.10.jar", + "filename": "modmenu-1.16.10.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "mzVbb1XI", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.2 for 1.17", + "version_number": "2.0.2", + "changelog": "- Update Persian Translation\n- Allow for more \"dynamic\" provider factories through the API\n- Added Korean Translation\n- Fixed some rendering issues from the 21w14a port\n- Update Russian Translation\n- Updated Catalan translation\n- Handle errors in API implementations more gracefully\n- Updated Simplified Chinese Translation\n- Updated to 21w14a\n- Re-ported Mod Menu v1.16.7 to Minecraft Snapshot 20w06a (from Minecraft 1.16.5)", + "changelog_url": null, + "date_published": "2021-06-12T03:29:55.681242Z", + "downloads": 2122, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "2d66d55e114ee19877ffd3ad6ac901a3290b6b4f0e9000c7a3a8f0a5f401ea3a29bccafea7ea06a7d604057d6be9319f24752e456796624b2e36d0bcce062504", + "sha1": "e6ebbc3115c74dd601129099acc792e214783966" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.2/modmenu-2.0.2.jar", + "filename": "modmenu-2.0.2.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17", + "1.17.1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "wRE7Emzz", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.0-beta.7 for 1.17-pre1", + "version_number": "2.0.0-beta.7", + "changelog": "- Update Persian Translation\n- Allow for more \"dynamic\" provider factories through the API\n- Added Korean Translation\n- Fixed some rendering issues from the 21w14a port\n- Update Russian Translation\n- Updated Catalan translation\n- Handle errors in API implementations more gracefully\n- Updated Simplified Chinese Translation\n- Updated to 21w14a\n- Re-ported Mod Menu v1.16.7 to Minecraft Snapshot 20w06a (from Minecraft 1.16.5)", + "changelog_url": null, + "date_published": "2021-05-31T18:14:39.483247Z", + "downloads": 191, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "d08ccef96f514813b577d1d1d246af546619cc8d8a21f058d5f920bb52477f98f2228ff80f1332891a96e7228812cc85dcca5217af0adacc8a8839780028eff1", + "sha1": "a3b26ff7bb57b226dcf500f6dbe42162d658e850" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.0-beta.7/modmenu-2.0.0-beta.7.jar", + "filename": "modmenu-2.0.0-beta.7.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17-pre1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "EDbIonje", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.0-beta.5 for 1.17-pre1", + "version_number": "2.0.0-beta.5", + "changelog": "No Changelog Available", + "changelog_url": null, + "date_published": "2021-05-29T07:04:58.631931Z", + "downloads": 35, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "92c2c785c0b06cff93203e2280abc794d62c959c", + "sha512": "917b08fdca974897ee46ffda2dea111211119f040137b7ba2314cce7e12a243ea182c547b89980efb6744b79898582f0d06824f53307c6c477f057b0415d532f" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.0-beta.5/modmenu-2.0.0-beta.5.jar", + "filename": "modmenu-2.0.0-beta.5.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17-pre1" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "Gz5wa6j2", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.10.6 for 1.15.2", + "version_number": "1.10.6", + "changelog": "- Fix crash with default API getId implementation resulting in NPE", + "changelog_url": null, + "date_published": "2021-04-10T19:39:37.333394Z", + "downloads": 202, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "197062aefc991c5151ac143343bd2082535ca2f6", + "sha512": "58628244c8e2a22dc89eb091db3d5a12852130e97f97d979e55d1a3f083ad5db89806dfd50bf8b4fbfa9c67c74f09205d33439b80a8a179701151de8b9bd7a5b" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.10.6/modmenu-1.10.6.jar", + "filename": "modmenu-1.10.6.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.15.2" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "RIf7gcLA", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.0-beta.4 for 21w14a", + "version_number": "2.0.0-beta.4", + "changelog": "- Update Persian Translation\n- Allow for more \"dynamic\" provider factories through the API\n- Added Korean Translation\n- Fixed some rendering issues from the 21w14a port", + "changelog_url": null, + "date_published": "2021-04-10T08:18:47.063082Z", + "downloads": 49, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "544b546c1b2568dd0b093e50d5f62831b9e5064d", + "sha512": "914f3b947feebb48f71c49af6599d8dd111b8e9e86323b9611e4a6377e7addd807e22b5990a2fc9294df3f95629ae2db01bb907b5b3826d4c35bde4229b93c1a" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.0-beta.4/modmenu-2.0.0-beta.4.jar", + "filename": "modmenu-2.0.0-beta.4.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "21w14a" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "pqlMITZQ", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.0-beta.3 for 21w14a", + "version_number": "2.0.0-beta.3", + "changelog": "- Update Russian Translation\n- Updated Catalan translation\n- Handle errors in API implementations more gracefully\n- Updated Simplified Chinese Translation\n- Updated to 21w14a", + "changelog_url": null, + "date_published": "2021-04-08T02:20:56.992170Z", + "downloads": 10, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "c90741f8ddfe2d1f5e563aa017ee0814544278272bd60414c8d9cbe8a67066147be7eb44bfcf08a8ddec9e29051fcc7521ea5e903405f88726016ac67f696065", + "sha1": "483ebf02440cbca5926433f6caecd175f64f04d7" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.0-beta.3/modmenu-2.0.0-beta.3.jar", + "filename": "modmenu-2.0.0-beta.3.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "21w14a" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "bPE0GIoY", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.9 for 1.16.5", + "version_number": "1.16.9", + "changelog": "- Allow for more \"dynamic\" provider factories through the API\n- Updated Persian Translation\n- Updated Catalan translation\n- Updated Russian Translation", + "changelog_url": null, + "date_published": "2021-04-08T01:59:50.513004Z", + "downloads": 1868, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "513e4e6355ac5ba2192222482eb0bd8d2d8edeb7", + "sha512": "fe5d944e2925a608babf73890e6423ee655872048ed122f0336c4c697024440e19146d04dda4c448a317273fb70578a393cf04e7cb6a33e85bc7ec7807b1fd15" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.9/modmenu-1.16.9.jar", + "filename": "modmenu-1.16.9.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "wb5nbuL5", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.8 for 1.16.5", + "version_number": "1.16.8", + "changelog": "- Handle errors in API implementations more gracefully\n- Updated Simplified Chinese Translation", + "changelog_url": null, + "date_published": "2021-02-20T23:28:08.977665Z", + "downloads": 916, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "9d5fbe5ce7b1a7a26f4a4c12321809b9a0c6e9099a3f74ff7ad4f49c96f13885c4695938c516b39f529b51823f0ea5038f67ddbf4ed3ec69432f09c20f7d875b", + "sha1": "d59e0064d42213462379f63d3aa0e72151439aac" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.8/modmenu-1.16.8.jar", + "filename": "modmenu-1.16.8.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "6YvLIUDN", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v2.0.0-beta.2 for 21w06a", + "version_number": "2.0.0-beta.2", + "changelog": "- Re-ported Mod Menu v1.16.7 to Minecraft Snapshot 21w06a (from Minecraft 1.16.5)", + "changelog_url": null, + "date_published": "2021-02-11T02:59:39.111229Z", + "downloads": 69, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "595beb5853cb1ac7cb0ea4ae83d120dafdd0adfc", + "sha512": "37851b3fa8e460e79dce63dd0a65d7a8f6fedeaff0d9985e46cc733309b16ceddeb81817951f3c0ab038b50fe441a370f882b3520f1971282024810356a3b898" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/2.0.0-beta.2/modmenu-2.0.0-beta.2.jar", + "filename": "modmenu-2.0.0-beta.2.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "21w06a" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "pxj9L3Vy", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.10.5 for 1.15.2", + "version_number": "1.10.5", + "changelog": "- Added a default implementation to getModId to allow for backwards compatible mods", + "changelog_url": null, + "date_published": "2021-02-11T01:34:19.762546Z", + "downloads": 18, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "62df0e2478d6248b1117ef0ef97d24dc3e48e99b31dfe019e4af93001da213f455bff64320451550d13037083862ae488bce7245f7d7c30132a2c4585740a052", + "sha1": "3f059cb8b9c237ae1393730c29a2706284404dd4" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.10.5/modmenu-1.10.5.jar", + "filename": "modmenu-1.10.5.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.15.2" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "Mnl0OeFI", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.7 for 1.16.5", + "version_number": "1.16.7", + "changelog": "- Include fabric-api-base\n- Added translations for Wiki and Crowdin link keys", + "changelog_url": null, + "date_published": "2021-02-11T00:59:39.572339Z", + "downloads": 229, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "63da238680e21e125ce85ebebc82c06677e8548f", + "sha512": "c20c276036ed10f6c49b8c1d0a43839d8f6ce372155ce9b45e255d8bac24f540b39d22b9b7f11f2d2429eaa430d79474a73f4b472e63c7d9248592d4a0b6795e" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.7/modmenu-1.16.7.jar", + "filename": "modmenu-1.16.7.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "PqgXyy3N", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.6 for 1.16.5", + "version_number": "1.16.6", + "changelog": "- Mark Better Mod Button as incompatible\n- Handle errors from other mods' config factories more gracefully, will now just log and remove the mod's config button.", + "changelog_url": null, + "date_published": "2021-02-05T22:22:58.469004Z", + "downloads": 131, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "8da9d6db8ff527c926dad773d1f115fa7f770ad1d44bca128fe844f2d3302e491cf1e7bdedda82c350420e5ab3ca3b3c143c9fafa07c5085fde3b7e5dd05e358", + "sha1": "cd1b7d594e17cdfcb9313fd1af7f9a1f3d216701" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.6/modmenu-1.16.6.jar", + "filename": "modmenu-1.16.6.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "TleLdS1A", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.5 for 1.16.5", + "version_number": "1.16.5", + "changelog": "- Added additional link key translations for common links", + "changelog_url": null, + "date_published": "2021-02-03T17:37:00.869777Z", + "downloads": 97, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "412db6dd04056379c6df0997bf3570a01816dd2d", + "sha512": "19efda14091e729e994344c88bda708b9dc4db1fa7a58deaf6a276ea8877f68048e6fb8a2155be4e32760822d5b78102e0c3e6bf216216f3bb613adae6fbe16f" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.5/modmenu-1.16.5.jar", + "filename": "modmenu-1.16.5.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "kBofQyu4", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.4 for 1.16.5", + "version_number": "1.16.4", + "changelog": "- Moved the licensing information above credits\n- Changed the order of the config buttons\n- Updated Finnish translation", + "changelog_url": null, + "date_published": "2021-02-03T00:30:43.903288Z", + "downloads": 35, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "c62b8b2e1f39c611219639f791592a4b964db770", + "sha512": "c250843a0e64cdfb3be7b60781cdb9935d75549f7a8200dcfaa6dc95734b731c9506892d9356462fb06f20f16da81b556065378910924f98dc59eea6de1035c5" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.4/modmenu-1.16.4.jar", + "filename": "modmenu-1.16.4.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "79rtoAM6", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.3 for 1.16.5", + "version_number": "1.16.3", + "changelog": "- Fixed incorrect error being logged when a mod defines an invalid icon\n- Fixed an error being logged when no icon is at the default path", + "changelog_url": null, + "date_published": "2021-02-02T06:00:47.911634Z", + "downloads": 24, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "8f330a0437ce6840b5c1292338944a313c420cee009b7308b128f4f9f2cec9bd42c5f3484a7f1f07c8ba8fd649784e6353146733ed019d0f247b7c4b13f80bbc", + "sha1": "a069de2a17a6a4a9d2712c5045ade3b8ac0c2711" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.3/modmenu-1.16.3.jar", + "filename": "modmenu-1.16.3.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "7QWIhei3", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.2 for 1.16.5", + "version_number": "1.16.2", + "changelog": "- Fixed icons for mods that were using the default icon path\n- Added the old button textures to the Programmer Art resource pack\n- Update Catalan translation\n- Updated Turkish translation", + "changelog_url": null, + "date_published": "2021-02-02T02:55:07.428315Z", + "downloads": 15, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "88dd61ffdcf974ca8fd8f5234507f383497979f91f5e4349e729fca4deb7fef3c5c558d37b40ff0af7404b4ae66c418ebcf17d7d86470ba8bb1be000aa477c58", + "sha1": "214413d0f21514355e49e399be268b8f00536570" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.2/modmenu-1.16.2.jar", + "filename": "modmenu-1.16.2.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "zC13OZD9", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.1 for 1.16.5", + "version_number": "1.16.1", + "changelog": "- Updated Estonian translation\n- Fixed a bug with the mod count\n- Added mod id tooltip for fake mods", + "changelog_url": null, + "date_published": "2021-02-01T16:43:37.225565Z", + "downloads": 18, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "f6135e7d451e7b530931f401e2281d6515f35324", + "sha512": "101e5b0b6f53cd3d48ddc4df6f560fde2a0e1024a3e1441cae36feda8566508d58d40d74e672d41f216536296add5689042521336b654eccb4c61ac3894532a7" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.1/modmenu-1.16.1.jar", + "filename": "modmenu-1.16.1.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "O90fUm3q", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.16.0 for 1.16.5", + "version_number": "1.16.0", + "changelog": "- Fixed two of the Mods button style names being wrong\n- Added an API for getting the Mods button text", + "changelog_url": null, + "date_published": "2021-02-01T07:43:32.314913Z", + "downloads": 24, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "ff8d7b2889aa69af06d73bfc2b679db80cb78190", + "sha512": "99a3f39e463e53da878a34e37a6084caa5cfefd1df9f973989815195af26548bceeb351a30585e27e77413e27e7ede95bd653549b633663004b5904658fb3f38" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.16.0/modmenu-1.16.0.jar", + "filename": "modmenu-1.16.0.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "DgzrfgAZ", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.15.0 for 1.16.5", + "version_number": "1.15.0", + "changelog": "- Major internal refactors\n- Added links, contributors, and license information\n- Added an options screen for Mod Menu\n- Added a compact list mode option\n- Added an options to change Mods button style to: Below Realms (Default), Shrink Realms, Replace Realms, and Fabric Icon\n- Added an option to hide mod badges\n- Added an option to move where the mod count is displayed (on button, on title screen, both, neither)\n- Added options to specify whether or not to count libraries, children, and hidden mods in the mod count\n- Added options to hide mod links, credits, or license info\n- Added options to disable the modification of the title screen and/or game menu screen\n- Changed the hardcoded icon for \"java\n- Probably more that got forgotten about in this massive update", + "changelog_url": null, + "date_published": "2021-02-01T06:38:14.029901Z", + "downloads": 87, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "9c09902f887f3f742082835b8dd05a7f648786c5", + "sha512": "0a89c3513294091c639f9ed4c64252f9b469d252993e86163222687db2455d331984341c954eca84037ba06f38227de37406912fd77f342feb23bdc96048c6f6" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.15.0/modmenu-1.15.0.jar", + "filename": "modmenu-1.15.0.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "M3KFXLhq", + "mod_id": "mOgUt4GM", + "author_id": "Dc7EYhxG", + "featured": false, + "name": "Mod Menu v1.14.15 for 1.16.5", + "version_number": "1.14.15", + "changelog": "", + "changelog_url": null, + "date_published": "2021-01-23T23:55:25.659110Z", + "downloads": 125, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "5e213c8cebfed2785f7d4f5f84af121f488e51ce", + "sha512": "c53c4e17a9008f7f3c99b081ae9da14716c62456975e4c7eefc09641f517a788a974fbce6e6924c366f5b5781ae1825b469e2a10b43e1f03a7e3898dd8571c37" + }, + "url": "https://cdn.modrinth.com/data/mOgUt4GM/versions/1.14.15/modmenu-1.14.15.jar", + "filename": "modmenu-1.14.15.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "fabric" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/version/terra.json b/src/test/resources/version/terra.json new file mode 100644 index 0000000..16e17cc --- /dev/null +++ b/src/test/resources/version/terra.json @@ -0,0 +1,1113 @@ +[ + { + "id": "i38N6tkR", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "fabric-5.4.1-BETA+40e95073", + "version_number": "5.4.1-BETA+40e95073", + "changelog": "", + "changelog_url": null, + "date_published": "2021-06-20T00:08:19.146680Z", + "downloads": 3004, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "20229a82dcbd486ef6a680a05021cc76e852b559", + "sha512": "24443715db3143eb53b234aafe519ef1b67da10f796a1ed11410d77947076b6754d7954ae79b1a0d90b27499359031d59aa4da00b91830d0477514d12b223850" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.4.1-BETA+40e95073/Terra-fabric-5.4.1-BETA+40e95073-shaded-mapped.jar", + "filename": "Terra-fabric-5.4.1-BETA+40e95073-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "z4dIPu75", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "fabric-5.3.3-BETA+6027c282", + "version_number": "fabric-5.3.3-BETA+6027c282", + "changelog": "", + "changelog_url": null, + "date_published": "2021-06-08T17:30:42.514821Z", + "downloads": 834, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "a72fcf11b8e1867e5c0a2e354ba9b6ee9b7f60ac", + "sha512": "ff0e48d023f06d76cdbb35e1da12d21b4a24a7a06ef85892bd9ccddd15738b07554faa469acff052ef3e38fde5465a941f49e033578dd0c7de23696a919c2efe" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/fabric-5.3.3-BETA+6027c282/Terra-fabric-5.3.3-BETA+6027c282-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.3-BETA+6027c282-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.17" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "bD7DEeaK", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "forge-5.3.3-BETA+ec3b0e5d", + "version_number": "forge-5.3.3-BETA+ec3b0e5d", + "changelog": "", + "changelog_url": null, + "date_published": "2021-05-23T05:10:36.657171Z", + "downloads": 10183, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha1": "dc9292f501f03d03e5f05f67b8d23ef6378d8b51", + "sha512": "7f449fc1f64500c564a6006c133f1021b3a1bec210b416749173cb996473b9927d240aee6c6fe42ee92a21dd745370c3ebc4043482069c843913c748f6870a99" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/forge-5.3.3-BETA+ec3b0e5d/Terra-forge-5.3.3-BETA+ec3b0e5d.jar", + "filename": "Terra-forge-5.3.3-BETA+ec3b0e5d.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "forge" + ] + }, + { + "id": "9DWPUHbr", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "fabric-5.3.3-BETA+5dd00db8", + "version_number": "fabric-5.3.3-BETA+5dd00db8", + "changelog": "", + "changelog_url": null, + "date_published": "2021-05-19T04:10:22.025090Z", + "downloads": 2804, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "26f517eb0fdd694de00f5ceb4fe6e33a0eba87f4a9ccb86207ef8c104116a4aff497a3c15c7bee23e71511f596735a381503f75e41860d6d1d2f02d441b439e1", + "sha1": "5ffed3a47cf09f192c52fb6476ad7bbca406794e" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/fabric-5.3.3-BETA+5dd00db8/Terra-fabric-5.3.3-BETA+5dd00db8-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.3-BETA+5dd00db8-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "DYQWCFn1", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "forge-5.3.3-BETA+2dc7b501", + "version_number": "forge-5.3.3-BETA+2dc7b501", + "changelog": "", + "changelog_url": null, + "date_published": "2021-05-19T03:36:58.578212Z", + "downloads": 1504, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha1": "04525b596e133311932a04e6b7ada1d69ef294ba", + "sha512": "8b771d6fce2c1f9471b6973c0b25f06d775fb5132ebdeece747f246735f88c89c8defb664009b479ecba4d4c0a528324293bddbe4b0bc14d63cc46b51e198a49" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/forge-5.3.3-BETA+2dc7b501/Terra-forge-5.3.3-BETA+2dc7b501.jar", + "filename": "Terra-forge-5.3.3-BETA+2dc7b501.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "forge" + ] + }, + { + "id": "hrYE97dR", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "fabric-5.3.2-BETA+bac026a1", + "version_number": "fabric-5.3.2-BETA+bac026a1", + "changelog": "", + "changelog_url": null, + "date_published": "2021-05-16T04:51:17.782216Z", + "downloads": 355, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "a9eb4ddce22ec15a0eb1d13702176c7a342e3ce6", + "sha512": "8ad15dda0d689205e6faac8e6dfc73fe4907dbcfa6d68bb7c7fb06000264309561238dbedb5b63013d1a192da1f7c473510c2e3b0c06c12b59592be2beb74f44" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/fabric-5.3.2-BETA+bac026a1/Terra-fabric-5.3.2-BETA+bac026a1-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.2-BETA+bac026a1-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "lrZzc0KE", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "forge-5.3.2-BETA+e86f37fd", + "version_number": "forge-5.3.2-BETA+e86f37fd", + "changelog": "", + "changelog_url": null, + "date_published": "2021-05-15T05:40:52.461013Z", + "downloads": 1682, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha512": "8f8dab17a02727f535dfcfb6d37817cc27e6ad3a349ba108c77a12bd83657037a60812d883d8adf39b00b136076ef1922867ae1043f916932d5f018b55bdd712", + "sha1": "7fd939542fe1e7ba3b86ef2ff55b4ba4a1eb2506" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/forge-5.3.2-BETA+e86f37fd/Terra-forge-5.3.2-BETA+e86f37fd.jar", + "filename": "Terra-forge-5.3.2-BETA+e86f37fd.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "forge" + ] + }, + { + "id": "wM9oTkoy", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "fabric-5.3.2-BETA+9d991dbb", + "version_number": "fabric-5.3.2-BETA+9d991dbb", + "changelog": "", + "changelog_url": null, + "date_published": "2021-05-14T17:32:13.034801Z", + "downloads": 185, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "d300c51e38634641ee8854b0c61990b2fcb08ada", + "sha512": "a2fb03263d80c80dc7acc93ecb5647acc9c35fcdbbab1fbb20fdf403686f432c61f9ec02b305bd14fa212cf1869430c8c8608d72c1e70af24a7c7cf90b4fd9ee" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/fabric-5.3.2-BETA+9d991dbb/Terra-fabric-5.3.2-BETA+9d991dbb-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.2-BETA+9d991dbb-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "BRrEE6Bp", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "fabric-5.3.1-BETA+0ab94917", + "version_number": "fabric-5.3.1-BETA+0ab94917", + "changelog": "", + "changelog_url": null, + "date_published": "2021-05-12T03:10:02.580283Z", + "downloads": 339, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "6b48f470dffb7bc157084f3044deb44cfcd5e4b847a846c81ffad4893cfd9e4c1177254169f6cd1618bcfcd2d745db94badcd3e1e3f361df617cf3c5e27b0613", + "sha1": "4d5259f57253ad4ab1c9959def4dd86c0e5bc980" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/fabric-5.3.1-BETA+0ab94917/Terra-fabric-5.3.1-BETA+0ab94917-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.1-BETA+0ab94917-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "49u1xXFO", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.3.1-BETA+0ab94917", + "version_number": "5.3.1-BETA+0ab94917-fabric", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-11T23:09:29.462461Z", + "downloads": 58, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "d7abbdb68962f25607a833743e4c77568aa47b59a7d8fd84393f4a4909a16f9a164a8fa643251e8831f0aa989fd3d83a1d0e889bbbbe696db54d31fdf7f1ec74", + "sha1": "29c1c0fe4a060ace636a4c71c412cc4cb7cd477b" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.3.1-BETA+0ab94917-fabric/Terra-fabric-5.3.1-BETA+0ab94917-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.1-BETA+0ab94917-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "WIgGr0NO", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.3.1-BETA+2bfaa95a", + "version_number": "5.3.1-BETA+2bfaa95a-fabric", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-11T23:04:44.142443Z", + "downloads": 2, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "d36112b5bdc36b9f73587fb78bd00f64994e4530", + "sha512": "6faa1f5f28a97773689ca292dc045b78931a35af37ca1f427ae519dc1dd22e127a81d444c6d2e4bd3d0b8655818d52f338d054caf196818cff7134f1d6f33f81" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.3.1-BETA+2bfaa95a-fabric/Terra-fabric-5.3.1-BETA+2bfaa95a-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.1-BETA+2bfaa95a-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "6LSdGHFk", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.3.1-BETA+96de1554", + "version_number": "5.3.1-BETA+96de1554-fabric", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-11T22:59:28.421224Z", + "downloads": 3, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "0bc4abbc5d8474c8df5ed88b61f744258272cf56817427291107275a3e18084418dfb693192dd93138196922bfe4ef77ae75e0e86e0d74ea2ca4ae6cdcbbcda6", + "sha1": "dc1f9585630bad2ce550caa2b461cdf4593c22b1" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.3.1-BETA+96de1554-fabric/Terra-fabric-5.3.1-BETA+96de1554-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.1-BETA+96de1554-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "TV5SStzQ", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.3.1-BETA+f83dcd80", + "version_number": "5.3.1-BETA+f83dcd80-fabric", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-11T16:04:33.658292Z", + "downloads": 55, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "fcc8fd9ed09448fa979ae6bfedccb382c1d89ed005755636fd75fd169d0a9b33ccd718729edd2eac56eb2ba8da1b2424f3676475ad0e018dcb826c881c5f7b35", + "sha1": "1bbff473dcb280109985fa37b63146ec97178588" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.3.1-BETA+f83dcd80-fabric/Terra-fabric-5.3.1-BETA+f83dcd80-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.1-BETA+f83dcd80-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "w1sOAxwx", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.3.1-BETA+e00271e4", + "version_number": "5.3.1-BETA+e00271e4-fabric", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-11T06:19:47.983356Z", + "downloads": 105, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "5dc9d5b378bbd27cd10cbcb7b7f8649cdf8be44ca565013e9204956e61622d06e16669ab594aca8bcbdd4860100f2d95241d97dae874f25e41f492c05315a3a4", + "sha1": "320f81bbf6fea8179ba0707ec39324b0927b7b7e" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.3.1-BETA+e00271e4-fabric/Terra-fabric-5.3.1-BETA+e00271e4-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.1-BETA+e00271e4-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "gG1VHSY5", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.3.0-BETA+fd48f5f1", + "version_number": "5.3.0-BETA+fd48f5f1-fabric", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-04T23:49:32.273528Z", + "downloads": 635, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "bf605d49dee7a3dd9bf53c3d9aa8236e89abd9ae534926ac08a3d87293afe0e8b4c037e2842bcc2684a414582186533f902d780d849c46775c10c299c9ffe1b8", + "sha1": "75447b4b6468cee52d3ef85c2f8286d01671bcb4" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.3.0-BETA+fd48f5f1-fabric/Terra-fabric-5.3.0-BETA+fd48f5f1-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.0-BETA+fd48f5f1-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "uGSeZ34X", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.3.0-BETA+fd48f5f1", + "version_number": "5.3.0-BETA+fd48f5f1-forge", + "changelog": "The project has been updated to project ':platforms:forge'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-04T23:49:28.721624Z", + "downloads": 3465, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha1": "00ae0c809136cd48d464e3b8828f68dd84a455e7", + "sha512": "258b538ae9309a68e6577683da4212348734b6208bbb6cb2a55bd36bc2b558bd453bd82e5712b2f67ca56fe3c8c0e7a868d15f5111e5d4bb0f573f49f9f736c6" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.3.0-BETA+fd48f5f1-forge/Terra-forge-5.3.0-BETA+fd48f5f1-shaded.jar", + "filename": "Terra-forge-5.3.0-BETA+fd48f5f1-shaded.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "forge" + ] + }, + { + "id": "as9EalBI", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.3.0-BETA+dbc60b1d", + "version_number": "5.3.0-BETA+dbc60b1d-fabric", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-04T23:20:01.726676Z", + "downloads": 14, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "00254ac571b114ae82f795e53ca23c992e96a369", + "sha512": "caef6d8867408b8484078bbdf88c9fe2ab973bb1964e3e67182cf3d5f14e295d8b6245ae77336d0c57c9314ace3f32d3bb3998b07ec40bbc7819dd7782222131" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.3.0-BETA+dbc60b1d-fabric/Terra-fabric-5.3.0-BETA+dbc60b1d-shaded-mapped.jar", + "filename": "Terra-fabric-5.3.0-BETA+dbc60b1d-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "tpRPSoxK", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.3.0-BETA+dbc60b1d", + "version_number": "5.3.0-BETA+dbc60b1d-forge", + "changelog": "The project has been updated to project ':platforms:forge'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-04T23:19:58.525675Z", + "downloads": 95, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha1": "dbddbabbf9ff8913dbf5cc425f3a33fcb08539f0", + "sha512": "569f63da94afda35dc2ad9c42ad0c7fd98a603180d41cc66e691e41e605e6f6b5d9a2970b11a5a0e92d4e196ab5104900eba417f7ab6aa01475fc7fd8eb5daae" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.3.0-BETA+dbc60b1d-forge/Terra-forge-5.3.0-BETA+dbc60b1d-shaded.jar", + "filename": "Terra-forge-5.3.0-BETA+dbc60b1d-shaded.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "forge" + ] + }, + { + "id": "SSmQT73f", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.2.1-BETA+a7e3a028", + "version_number": "5.2.1-BETA+a7e3a028-fabric", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-03T00:49:47.553997Z", + "downloads": 19, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "f03106f57767c4bcbc3f2dfbdfd0bdbc4ea2b32b", + "sha512": "cabc50642516ba0d026eb10da684ef043c198fc6c817ad3216976518c9ecb71fe87dfea33b9084d6c316ef7b216919578e1b289cfd06479d770b25dba910f97e" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.2.1-BETA+a7e3a028-fabric/Terra-fabric-5.2.1-BETA+a7e3a028-shaded-mapped.jar", + "filename": "Terra-fabric-5.2.1-BETA+a7e3a028-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "2N4ewkYC", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.2.1-BETA+a7e3a028", + "version_number": "5.2.1-BETA+a7e3a028-forge", + "changelog": "The project has been updated to project ':platforms:forge'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-03T00:49:47.027126Z", + "downloads": 41, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha1": "bb4638f89cb3d92aeb2ef99f9efbe45c0877d385", + "sha512": "74f55db4e5ddd0cd15b9bbd25235312492593bdb12a7b9e9de91dbbee9b504838fe2d452028e95c4011b52427900bc340b4be52d59df2568456abd3ca3b33023" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.2.1-BETA+a7e3a028-forge/Terra-forge-5.2.1-BETA+a7e3a028-shaded.jar", + "filename": "Terra-forge-5.2.1-BETA+a7e3a028-shaded.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "forge" + ] + }, + { + "id": "S2MR1UPS", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.2.1-BETA+6da89248", + "version_number": "5.2.1-BETA+6da89248", + "changelog": "The project has been updated to project ':platforms:forge'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-05-03T00:44:17.711246Z", + "downloads": 48, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha512": "11e9f821d4f127ff56d2cac94cccf24547a4491dfa91e194d7df736cddf55d3af6063b8f36a13be659f2d38b116106a27d73baf369a7d76aadb08bc3209f519b", + "sha1": "2ee706131d954e00576c7ff47cabcdfc1874d796" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.2.1-BETA+6da89248/Terra-forge-5.2.1-BETA+6da89248-shaded.jar", + "filename": "Terra-forge-5.2.1-BETA+6da89248-shaded.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.5" + ], + "loaders": [ + "forge" + ] + }, + { + "id": "WwSRJnsL", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.2.0-BETA+eee54f50", + "version_number": "5.2.0-BETA+eee54f50", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-04-27T04:35:08.844327Z", + "downloads": 27, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "f04060bd63fee40c10ab053aff2f320935b68d19b5d077d31fbb01291f00923c0dabd7c5b7c7574b18e497f83aa56a7a20f85b419a9e81629a622478edfa5f6c", + "sha1": "51411007133351f890bd73c9ded2dbf312f5a817" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.2.0-BETA+eee54f50/Terra-fabric-5.2.0-BETA+eee54f50-shaded-mapped.jar", + "filename": "Terra-fabric-5.2.0-BETA+eee54f50-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "UEeyCR8s", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.1.3-BETA+f396e0e5", + "version_number": "5.1.3-BETA+f396e0e5", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-04-16T16:04:50.923529Z", + "downloads": 47, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "57a8bb323e7c4d419d9bc4788d27602b3642180be22b95389d57dffc40fd84938cf8a8ae0fc17cde5bbf458e91ed4df56518ec1e05f8dd860a952dc54faab98c", + "sha1": "4be032f695d25d5abe3c9247cde31079b9feadf0" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.1.3-BETA+f396e0e5/Terra-fabric-5.1.3-BETA+f396e0e5-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.3-BETA+f396e0e5-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "QFi5X6v3", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.1.3-BETA+5ac72575", + "version_number": "5.1.3-BETA+5ac72575", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-04-12T01:59:56.019903Z", + "downloads": 29, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "3d8adf23d735507a78df5c35a931d4efc50d624c5e4d494888426fa9320799fb5a67edfb10b9eb9d11397a67f9306febb85964012ad34689654d4b767ccc44e9", + "sha1": "9a3165ccb099e6dc947788816d0f274c961db5c1" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.1.3-BETA+5ac72575/Terra-fabric-5.1.3-BETA+5ac72575-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.3-BETA+5ac72575-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "MyOLliqX", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.1.2-BETA+7a703ad0", + "version_number": "5.1.2-BETA+7a703ad0", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-04-11T21:20:59.975856Z", + "downloads": 5, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "e5cdfbcc8f5db913bd971ca8af7ba2bef3e91ef5", + "sha512": "577dfdc73c9d0238eba3c27c5963a5c86a945fefc14ea0bdcabacc3b536f6857428638352e4a44dc18ea405a4f20b7e9de01f72d0a746af47ab34b9783362d10" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.1.2-BETA+7a703ad0/Terra-fabric-5.1.2-BETA+7a703ad0-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.2-BETA+7a703ad0-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "IcJeyROT", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.1.2-BETA+8a933609", + "version_number": "5.1.2-BETA+8a933609", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-04-01T22:19:37.101837Z", + "downloads": 37, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "c4db77fadef4fcf2eccd72f3cf1025d95ff78c13", + "sha512": "1207c868ed19ef4524920bb1aa9435538d4e3e875f40522ba5ea013b8dd846d8638e96768c84c0e98717bb3308d8bd2ebcb67c6e0502f348f90e8cf4472eab73" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.1.2-BETA+8a933609/Terra-fabric-5.1.2-BETA+8a933609-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.2-BETA+8a933609-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "ZRDLEqdv", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.1.2-BETA+f8e8ce8b", + "version_number": "5.1.2-BETA+f8e8ce8b", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-04-01T03:54:45.253691Z", + "downloads": 428, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "49afc056e7fbee77cf909af0c100e6e56dd34f8ca93fee4df2da68717f1d7e7b54a6956d24a15a417bb2b37118b95605124f7497f653c7b4a7efee4e1cfcc113", + "sha1": "51d54039ab98bc8dc297ee2a03bd8a30a284c2a7" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.1.2-BETA+f8e8ce8b/Terra-fabric-5.1.2-BETA+f8e8ce8b-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.2-BETA+f8e8ce8b-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "YAgTTVXU", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.1.1-BETA+ec0730ef", + "version_number": "5.1.1-BETA+ec0730ef", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-03-30T04:16:10.640365Z", + "downloads": 38, + "version_type": "release", + "files": [ + { + "hashes": { + "sha512": "324b911a9e18a062f577a49d9906aadc89f16d488486460d20d473fbe64fd9599d618160a19ce3868c239a363ccd56c4e77208c23f2514df7fe1b0476f3fbebb", + "sha1": "160b3e1fa0421947f119aec46a35adca319d2f7d" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.1.1-BETA+ec0730ef/Terra-fabric-5.1.1-BETA+ec0730ef-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.1-BETA+ec0730ef-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "Gj35Qm97", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.1.1-BETA+fb8c7098", + "version_number": "5.1.1-BETA+fb8c7098", + "changelog": "The project has been updated to project ':platforms:fabric'. No changelog was specified.", + "changelog_url": null, + "date_published": "2021-03-30T04:08:54.458254Z", + "downloads": 30, + "version_type": "release", + "files": [ + { + "hashes": { + "sha1": "a7aa029b20d0d0b8ff241e84bb8562319d381f9d", + "sha512": "448102309a0f942048b544a74a3e3e167ffe656f37f67c3a5c58bc0dc63b12b5c59dc4c29608856fef980a6585bb0c7e12060a753b46d2d060d8493d96242723" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.1.1-BETA+fb8c7098/Terra-fabric-5.1.1-BETA+fb8c7098-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.1-BETA+fb8c7098-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "oVS8UkGG", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.1.1-BETA", + "version_number": "5.1.1-BETA", + "changelog": "", + "changelog_url": null, + "date_published": "2021-03-29T23:54:33.659374Z", + "downloads": 1, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "6b5dae6a0ba85809c651417b39941966cc0cb3929e6b8b4106e6508db2f3f8492f72a514253cde37a06b287e4f5b9506ab97530dc5f74d328d548bc72faa3d59", + "sha1": "127c76ae5f671b2671766657deae1fd13f397c16" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.1.1-BETA/Terra-fabric-5.1.1-BETA+c5800970-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.1-BETA+c5800970-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "8PKBI4jd", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "Terra-5.1.0-BETA+2e8cd54a", + "version_number": "Terra-5.1.0-BETA+2e8cd54a", + "changelog": "", + "changelog_url": null, + "date_published": "2021-03-17T20:50:21.106124Z", + "downloads": 29, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "6a7813aa0bc9d3508ab4c3b69c23eff8c874f029ee69dcbec3cb8994188b42fc3554d69bd04862182fd8a6c1aa729450b3bb3694cd96ce1f935a2d983083e7cf", + "sha1": "49e7a81a3d9ab17ee2e4395f9ab7a6a518588c90" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/Terra-5.1.0-BETA+2e8cd54a/Terra-fabric-5.1.0-BETA+2e8cd54a-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.0-BETA+2e8cd54a-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "zQ3kJfme", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.1.0-BETA+2e8cd54a", + "version_number": "5.1.0-BETA+2e8cd54a", + "changelog": "", + "changelog_url": null, + "date_published": "2021-03-17T20:36:15.982618Z", + "downloads": 1, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha512": "2c3941a2ae94d73ebb1e519b0935016ba66d9403a90336a9b55b1182818df3cacbe18e2c7a5e25b7444b93aa451c709f6eb78708f3e0eae3a59763370f5628b3", + "sha1": "50825527bac734a98265dc414a29ddb42640c964" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.1.0-BETA+2e8cd54a/Terra-fabric-5.1.0-BETA+2e8cd54a-shaded-mapped.jar", + "filename": "Terra-fabric-5.1.0-BETA+2e8cd54a-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "Bu3XrzNE", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.0.0-BETA+c44d26cc", + "version_number": "5.0.0-BETA+c44d26cc", + "changelog": "Performance improvements\n", + "changelog_url": null, + "date_published": "2021-03-08T05:31:09.257394Z", + "downloads": 29, + "version_type": "beta", + "files": [ + { + "hashes": { + "sha1": "d3c31ec6076758bef23dd5ccad7ccbb506d72e88", + "sha512": "a90ed0199f33fba1c24e42c98bc1f6d5404a9e526f4b1cdba378f552045ccc5d4f805eee3581f64a7f48561fa8ad277257cbe02271988100b8a84bde478edad7" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.0.0-BETA+c44d26cc/Terra-fabric-5.0.0-BETA+c44d26cc-shaded-mapped.jar", + "filename": "Terra-fabric-5.0.0-BETA+c44d26cc-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "1TeOdIt7", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.0.0-BETA+7f988dcf", + "version_number": "5.0.0-BETA+7f988dcf", + "changelog": "This version adds inventory and entity support, meaning the `loot` and `entity` TerraScript functions will now work.\n\nIt also adds more rotation stuff, so there should no longer be weirdly rotated stuff in structures.", + "changelog_url": null, + "date_published": "2021-02-25T08:53:57.376949Z", + "downloads": 46, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha512": "35ead16c9e7948b50a61a65a639bc5908e6fa98bd0d8f25a2facd49c8a429ec25dc77ebd469c2f78d4753f3df5cc964e9685768eff6f61146f7f015371acff45", + "sha1": "660a6023c2bccadc18931a1cecbeccbaaffd266e" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.0.0-BETA+7f988dcf/Terra-fabric-5.0.0-BETA+7f988dcf-shaded-mapped.jar", + "filename": "Terra-fabric-5.0.0-BETA+7f988dcf-shaded-mapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + }, + { + "id": "6jFzKi0e", + "mod_id": "FIlZB9L0", + "author_id": "2PqmLmXm", + "featured": false, + "name": "5.0.0-BETA+1637644b", + "version_number": "5.0.0-BETA+1637644b", + "changelog": "", + "changelog_url": null, + "date_published": "2021-02-24T22:24:59.184812Z", + "downloads": 20, + "version_type": "alpha", + "files": [ + { + "hashes": { + "sha1": "83917b1f185b820fd7c331d7efadbe570cf955fb", + "sha512": "bb1a9ccd86fb6e0f427dca6252ccbd680b71c1d7ffb41389c23f0b459d0ed3c41f279a652ca6393758be07f340dae2d45972c8a44a43f9c5e811efd2bfdfad80" + }, + "url": "https://cdn.modrinth.com/data/FIlZB9L0/versions/5.0.0-BETA+1637644b/Terra-fabric-5.0.0-BETA+1637644b-shaded-remapped.jar", + "filename": "Terra-fabric-5.0.0-BETA+1637644b-shaded-remapped.jar", + "primary": false + } + ], + "dependencies": [], + "game_versions": [ + "1.16.4", + "1.16.5" + ], + "loaders": [ + "fabric" + ] + } +] \ No newline at end of file From 6ce10773faab64c7d688c9cc97231413063c7599 Mon Sep 17 00:00:00 2001 From: DeathsGun Date: Wed, 29 Sep 2021 12:53:07 +0200 Subject: [PATCH 3/4] Remove SemVer4J and remove comparable Signed-off-by: DeathsGun --- build.gradle | 2 -- .../kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index b7b6953..346045c 100644 --- a/build.gradle +++ b/build.gradle @@ -45,8 +45,6 @@ dependencies { modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}" modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" - - implementation "com.vdurmont:semver4j:3.1.0" testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" } diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt b/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt index 1a7e2a0..403ac3e 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/api/mod/Version.kt @@ -25,10 +25,4 @@ data class Version( val type: VersionType, val gameVersions: List, val assets: List -) : Comparable { - override fun compareTo(other: Version): Int { - return Comparator.comparing { v: Version -> v.version } - .thenComparing { v -> v.releaseDate }.compare(this, other) - } - -} +) From 4c84b03a65c04c275d406c9cbfdec48944ea8b62 Mon Sep 17 00:00:00 2001 From: DeathsGun Date: Wed, 29 Sep 2021 20:05:41 +0200 Subject: [PATCH 4/4] Fixed a small bug and some minor changes - Updated testing lib - Added some docs in the tests Signed-off-by: DeathsGun --- build.gradle | 4 +- .../modmanager/update/UpdateManager.kt | 7 ++- .../modmanager/update/VersionFinder.kt | 8 +--- .../modmanager/dummy/DummyModrinthProvider.kt | 8 ++++ .../modmanager/update/VersionFinderTest.kt | 47 ++++++++++++++----- 5 files changed, 54 insertions(+), 20 deletions(-) diff --git a/build.gradle b/build.gradle index 346045c..8aba830 100644 --- a/build.gradle +++ b/build.gradle @@ -42,11 +42,11 @@ dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" - + modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}" modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}" - testImplementation "org.jetbrains.kotlin:kotlin-test:1.5.21" + testImplementation 'org.jetbrains.kotlin:kotlin-test:1.5.31' } processResources { diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt b/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt index 1038eb3..f45502e 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/update/UpdateManager.kt @@ -120,7 +120,12 @@ class UpdateManager { val queryResult = provider.search(metadata.name, Sorting.RELEVANCE, 0, 10) if (queryResult is ModsResult.Error) { - logger.warn("Error while searching for fallback id for mod {}: ", metadata.id, queryResult.cause) + logger.warn( + "Error while searching for fallback id for mod {}: {}", + metadata.id, + queryResult.text.key, + queryResult.cause + ) ModManager.modManager.setModState(metadata.id, metadata.id, ModState.INSTALLED) return } diff --git a/src/main/kotlin/xyz/deathsgun/modmanager/update/VersionFinder.kt b/src/main/kotlin/xyz/deathsgun/modmanager/update/VersionFinder.kt index 77ec63f..6d3a0d2 100644 --- a/src/main/kotlin/xyz/deathsgun/modmanager/update/VersionFinder.kt +++ b/src/main/kotlin/xyz/deathsgun/modmanager/update/VersionFinder.kt @@ -54,11 +54,7 @@ object VersionFinder { var latestVer: SemanticVersion? = null val installedVer = VersionDeserializer.deserializeSemantic(installedVersion) for (version in versions) { - val parsedVersion = try { - VersionDeserializer.deserializeSemantic(version.version) - } catch (e: VersionParsingException) { - continue - } + val parsedVersion = VersionDeserializer.deserializeSemantic(version.version) if (latestVersion == null) { latestVersion = version latestVer = parsedVersion @@ -69,7 +65,7 @@ object VersionFinder { latestVer = parsedVersion } } - if (installedVersion == latestVersion?.version || installedVer >= latestVer) { + if (installedVersion == latestVersion?.version || (latestVer != null && installedVer >= latestVer)) { return null } return latestVersion diff --git a/src/test/kotlin/xyz/deathsgun/modmanager/dummy/DummyModrinthProvider.kt b/src/test/kotlin/xyz/deathsgun/modmanager/dummy/DummyModrinthProvider.kt index 9ba9315..cf192e0 100644 --- a/src/test/kotlin/xyz/deathsgun/modmanager/dummy/DummyModrinthProvider.kt +++ b/src/test/kotlin/xyz/deathsgun/modmanager/dummy/DummyModrinthProvider.kt @@ -31,6 +31,10 @@ import java.io.InputStreamReader import java.time.Instant import java.time.ZoneOffset +/** + * Dummy which provided the version data + * for [xyz.deathsgun.modmanager.update.VersionFinderTest] + */ internal class DummyModrinthVersionProvider : IModUpdateProvider { private val json = Json { @@ -41,6 +45,10 @@ internal class DummyModrinthVersionProvider : IModUpdateProvider { return "Modrinth" } + /** + * Reads the provided id from /version/id.json + * @param id the mod slug from Modrinth + */ @OptIn(ExperimentalSerializationApi::class) override fun getVersionsForMod(id: String): VersionResult { return try { diff --git a/src/test/kotlin/xyz/deathsgun/modmanager/update/VersionFinderTest.kt b/src/test/kotlin/xyz/deathsgun/modmanager/update/VersionFinderTest.kt index d29a2e2..f9ad23e 100644 --- a/src/test/kotlin/xyz/deathsgun/modmanager/update/VersionFinderTest.kt +++ b/src/test/kotlin/xyz/deathsgun/modmanager/update/VersionFinderTest.kt @@ -17,7 +17,6 @@ package xyz.deathsgun.modmanager.update import net.fabricmc.loader.api.VersionParsingException -import org.apache.logging.log4j.LogManager import org.junit.jupiter.api.DynamicTest.dynamicTest import org.junit.jupiter.api.TestFactory import org.junit.jupiter.api.fail @@ -30,11 +29,17 @@ import kotlin.test.assertNotNull import kotlin.test.assertNull import kotlin.test.assertTrue +/** + * Tests the [VersionFinder] implementation + */ internal class VersionFinderTest { - private val logger = LogManager.getLogger() private val provider: IModUpdateProvider = DummyModrinthVersionProvider() + /** + * Tests the fallback for versions which are not following + * the SemVer scheme. These mods are resolved by their release date. + */ @TestFactory fun findUpdateByFallback() = listOf( Scenario( @@ -76,21 +81,45 @@ internal class VersionFinderTest { } } + /** + * Tests some version scenarios in which the [VersionFinder] + * should definitely return null. + */ @TestFactory fun findUpdateByVersionError() = listOf( + /** + * This scenario will fail because mc1.17.1-0.7.1 + * can not be parsed by the parser as it starts with mc. + */ Scenario( "lithium", - "mc1.17.1-0.7.4", + "none", "mc1.17.1-0.7.1", Config.UpdateChannel.STABLE, "1.17" ), + /** + * This scenario will fail because fabric-5.3.3-BETA+6027c282 + * can not be parsed by the parser as it starts with fabric. + */ Scenario( "terra", - "5.4.1-BETA+40e95073", + "none", "fabric-5.3.3-BETA+6027c282", Config.UpdateChannel.ALL, "1.17" + ), + /** + * No update for this scenario should be found. + * When an update should be found this would be an + * error as 2.0.13 is the latest + */ + Scenario( + "modmenu", + "none", + "2.0.13", + Config.UpdateChannel.STABLE, + "1.17" ) ).map { scenario -> dynamicTest("${scenario.mod} ${scenario.expectedVersion} ${scenario.channel}") { @@ -112,6 +141,9 @@ internal class VersionFinderTest { } } + /** + * This tests all mods which are following the semantic version scheme. + */ @TestFactory fun findUpdateByVersion() = listOf( Scenario( @@ -121,13 +153,6 @@ internal class VersionFinderTest { Config.UpdateChannel.ALL, "1.17" ), - Scenario( - "terra", - "5.4.1-BETA+40e95073", - "5.3.3-BETA+6027c282", // actually fabric-5.3.3-BETA+6027c282 - Config.UpdateChannel.ALL, - "1.17" - ), Scenario( "modmenu", "2.0.13",