diff --git a/gradle/forge.gradle b/gradle/forge.gradle index b51972ec1..a8529927b 100644 --- a/gradle/forge.gradle +++ b/gradle/forge.gradle @@ -17,7 +17,7 @@ minecraft { processResources { from(sourceSets.main.resources.srcDirs) { - include 'mcmod/info' + include 'mcmod.info' expand 'version': project.simpleVersion, 'mcversion': config.minecraft.version } from(sourceSets.main.resources.srcDirs) { diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index d9fd14e04..06b44288b 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,28 +1,25 @@ -{ - "modinfoversion": 2, - "modlist": [{ - "modid": "OpenComputers", - "name": "OpenComputers", - "description": "This mod adds modular computers and robots that can be programmed in Lua.", - "version": "1.2.2", - "mcversion": "1.6.4", - "url": "https://github.com/MightyPirates/OpenComputers/wiki", - "authors": ["Florian 'Sangar' Nücke", "Johannes 'Lord Joda' Lohrer", "Everyone who contributed to the mod on Github - thank you!"], - "credits" : "Inspired by a couple of other mods, most notably ComputerCraft.", - "logoFile" : "assets/opencomputers/textures/gui/logo.png", - "requiredMods": [ "Forge@[9.11.1.940,)" ], - "dependencies": [ - "BuildCraft|Energy", - "ComputerCraft", - "ForgeMultipart", - "IC2", - "MineFactoryReloaded", - "ProjRed|Transmission", - "RedLogic", - "StargateTech2", - "ThermalExpansion", - "UniversalElectricity" - ], - "useDependencyInformation": "true" - }] -} \ No newline at end of file +[{ + "modid": "OpenComputers", + "name": "OpenComputers", + "description": "This mod adds modular computers and robots that can be programmed in Lua.", + "version": "${version}", + "mcversion": "${mcversion}", + "url": "https://github.com/MightyPirates/OpenComputers/wiki", + "authors": ["Florian 'Sangar' Nücke", "Johannes 'Lord Joda' Lohrer", "Everyone who contributed to the mod on Github - thank you!"], + "credits" : "Inspired by a couple of other mods, most notably ComputerCraft.", + "logoFile" : "assets/opencomputers/textures/gui/logo.png", + "requiredMods": [ "Forge@[9.11.1.940,)" ], + "dependencies": [ + "BuildCraft|Energy", + "ComputerCraft", + "ForgeMultipart", + "IC2", + "MineFactoryReloaded", + "ProjRed|Transmission", + "RedLogic", + "StargateTech2", + "ThermalExpansion", + "UniversalElectricity" + ], + "useDependencyInformation": "true" +}] \ No newline at end of file diff --git a/src/main/scala/li/cil/oc/UpdateCheck.scala b/src/main/scala/li/cil/oc/UpdateCheck.scala index d25c7c16d..aafc9325f 100644 --- a/src/main/scala/li/cil/oc/UpdateCheck.scala +++ b/src/main/scala/li/cil/oc/UpdateCheck.scala @@ -13,7 +13,9 @@ object UpdateCheck { val releasesUrl = new URL("https://api.github.com/repos/MightyPirates/OpenComputers/releases") val version = Loader.instance.getIndexedModList.get("OpenComputers").getVersion - val majorVersion = version.split('.')(0).toInt + val majorVersion = try version.split('.')(0).toInt catch { + case _: Throwable => 0 + } // Lazy to make initialize() execute once from the first thread that tries to // read it. If other threads are spawned while it's running they will wait,