Repository navigation
Move config to lazy_lock and into own crate - #68
Merged
Merged
Conversation
Make it consistent with `proxy` and `resource_pack`
De-duplicates code from both BasicConfiguration and AdvancedConfiguration. Allow config to fail writing. (On e.g. immutable linux distros)
- PVPConfiguration - RCONConfiguration - CompressionConfiguration - CommandsConfiguration
Member
|
thank you @DaniD3v |
composalagent Bot
pushed a commit
to vex-demo-1/Pumpkin
that referenced
this pull request
Sep 26, 2026
Move config to lazy_lock and into own crate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please take a look at the LazyLock docs docs first, because they're a relatively new feature and a few people in the discord confused it with something else.
TL;DR it's basically
lazy_staticbut in std.Moving the config to LazyLock has a few advantages:
Just write
BASIC_CONFIG.<config option>and you're good.LazyLockonce the config is initializedDownsides:
pumpkin-coreif we want to access it from the config and whatever crate we're modifying.This was one of the main points why people were
LazyLock,however I don't think that's a problem for this specific case of storing the config because
considering the servers startup time and emphasis on performance
This PR would make it significantly easier for me to write the superflat WorldGen config.
That's because I'd have to pass the config through ~4 methods to get it to the constructor of the worldgen +
I'd need to change the
GeneratorInittrait to take a seed and the config.All of the commits compile individually and were checked with