minecraft-mod-manager icon indicating copy to clipboard operation
minecraft-mod-manager copied to clipboard

install command installing the wrong files

Open ElectronicManuel opened this issue 2 years ago • 1 comments

Describe the bug

I'm trying to install sodium-extra using the minecraft-mod-manager and observed some very weird behaviour.
First, I tried installing sodium-extra into my 1.18.2 instance, but this installed the sources jar instead of the actual mod jar.
Then, for science, I tried installing the latest version of sodium-extra (1.19 at the time of writing), but it instead installed sodium.

Steps to reproduce

1.18.2

Run mmm --debug --verbose -v "1.18.2" install sodium-extra

PS C:\MyPath> mmm --debug --verbose -v "1.18.2" install sodium-extra
CurseForge has been disabled! See https://github.com/Senth/minecraft_mod_manager for more information.
DB location: .\.minecraft-mod-manager.db
sodium-extra
    🔍 Searching for mod
        🔍 Searching on Sites.modrinth
            🔍 Search string: sodium-extra
            🟢 Found with slug: sodium-extra
    ⬇ Downloading...
    🟢 Installed version ${version}

Files installed: sodium-extra-0.4.6+mc1.18.2-build.46-sources.jar.
That's the -sources.jar file, and not the actual mod.

latest (1.19)

Run mmm --debug --verbose install sodium-extra

PS C:\MyPath> mmm --debug --verbose install sodium-extra
CurseForge has been disabled! See https://github.com/Senth/minecraft_mod_manager for more information.
DB location: .\.minecraft-mod-manager.db
sodium-extra
    🔍 Searching for mod
        🔍 Searching on Sites.modrinth
            🔍 Search string: sodium
            🟢 Found with slug: sodium
    ⬇ Downloading...
    🟢 Installed version 0.4.2+build.16

Files installed: sodium-fabric-mc1.19-0.4.2+build.16.jar.
That's sodium and not sodium-extra

Expected Behavior

1.18.2

It should install the actual mod file sodium-extra-0.4.6+mc1.18.2-build.46.jar instead of the sources file sodium-extra-0.4.6+mc1.18.2-build.46-sources.jar.

latest (1.19)

It should search for, and install, sodium-extra and not sodium.

Additional Information

I checked the modrinth api to get a better grasp of what's going on.
According to https://api.modrinth.com/v2/project/sodium-extra/version there are valid 1.18.2 and 1.19 versions of the mod.
The 1.18.2 version has its source file listed first, but the actual mod has the property primary set to true.

"files": [
    {
        "hashes": {
            "sha512": "fda3fa13644f143424c8c97ae5ba24a057d6157dc7d2e79ace06f66d0c819016e71e250503cfc607a4a6f96a01801c667e082968456e4100aecbb071a296d9ae",
            "sha1": "4ce80691479badca0d8cdf08cbab20ecc8f5847e"
        },
        "url": "https://cdn.modrinth.com/data/PtjYWJkn/versions/mc1.18.2-0.4.6/sodium-extra-0.4.6%2Bmc1.18.2-build.46-sources.jar",
        "filename": "sodium-extra-0.4.6+mc1.18.2-build.46-sources.jar",
        "primary": false,
        "size": 91884
    },
    {
        "hashes": {
            "sha512": "6cdf31db8c8edaa5199a2571f78bfa7fbc58940d28c8b00758699db2add65384d2119633eff544b942eb929950c3e969a5e0bc540a9825970da0e35dd9fc255e",
            "sha1": "39e2de8e94b9dd2f61d742d660d6888be0ec2296"
        },
        "url": "https://cdn.modrinth.com/data/PtjYWJkn/versions/mc1.18.2-0.4.6/sodium-extra-0.4.6%2Bmc1.18.2-build.46.jar",
        "filename": "sodium-extra-0.4.6+mc1.18.2-build.46.jar",
        "primary": true,
        "size": 222223
    }
]

According to #40 the issue with the sources files should not happen when using curseforge. Since curseforge is currently unavailable, it would be really helpful if this could be fixed for modrinth.
I have no idea what was going on with the 1.19 install though.

System Info

  • OS: Windows 10 Education Build 19043.1826
  • Python --version: 3.10.5
  • minecraft-mod-manager --version: 1.4.0

ElectronicManuel avatar Jul 25 '22 13:07 ElectronicManuel

Hi ElectronicManuel,

Thanks a lot for the bug report. And the detail in the bug report, I think I know why this happens, probably due to your bug report. But I'm not entirely sure.

I'm a bit out of time for the moment, so I wouldn't expect any fix for this soon, unfortunately. However, someone else linked https://github.com/gorilla-devs/ferium as an alternative to mmm and it does look a lot better. If you also have Cursforge API key you can use that program.

I'm thinking of switching over to ferium as well, but will probably continue the development of mmm as a hobby project

Senth avatar Aug 02 '22 19:08 Senth