Better Server Packs (Fabric)
Better Server Packs is a server-side mod that replaces the old server-resourcepack logic to allow changing and updating the server resourcepack while the server is running.
What is wrong with Server Resourcepacks?
The issue Server Resourcepacks face currently is that all config about them (including the hash) is stored in the server.properties file. Although hashes are technically optional for servers, not using one will cause all sorts of weirdness when updating the resourcepack resulting in packs not updating on the client.
Using a hash on the other hand, requires a server restart for every update of the resourcepack and hashes are also a pain to compute. (Often tools will generate incorrect hashes for a file.)
How does BSP solve this?
BSP adds the new /pack command to your server that allows operators
to update the server resourcepack or push an update out to every user.
Commands
/pack set [<url>] [push]- This command updates the server resourcepack's URL
and hash.
The URL will need to be in a quoted-string.
If you add the optional
pushargument, all online players will receive a resourcepack update.
- This command updates the server resourcepack's URL
and hash.
The URL will need to be in a quoted-string.
If you add the optional
/pack reload [push]- This command forcibly reloads the resourcepack hash such as when you have updated the resourcepack on your server.
/pack push [<players>]- Forcibly pushes a resourcepack update to the selected players, or all if the player argument is unspecified.
/pack required [true|false]- Sets if the resourcepack is required* to join the server
(simply calling
/pack requiredwill show the current value of the option.
- Sets if the resourcepack is required* to join the server
(simply calling
/pack prompt [<prompt>|clear]- Set the prompt shown to the player when joining the server or remove it. Calling this with no parameters will show the current prompt.
/pack info- Shows the current server resourcepack settings (managed by BSP).
* Setting required to true cannot guarantee that players actually use the resourcepack. Modified clients can circumvent this option
This project is a rewrite of BetterServerPacks for 1.21 Fabric servers.
I would also like to thank Max Henkel for developing the awesome config-builder library and allowing me to use it. There really aren't enough libraries for server-side configuration for Minecraft mods.
How to Install Better Server Packs (Fabric) (Mod)
Better Server Packs (Fabric) by Fisch37 is verified for Fabric across Minecraft versions 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5 (latest release: 1.2.2+26.3, file size: 78 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5) and platform (Fabric).
- Make sure you have the compatible loader or environment installed for Fabric.
- Move the downloaded Better Server Packs (Fabric) file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add Version# 1.2.1
The new release is finally here! (After I remembered I needed to do it)
This release comes with two small features and some backend changes.
## Changelist
- The
rehash_on_startoption now no longer resets on every server launch. ([#9](https://github.com/Fisch37/better-server-packs-fabric/issues/9)) - If, for some reason, you relied on this behaviour, you can imitate it by deleting the
pack.sha1file. - Added the
If-Modified-Sinceheader to all pack requests. As long as your resource supports it, this means hashes will only be recalculated when necessary, reducing server overhead. - Also added the
last_hash_updateconfig option, which stores the timestamp of the last sent request. - Note that
/pack setwill always recalculate the hash. - Improved logging during hash recalculations (This includes on-start hashing as well as
pack reload)
## Developer Notes
Addition of the
If-Modified-Since header reduces the overhead of periodic rehashing greatly (by not actually doing the work when it isn't necessary). I intend to add a rehash_period config option in the future (likely with an accompanying command), but since I can't say how much time I will have available, I can't promise a release date on that feature. Originally rehash_period was supposed to be another feature added in this release, but implementation has proven more complex than expected and I did not wish to delay this release any further.Anyway, I'm sorry this release took so long to get out. Enjoy updating your hashes!
This release comes with two small features and some backend changes.
## Changelist
- The
rehash_on_startoption now no longer resets on every server launch. ([#9](https://github.com/Fisch37/better-server-packs-fabric/issues/9)) - If, for some reason, you relied on this behaviour, you can imitate it by deleting the
pack.sha1file. - Added the
If-Modified-Sinceheader to all pack requests. As long as your resource supports it, this means hashes will only be recalculated when necessary, reducing server overhead. - Also added the
last_hash_updateconfig option, which stores the timestamp of the last sent request. - Note that
/pack setwill always recalculate the hash. - Improved logging during hash recalculations (This includes on-start hashing as well as
pack reload)
## Developer Notes
Addition of the
If-Modified-Since header reduces the overhead of periodic rehashing greatly (by not actually doing the work when it isn't necessary). I intend to add a rehash_period config option in the future (likely with an accompanying command), but since I can't say how much time I will have available, I can't promise a release date on that feature. Originally rehash_period was supposed to be another feature added in this release, but implementation has proven more complex than expected and I did not wish to delay this release any further.Anyway, I'm sorry this release took so long to get out. Enjoy updating your hashes!
_Note: Since this version was created before 1.21.10, any later version could crash using this version._
[See the previous version for patch notes](https://modrinth.com/mod/better-server-packs-fabric/version/1.2.0)
# 1.2.0: 1.21.6 port and support for new text components
This release establishes full compatibility with Minecraft 1.21.6 and adds support for SNBT in the prompt configuration.
## SNBT Prompts
Prompts are now specified as SNBT text components to keep compatibility with online generators.
A config like
prompt={"text":"Hello World!","color":"red"} can now be written as prompt={text:"Hello World!", color: "red"}. Groundbreaking stuff. This won't cause any compatibility issues with your existing prompts as SNBT is completely compatible with JSON since 1.21.5.## In other news
Work is proceeding on a clientside GUI to allow editing of all of BSP's config without any use of commands. Since I'm spread rather thin with uni, medical issues, and my other projects, I can't promise any sort of timeline, but if you would like to keep up with progress, you can follow the [client-gui branch of the repository](https://github.com/Fisch37/better-server-packs-fabric/tree/client-gui). PRs are always welcome, of course. Bye!
This release establishes full compatibility with Minecraft 1.21.6 and adds support for SNBT in the prompt configuration.
## SNBT Prompts
Prompts are now specified as SNBT text components to keep compatibility with online generators.
A config like
prompt={"text":"Hello World!","color":"red"} can now be written as prompt={text:"Hello World!", color: "red"}. Groundbreaking stuff. This won't cause any compatibility issues with your existing prompts as SNBT is completely compatible with JSON since 1.21.5.## In other news
Work is proceeding on a clientside GUI to allow editing of all of BSP's config without any use of commands. Since I'm spread rather thin with uni, medical issues, and my other projects, I can't promise any sort of timeline, but if you would like to keep up with progress, you can follow the [client-gui branch of the repository](https://github.com/Fisch37/better-server-packs-fabric/tree/client-gui). PRs are always welcome, of course. Bye!
# 1.1.0: New Features and Performance Improvements!
Been a long time since the last release which I think is great! It means the project didn't have any noticeable bugs!
Buut, it turns out there were a couple missing features which are coming to you _right now!_
## New Features
It is now possible to require players to use the serverside resourcepack when joining the server. This is thanks to a gracious contribution from [@fewwan](https://github.com/fewwan)! Using the new
/pack required [true|false] command you can set this configuration value or just running /pack required will show you the current state. Naturally, there is also a new option required in the config to accompany this feature. ([#1](https://github.com/Fisch37/better-server-packs-fabric/pull/1))You can also now set a short informational text that will be shown to players when prompted to install the resourcepack. This prompt can be set using
/pack prompt [<prompt>] or removed using /pack prompt clear. /pack prompt will also show you the current prompt text. (This was once again suggested by [@fewwan](https://github.com/fewwan))Prompts can be any JSON text (same as
/tellraw) but does not support selectors, scores, or NBT. I recommend checking out the [minecraft.tools generator](https://minecraft.tools/tellraw.php) to see what's possible.
The new
/pack info command allows you to see the current configuration of Better Server Packs at a glance! It shows you the pack URL, its hash, whether it's required and your custom prompt (if set). If you haven't set a resourcepack, the command will show you that as well.## Tweaks and Fixes
- All
/packcommands now only require permission level 3 instead of 4. This should not affect most players but may be significant if you have a more complicated rank-system for your moderators and don't use mods like LuckPerms /pack set(disabling BSP) now correctly saves to the config. Oops- Reloading pack hashes now runs in a seperate thread. This means that the server will no longer hang during
/pack reloador/pack setcausing huuuge lag spikes with large resourcepacks or slow connections.
- Full Changelog**: https://github.com/Fisch37/better-server-packs-fabric/commits/v1.1.0
Been a long time since the last release which I think is great! It means the project didn't have any noticeable bugs!
Buut, it turns out there were a couple missing features which are coming to you _right now!_
## New Features
It is now possible to require players to use the serverside resourcepack when joining the server. This is thanks to a gracious contribution from [@fewwan](https://github.com/fewwan)! Using the new
/pack required [true|false] command you can set this configuration value or just running /pack required will show you the current state. Naturally, there is also a new option required in the config to accompany this feature. ([#1](https://github.com/Fisch37/better-server-packs-fabric/pull/1))You can also now set a short informational text that will be shown to players when prompted to install the resourcepack. This prompt can be set using
/pack prompt [<prompt>] or removed using /pack prompt clear. /pack prompt will also show you the current prompt text. (This was once again suggested by [@fewwan](https://github.com/fewwan))Prompts can be any JSON text (same as
/tellraw) but does not support selectors, scores, or NBT. I recommend checking out the [minecraft.tools generator](https://minecraft.tools/tellraw.php) to see what's possible.
The new
/pack info command allows you to see the current configuration of Better Server Packs at a glance! It shows you the pack URL, its hash, whether it's required and your custom prompt (if set). If you haven't set a resourcepack, the command will show you that as well.## Tweaks and Fixes
- All
/packcommands now only require permission level 3 instead of 4. This should not affect most players but may be significant if you have a more complicated rank-system for your moderators and don't use mods like LuckPerms /pack set(disabling BSP) now correctly saves to the config. Oops- Reloading pack hashes now runs in a seperate thread. This means that the server will no longer hang during
/pack reloador/pack setcausing huuuge lag spikes with large resourcepacks or slow connections.
- Full Changelog**: https://github.com/Fisch37/better-server-packs-fabric/commits/v1.1.0