Skip to content

Commit

Permalink
Quick hack to not hash check FOrge installers
Browse files Browse the repository at this point in the history
  • Loading branch information
peterix committed Nov 23, 2022
1 parent c531be0 commit 671da24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions enumerateForge.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class MojangLibrary (JsonObject):
class MultiMCLibrary (MojangLibrary):
url = StringProperty(exclude_if_none=True, default=None)
mmcHint = StringProperty(name="MMC-hint", exclude_if_none=True, default=None)
mmcAbsoluteURL = StringProperty(name="MMC-absoluteUrl", exclude_if_none=True, default=None)


def GetLibraryDownload (library : MultiMCLibrary):
Expand Down
9 changes: 5 additions & 4 deletions generateForge.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,11 @@ def versionFromBuildSystemInstaller(installerVersion : MojangVersionFile, instal
installerInfo = InstallerInfo(json.load(f))
InstallerLib = MultiMCLibrary(name=GradleSpecifier("net.minecraftforge:forge:%s:installer" % (version.longVersion)))
InstallerLib.downloads = MojangLibraryDownloads()
InstallerLib.downloads.artifact = MojangArtifact()
InstallerLib.downloads.artifact.url = "https://files.minecraftforge.net/maven/%s" % (InstallerLib.name.getPath())
InstallerLib.downloads.artifact.sha1 = installerInfo.sha1hash
InstallerLib.downloads.artifact.size = installerInfo.size
InstallerLib.mmcAbsoluteURL = "https://files.minecraftforge.net/maven/%s" % (InstallerLib.name.getPath())
# InstallerLib.downloads.artifact = MojangArtifact()
# InstallerLib.downloads.artifact.url = "https://files.minecraftforge.net/maven/%s" % (InstallerLib.name.getPath())
# InstallerLib.downloads.artifact.sha1 = installerInfo.sha1hash
# InstallerLib.downloads.artifact.size = installerInfo.size
mavenLibs.append(InstallerLib)

for upstreamLib in installerProfile.libraries:
Expand Down
1 change: 1 addition & 0 deletions metautil.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def validateSupportedMultiMCVersion(version):
class MultiMCLibrary (MojangLibrary):
url = StringProperty(exclude_if_none=True, default=None)
mmcHint = StringProperty(name="MMC-hint", exclude_if_none=True, default=None)
mmcAbsoluteURL = StringProperty(name="MMC-absoluteUrl", exclude_if_none=True, default=None)

class VersionedJsonObject(JsonObject):
formatVersion = IntegerProperty(default=CurrentMultiMCFormatVersion, validators=validateSupportedMultiMCVersion)
Expand Down

0 comments on commit 671da24

Please sign in to comment.