Pierce01 / MinecraftLauncher-core

Lightweight module that downloads and runs Minecraft using javascript / NodeJS
MIT License
356 stars 81 forks source link

Fix no artifact property when downloading a library #111

Closed HerozDotExe closed 1 year ago

HerozDotExe commented 1 year ago

This should make it possible to launch custom clients with version.json files specifying libraries without downloading, as shown here:

{
  "id": "1.19.2-OptiFine_HD_U_H9",
  "inheritsFrom": "1.19.2",
  "time": "2022-11-02T20:19:20+01:00",
  "releaseTime": "2022-11-02T20:19:20+01:00",
  "type": "release",
  "libraries": [
    {
      "name": "optifine:OptiFine:1.19.2_HD_U_H9"
    },
    {
      "name": "optifine:launchwrapper-of:2.3"
    }
  ],
  "mainClass": "net.minecraft.launchwrapper.Launch",
  "arguments": {
    "game": [
      "--tweakClass",
      "optifine.OptiFineTweaker"
    ]
  }
}

and correct this error : [MCLC]: Failed to start due to TypeError: Cannot read properties of undefined (reading 'artifact'), closing...