DynRes uses an integrated web server to serve a resource pack directly from the server directory. It also modifies the server to specify that pack as the default (overwrites resource-pack and resource-pack-sha1 in server.properties). You can configure the port for the web server, the file to host and whether to provide a hash in the config.
To use this mod on your server you need to place your resource pack in the configured place (default: server/resources.zip) and change baseLink in the config to your public address (what players will enter)
This mod is only required on your server. If added to a client the only thing it will do is log some information about server connections
Configuration
A user recently contacted me about how they can configure the mod to work with their server. Below is my (slightly modified) response to them, added here in the hope that it may help others as well.The resource pack hosting functionality of DynRes is actually provided by a common library, namely libjf-web-v1. As such, the configuration for the actual hosting needs to be done there.
It should also be noted that, if you want to host the pack using the same port that Minecraft uses, libjf-web-v1 delegates to libjf-mainhttp-v0 for the receiving logic.
The unfortunate consequence of this is that the config is spread out across two files and, since libjf-web is more general purpose, its configuration provides additional features not relevant to dynres.
I will try to explain a setup that works here, but please do ask if you have any further questions or requests.
First, resourcesFile in DynRes should be the relative path of the resource pack that should be served. The option hashResources provides clients with a checksum they can use to cache packs, so it should improve performance. However, due to Minecraft's implementation, this can only be set once, so it prevents you from changing the pack while the server is running. As you mentioned that you wish to do so, I'd recommend you disable this option.
Assuming you want to host the pack on the same port as the game (this is the easiest to set up so it is what I would recommend. Note that it shouldn't impact performance as the HTTP handler is removed as soon as it detects a non-HTTP connection), set the port and portOverride options in the libjf-web config to -1.
Then, set the serverIp option to the address (not necessarily an IP) users will use to connect to your Minecraft server. Note that you shouldn't need to append the port to this address, as the mod will do so automatically.
If the port that is appended is wrong (this shouldn't ever happen. Note that 25565 is equivalent to entering no port in Minecraft), you can adjust it using portOverride.
When the server is starting up, the log should include a message that looks like this: "Initialized DynRes at http://127.0.0.1:25565/resources.zip" where instead of 127.0.0.1 you have your address.
Try navigating to this in your browser and watch the game log as you do so. If the file is downloaded, everything should be set up correctly.
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+