newo-2001 / MC-Modpack-Downloader

Script to download Minecraft modpacks without the need for the FTB app or Overwolf
MIT License
22 stars 4 forks source link

Provide a method to download mods, texturepacks/datapacks, shaders in different folders #21

Open BizarreBen opened 4 days ago

BizarreBen commented 4 days ago

Now everything gets downloaded into a mods folder. It would be handy to have files that don't belong in the same folder be downloaded in different folders, respectively:

A possible solution without making multiple calls for each file could be checking the contents of the "modules" section in the "/v1/mods/{modId}/files/{fileId}" enpoint result. My educated guess would be:

newo-2001 commented 3 days ago

The main thing that bothers me is that for FTB packs all the resources are downloaded (including resource packs, etc.) This is not, however, the case for CurseForge, which as far as I know includes all of these in the .zip file containing the manifest.json.

For this to work, a unified output structure would have to be defined. I am leaning towards outputting the files for CurseForge to a mods folder in a configurable output directory. This would enable one to simply merge the output directory with the profile directory.

As for how to differentiate the different types of resources, I would have to do some testing on different packs to see if I can find any inconsistencies but the approach you suggested is a good starting point.

I'll see what I can do about this sometime.