File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/me/itzg/helpers/forge Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1414import me .itzg .helpers .http .SharedFetch ;
1515import me .itzg .helpers .mvn .MavenMetadata ;
1616import me .itzg .helpers .mvn .MavenRepoApi ;
17+ import org .apache .maven .artifact .versioning .ComparableVersion ;
1718import org .jetbrains .annotations .NotNull ;
1819import org .jetbrains .annotations .Nullable ;
1920
@@ -126,7 +127,10 @@ else if (requestedNeoForgeVersion == null || requestedNeoForgeVersion.equalsIgno
126127 }
127128 }
128129 })
129- .reduce ((s , s2 ) -> s2 )
130+ // pick the highest version from a or b
131+ .reduce ((a , b ) ->
132+ new ComparableVersion (a ).compareTo (new ComparableVersion (b )) > 0 ? a : b
133+ )
130134 .orElse (null );
131135
132136 return result != null ? new VersionPair (deriveMinecraftVersion (result ), result ) : null ;
You can’t perform that action at this time.
0 commit comments