This commit is contained in:
parent
fedd2fe2d8
commit
74c97537b6
@ -1,5 +1,8 @@
|
||||
# Changelog
|
||||
|
||||
**1.1.7**
|
||||
* Disable SemVer In JSON Strategy
|
||||
|
||||
**1.1.6**
|
||||
* Drop Dom4j Dependency
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user