Apply jank++ to neoforge

When the versions are like 21.0.99, guess Minecraft version to be 1.21 instead of 1.21.0
This commit is contained in:
Petr Mrazek 2024-06-16 02:10:31 +02:00
parent 12e637f16f
commit 3fd01d201b

View file

@ -131,7 +131,10 @@ for longversion in main_json:
package = "neoforge"
branch = match.group("branch")
build = int(match.group("build"))
mcversion = '1.%s.%s' % (match.group('mcminor'), match.group('mcpatch'))
if match.group('mcpatch') == '0':
mcversion = '1.%s' % (match.group('mcminor'))
else:
mcversion = '1.%s.%s' % (match.group('mcminor'), match.group('mcpatch'))
ver = match.group("build")
try: