Using public API for SemanticVersion
(paulevsGitch/BCLib#146)
This commit is contained in:
parent
f6d5f85ec1
commit
5ebf159965
1 changed files with 1 additions and 3 deletions
|
@ -2,7 +2,6 @@ package org.betterx.bclib.util;
|
||||||
|
|
||||||
import net.fabricmc.loader.api.*;
|
import net.fabricmc.loader.api.*;
|
||||||
import net.fabricmc.loader.api.metadata.*;
|
import net.fabricmc.loader.api.metadata.*;
|
||||||
import net.fabricmc.loader.util.version.SemanticVersionImpl;
|
|
||||||
|
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
@ -59,8 +58,7 @@ public class ModUtil {
|
||||||
.getAsJsonObject();
|
.getAsJsonObject();
|
||||||
Version ver;
|
Version ver;
|
||||||
try {
|
try {
|
||||||
ver = new SemanticVersionImpl(data.get("version")
|
ver = SemanticVersion.parse(data.get("version").getAsString());
|
||||||
.getAsString(), false);
|
|
||||||
} catch (VersionParsingException e) {
|
} catch (VersionParsingException e) {
|
||||||
BCLib.LOGGER.error("Unable to parse Version in " + sourceFile);
|
BCLib.LOGGER.error("Unable to parse Version in " + sourceFile);
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue