-
Notifications
You must be signed in to change notification settings - Fork 417
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
[1.21.4] Refactor registry sync #4233
Draft
modmuss50
wants to merge
2
commits into
FabricMC:1.21.4
Choose a base branch
from
modmuss50:registry-sync-refactor
base: 1.21.4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
modmuss50
added
in progress
This issue has PR(s) open to resolve it (or a PR that is WIP)
registry-sync
Pull requests and issues related to registry sync
labels
Nov 15, 2024
apple502j
suggested changes
Nov 16, 2024
|
||
for (Identifier remoteId : remoteRegistry.keySet()) { | ||
if (!registry.containsId(remoteId)) { | ||
// Found a registry entry from the server that is |
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.
that is... (missing?)
Comment on lines
+96
to
+106
// Registry was not found on the client, is it optional? | ||
// If so we can just ignore it. | ||
// Otherwise we throw an exception and disconnect. | ||
if (registry == null) { | ||
if (isRegistryOptional(registryId, data)) { | ||
LOGGER.info("Received registry data for unknown optional registry: {}", registryId); | ||
continue; | ||
} else { | ||
throw new RemapException("Received registry data for unknown registry: " + registryId); | ||
} | ||
} |
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.
I believe this is duplicative, as checkRemoteRemap
should've already thrown in this case?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in progress
This issue has PR(s) open to resolve it (or a PR that is WIP)
registry-sync
Pull requests and issues related to registry sync
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.
Optional registries / stricter defaults
The goal of these changes is to document the expected behaviour of missing registry's when a client connects to a modded server. This behaviour is now consistent between a vanilla clients and modded clients. This has nothing to do with individual registry entries (yet).
Some mods have their own registries that only need to be synced when the connecting client has their mod, I have added a new
OPTIONAL
registry attribute that allows this. This attribute is sent in the registry sync packet.The behaviour of a connecting client is as follows:
These changes will only apply to 1.21.4 as they are breaking.
TODO