Resource Downloader
Please check out the following before proceeding:
How to get started - For server owners
[1] For server ownersYou can use this mod to make sure your players always use the intended mods & resource packs! Here's a quick guide.
First of all, download the mod for the version your server is running on, then launch Minecraft with it. Now go to Options, and then click on "Resource Downloader Settings".
You should be presented with this screen:
Now, you can cycle through categories by clicking the button at the very top (right under the "Category" text).
Put the links leading to your mods/resource packs in the "URLs" category (separate multiple URLs with a comma). Note: Only Dropbox links have been tested, however any other URL that when accessed instantly downloads the file should work. (P.S., if you use a Dropbox link make sure to change "dl=0" to "dl=1").
The link(s) can lead to either multiple files, or folders (*only Dropbox folders have been tested). However, for now please note that the GUI is missing a few options. As such, after configuring it through the GUI, please close the game, and go to your minecraft folder > config > rpdl > pack.json. Change "folder" to true or false, depending on whether the links in "urlPaths" (Resource Pack(s) URLs) are leading to a/multiple folder(s), or individual files (in which case you'd set "folder" to false). You cannot mix both.
Before distributing the config, make sure to change in the GUI settings, "Redownload RPs" and "Redownload Mods" to true. After this, you're done (unless you wanna find out about the remote config too)! Just tell people to put your config under their minecraft folder > config > rpdl > pack.json, and download this mod.
[1] [Remote Config] So you wanna use this awesome feature right? Well, here we go! When you upload a file on Dropbox for example, it gets assigned a unique URL right? So, do that. After configuring your config, upload pack.json somewhere. After uploading it, put the URL to that uploaded pack.json, in the "Remote Config URL" (in the Resource Downloader Settings GUI). Now, since this is the config you will share with others and you want to make sure their config is up-to-date, make sure to set any frequency for checking for updated (not too often!) and show notifications (the player can toggle it on/off anyway). After doing so, close the game, and replace the uploaded pack.json with the updated pack.json (if you do this on Dropbox for example, the file will be overwritten but the URL will stay the same).
So now, just tell people to download this mod & put the link to your pack.json in the "Remote Config URL" in the settings, restart their game and done!
If you ever want to update the config, change any settings you may want to change, and replace the uploaded one again, however make sure to increment the "version" value by 1, otherwise it will not be updated on the players' computers.
How to get started - For players
[2a] For players If you were told to download this mod, just download it and put the provided "pack.json" file under your minecraft folder > config > rpdl. If you were given a URL leading to a "pack.json" and were told to put it somewhere in the mod's configuration, download this mod, launch Minecraft, go to "Options" > "Resource Downloader Settings", click on the button under the "Category" text until you are on the "Remote Config" category, then put the given URL in the "Remote Config URL" field, and restart your game!After restarting, if mods were downloaded, you may have to restart the game again!
After restarting again, feel free to go back to the Options to enable/disable notifications, and to set an interval on how often to check for remote config updates.
[2b] For players - that are not here to join a server You can use this mod to easily download mods from various links too, or RPs, in which case you may not need to use the remote config. In this case, feel free to follow any of the guidance intended for server owners/advanced users.
For advanced users
If you do not want to use the GUI, you can use this guide!Under your “config” folder, under “rpdl”, you’ll see two files, open pack.json.
Inside pack.json, you’ll see "urlPaths" (for your URLs), "folder" (whether your URLs lead to a folder or not), “frequency”, and "hashcheck".
For example:
pack.json
{
"urlPaths": ["https://modrinth.com/", "https://modrinth.com/mod/resource-downloader/"],
"redownloadrp": false,
"enableResourcePacks": false,
"folder": true,
"frequency":60,
"hashcheck": false,
"modURLs": ["https://modrinth.com/mod/resource-downloader/"],
"redownloadmods": false,
"remoteconf":[" "],
"version": 1
}
Please note that only Dropbox files & folders, and Google Drive files were tested. Make sure the links you put in are public.
Any other URL that, when accessed, directly downloads a file/folder, can be used. URLs which contain the file's filename in the URL are preferred for now.
Now, the “frequency” is how often you’d like the mod to re-download the resource packs in pack.json. The default value is “60”, meaning 60 minutes.
An example of how the frequency works is, let’s say you put 60 minutes. When you first launch the game, the resource packs would be downloaded nonetheless, then, after 60 minutes if you launch the game again, it will download the resource packs again.
"hashcheck", if true, will dismiss the values of "folder" & "frequency", and will assume the link leads to a Dropbox folder/any .zip file which would be a resource pack. Every time Minecraft is launched, it downloads the resource pack and checks if anything has changed by comparing their hashes.
"modURLs" should contain one or more URLs leading to either a .zip file containing multiple mods, or multiple links leading to mods (.jar files).
"redownloadmods" is false by default. It determines whether mods should be downloaded the next time the game is launched. If true, on the next launch, it will redownload all of the mods from "modURLs", and will set itself to false again afterwards.
A wiki will be made soon to document other features.
A few things to note
[1] When Minecraft is launched, it starts downloading the resource pack(s)/mods, and so Minecraft will halt until all of the resource pack(s)/mods are downloaded and placed properly onto your resourcepacks & mods folders.After Minecraft launches, you should see all of the resource packs in there, so just apply them and you’re done! As for the mods, please restart the game as they will only be loaded on the second launch.
[2] I am not responsible if this mod is misused. It can be used in modpacks ONLY if you specify this mod is used, even though it has some player safety features built-in.