Automatically update your game resources before your game server is started. (Use the proxy server defined in mcdreforged config file if existing)
Until now only modrinth resources are supported.
- MCDReforged requirement:
>=2.14.5
In config/resources_updater/config.json, the default config is (handlers are omitted):
{
"enable": true,
"disable_after_next_time": false,
"ask": true,
"concurrent": false,
"timeout": 30.0,
"handlers": {}
}enable: the plugin will check updating when it's true.disable_after_next_time: will set the above item to false after this checking.ask: whether to ask user to enteryfor agreeing updating when mcdreforged is starting.concurrentwhether to use concurrent threads to handle all the task, it's no use currently.timeoutthe seconds with which a connection can keep. You might need to increase it if a large file is downloaded.handlersa handler type - contents mapping, the key is the following subtitle, and see below for detailed values.
Check your resources from modrinth.
{
"game_versions": null,
"hash_algorithm": "sha1",
"resources_info": {
"mods": {
"archive_dir": "mods/old",
"regex_match_pattern": "^.*\\.jar$",
"blacklist": [],
"whitelist": null,
"loaders": []
}
}
}game_versionis the list of version id of minecraft,["1.21.4", "1.21.3"]for example, use the latest version if not specified.hash_algorithmthe hash algorithm to calculate the file hashes according to modrinth api standard, requiresha1orsha512.resources_infospecify a path - rules mapping, where the key points to which path (not recursive) under the working directory to handle, yet the above example means thatserver/modswill be chosen if working_dir is set toserverin mcdreforged config.
Now explain the values in the value of resources_info
archive_dirspecify which path under the working directory to move the old files to.whitelistspecify the list of allowed filenames to update, disabled if its value is null.blacklistspecify the list of disallowed filenames to update, disabled if its value is empty.regex_match_patternspecify the regex pattern for matching the file name to update, disabled if its is null.loadersspecify the list of loaders for updating, yet any loaders might be chosen if its empty. e.g., fabric, neoforge for mods; minecraft for datapacks; paper, spigot, bukkit for plugins; iris, optifine for shaders.