Paper
Paper copied to clipboard
Configurable compression format
Adds a configuration option to save region files without any compression, this is useful for any servers which wish to use compression at the file system level.
Minecraft already has the ability to save and load region files without compression, however the ability to save isn't used, and this adds a config option to enable that. As Minecraft supports regions saved this way, the worlds saved using this option remain compatible with an unmodified client / server.
Just as a general thought, wouldn't it be a bit more future proof to have this more of an enum value, rather than a boolean ?
E.g. right now this option lets you switch between deflate and none, however potentially the server offers different IO wrappers in the future here. Instead of a boolean, this could simply default to "deflate", with the possible alternative format of "plain" or something along those lines.
Minecraft already has support for 3 compression formats (gzip, zlib (default), and none), although I don't see why anyone would want to use gzip over zlib or none, but I suppose if we're adding a option for default or none, we may as well just use an enum and allow all 3, so I'll do that. Although I don't think this enum should be used by Paper to add alternative formats in the future as formats added by Paper would be incompatible with Vanilla.
As formats added by Paper would be incompatible with Vanilla.
I know that this is something that is technically possible with some folder moving, but moving worlds from Paper to vanilla is something that I hope people can understand may cause issues.
If enough of a warning notice is placed on it when the user selects it, I have no problem with this.
There is potential for a converter tool to be developed to change it back anyways, so I +1 an enum for (the possibility of) new formats as ultimately Paper is here to improve the server experience.
Updated to rebase on master (apparently I forgot to do that before), as well as use a supplier like @Machine-Maker suggested, as well as changing it to use an enum.
This has been rebased onto master now, any chance this could be merged soon?
This was discussed somewhere, but I think that this config option should be moved to the unsupported category. It's not officially supported by mojang and I am not sure this is something we should officially support too.
This was discussed somewhere, but I think that this config option should be moved to the unsupported category. It's not officially supported by mojang and I am not sure this is something we should officially support too.
That makes sense, I've gone ahead and done that
Rebased
the rebase required label can removed btw