-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network synced registries #866
Network synced registries #866
Conversation
Biome registry is required for wolf variant registry to fully work
Reference gets resolved when calling the getter, this allows legacy version registries to be swapped before resolving the new dimension type
Theoretically required for full support of biome data serialization
Seems like I forgot to add it there
which minecraft version? |
Paper 1.21 |
What happens if a plugin decides to add a new registry entry that isn't shared by all players on a server? Would that be explicitly unsupported? |
With caching enabled, yes |
Each kind of registry has a VersionedRegistry. This VersionedRegistry now contains a SimpleRegistry as a cache. If the cache is not null, it will be used globally. This makes the usage of registries convenient for PacketEvents users as they no longer need to access them within each user instance. If the plugin is on proxy, we shall store all registries for each user. If the plugin is not on proxy, we shall only store the dimension type registry for each user and globally cache the rest.
api/src/main/java/com/github/retrooper/packetevents/manager/InternalPacketListener.java
Outdated
Show resolved
Hide resolved
...main/java/com/github/retrooper/packetevents/util/mappings/SynchronizedRegistriesHandler.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/github/retrooper/packetevents/util/mappings/VersionedRegistry.java
Outdated
Show resolved
Hide resolved
The very last commit is untested, noticed that I forgot the legacy registries. |
…ching Bungee isn't finished yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Will be included in 2.5.0-SNAPSHOT for users to conveniently test until the release.
Thanks for the PR @booky10 and @libraryaddict! |
TODO
Make decoding/encoding everything optional, except for dimension typesChanges
Dimension
to newDimensionType
Breaking Changes
define
methods in network synchronized registriesUser
Fixes #908
Fixes #869
Fixes #861
Fixes #850
Fixes #849
Fixes #803