ModManagerMC / ModManager

A ModManager extension for ModMenu
Apache License 2.0
79 stars 11 forks source link

[BUG] Downloading just doesn't work every time. #61

Closed DeJayDev closed 2 years ago

DeJayDev commented 2 years ago

Describe the bug Some mods (in my experience, ModMenu and LibZoomer) cannot be updated with this tool. I've successfully updated MouseWheelie so I know it's not completely busted.

To Reproduce Steps to reproduce the behavior:

  1. While running an outdated ModMenu (I am on modmenu-2.0.5.jar)
  2. Running open ModMenu
  3. Click on the update icon
  4. Attempt to update ModMenu
  5. See error

Expected behavior The mod updates silently and the menu is closed.

Please complete the following information:

Logs

Error while executing task for modmenu
java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "xyz.deathsgun.modmanager.model.ReducedModMetadata.getName()" is null
    at xyz.deathsgun.modmanager.util.FabricMods.getJarFromModContainer(FabricMods.java:57) ~[modmanager-1.0.2+1.17-alpha.jar:?]
    at xyz.deathsgun.modmanager.tasks.ModUpdateTask.execute(ModUpdateTask.java:38) ~[modmanager-1.0.2+1.17-alpha.jar:?]
    at xyz.deathsgun.modmanager.api.manipulation.ManipulationTask.executeTask(ManipulationTask.java:47) [modmanager-1.0.2+1.17-alpha.jar:?]
    at xyz.deathsgun.modmanager.services.ManipulationService.run(ManipulationService.java:49) [modmanager-1.0.2+1.17-alpha.jar:?]
DeathsGun commented 2 years ago

v1.1.0+1.17-alpha should fix this as it's a complete rewrite of ModManager. I will provide a test version tomorrow.

DeathsGun commented 2 years ago

Here you go: modmanager-1.1.0+1.17-alpha.jar.zip

DeJayDev commented 2 years ago

Works! Thanks.