Skip to content

Commit

Permalink
Fix fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
The Judge committed Nov 12, 2024
1 parent 1219887 commit a9cbed2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/pojlib/install/FabricMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@ public static class FabricVersion {
public String version;
@SerializedName("stable")
public boolean stable;
@SerializedName("separator")
public String separator;
}

public static FabricVersion[] getVersions() {
return handler.get("versions/loader", FabricVersion[].class);
}

private static Version getVersionFromFabric(FabricVersion fabric) {
if(fabric.separator.contains("+")) {
// Only used pre-0.11, no use for us
return null;
}

String[] verName = fabric.version.split("\\.");
if(verName.length < 3) {
return null;
Expand All @@ -44,7 +51,7 @@ public static FabricVersion getLatestVersion() {
Version latestVer = getVersionFromFabric(latest);

if(newVer == null || latestVer == null)
return null;
continue;

if(latestVer.major < newVer.major) {
latest = version;
Expand Down

0 comments on commit a9cbed2

Please sign in to comment.