From 74c97537b61bc224693ad31c8fc4fa3561b51704 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Mon, 29 Jun 2020 12:33:55 -0400 Subject: [PATCH] 1.1.7 --- CHANGELOG.md | 3 +++ gradle.properties | 2 +- .../modupdater/strategy/JSONStrategy.java | 19 ++++--------------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09905c8..d0101f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +**1.1.7** +* Disable SemVer In JSON Strategy + **1.1.6** * Drop Dom4j Dependency diff --git a/gradle.properties b/gradle.properties index 71ab0bd..0c21a9e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ org.gradle.jvmargs = -Xmx1G fabric_loader_version = 0.8.8+build.202 # Mod Properties - mod_version = 1.1.6 + mod_version = 1.1.7 maven_group = com.thebrokenrail # Dependencies diff --git a/src/main/java/com/thebrokenrail/modupdater/strategy/JSONStrategy.java b/src/main/java/com/thebrokenrail/modupdater/strategy/JSONStrategy.java index 6cc05cc..2279964 100644 --- a/src/main/java/com/thebrokenrail/modupdater/strategy/JSONStrategy.java +++ b/src/main/java/com/thebrokenrail/modupdater/strategy/JSONStrategy.java @@ -9,8 +9,6 @@ import com.thebrokenrail.modupdater.api.ConfigObject; import com.thebrokenrail.modupdater.api.UpdateStrategy; import com.thebrokenrail.modupdater.data.ModUpdate; import com.thebrokenrail.modupdater.util.Util; -import net.fabricmc.loader.api.SemanticVersion; -import net.fabricmc.loader.util.version.VersionParsingException; import javax.annotation.Nullable; import java.io.IOException; @@ -66,19 +64,10 @@ public class JSONStrategy implements UpdateStrategy { String version = Util.getMinecraftVersion().getName(); if (map.containsKey(version)) { LatestVersionEntry entry = map.get(version); - ModUpdate update = new ModUpdate(oldVersion, entry.version, entry.downloadUrl, name); - try { - if (SemanticVersion.parse(entry.version).compareTo(SemanticVersion.parse(oldVersion)) > 0) { - return update; - } else { - return null; - } - } catch (VersionParsingException e) { - if (!oldVersion.equals(entry.version)) { - return update; - } else { - return null; - } + if (!oldVersion.equals(entry.version)) { + return new ModUpdate(oldVersion, entry.version, entry.downloadUrl, name); + } else { + return null; } } else { return null;