-
-
Notifications
You must be signed in to change notification settings - Fork 340
Registry rework #2582
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
Registry rework #2582
Conversation
src/main/java/org/spongepowered/api/event/lifecycle/RegisterRegistryValueEvent.java
Outdated
Show resolved
Hide resolved
src/main/java/org/spongepowered/api/event/lifecycle/RegisterRegistryValueEvent.java
Show resolved
Hide resolved
| * | ||
| * @return The stream | ||
| */ | ||
| Stream<Registry<?>> streamRegistries(); |
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.
Maybe just registries? Rename the below to that but has the parameter
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.
We seem to prefer the stream prefix, leaving this as is as other relevant files have it too. We could revisit that at some point and change them all at once.
|
Due to datapack entries being added only at runtime now, I guess this builder shouldn't require providing a way to (de)serialize anymore. Don't know if it would be better to make it optional or completely remove though |
|
The |
These should go to 12. 'Inherited' from the Sponge root project.
Sponge | SpongeAPI
Notable changes:
DataPackSerializableto aDataView.DataPackhas been removed.RegisterDataPackValueEventremovedCommandRegistrarTypetakes inRegistryHolder.CommandTreeNodeTypesis now only available in the server layer.Command.Raw#commandTreetakes inRegistryHolder.ResourceKeyedValueParametersremains in the game layer.ValueParameter.Bindable.RegisterRegistryEvent&RegisterRegistryValueEventimprovements.RegisterRegistryValueEventmay be called multiple times in the same layer as registries are being appended or reloaded.#registrymethod and the implementation consumes the consumer if appropriate.RegistryRegistrationSet<T>avoids invalid use cases.WorldTempleteis gone.ServerWorldProperties.LoadOptionstype.AdvancementTreeEvent.GenerateLayoutnow exposes theRegistryHolderthat contains the updated registry data.