Fix fabric not respecting unstable versions.

This commit is contained in:
modmuss50 2021-10-06 20:17:53 +01:00
parent 1d2777c0a4
commit 6f742903d0
2 changed files with 2 additions and 10 deletions

View File

@ -1,11 +1,6 @@
from metautil import *
import jsonobject
# barebones semver-like parser
def isFabricVerStable(ver):
s = ver.split("+")
return ("-" not in s[0])
class FabricInstallerArguments(JsonObject):
client = ListProperty(StringProperty)
common = ListProperty(StringProperty)

View File

@ -23,7 +23,7 @@ def loadJarInfo(mavenKey):
return FabricJarInfo(json.load(jarInfoFile))
def processLoaderVersion(loaderVersion, it, loaderData):
verStable = isFabricVerStable(loaderVersion)
verStable = it["stable"]
if (len(loaderRecommended) < 1) and verStable:
loaderRecommended.append(loaderVersion)
versionJarInfo = loadJarInfo(it["maven"])
@ -31,10 +31,7 @@ def processLoaderVersion(loaderVersion, it, loaderData):
version.releaseTime = versionJarInfo.releaseTime
version.requires = [DependencyEntry(uid='net.fabricmc.intermediary')]
version.order = 10
if verStable:
version.type = "release"
else:
version.type = "snapshot"
version.type = "release"
if isinstance(loaderData.mainClass, dict):
version.mainClass = loaderData.mainClass["client"]
else: