Skip to content
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

WIP registry rework #2582

Draft
wants to merge 1 commit into
base: api-14
Choose a base branch
from
Draft

WIP registry rework #2582

wants to merge 1 commit into from

Conversation

aromaa
Copy link
Member

@aromaa aromaa commented Feb 26, 2025

Work in progress!

Notable changes:

  • Template's have been removed.
    • Builders moved to the registry types.
    • If someone wishes, they can still serialize (if possible) the types marked as DataPackSerializable to a DataView.
  • RegisterDataPackValueEvent removed
    • New types are registered directly to the registries.
      • Everything is purely runtime only and transient.
  • DataPack inspection only operate as DataView, their creation and deserialization is up to the plugin authors.
  • Commands now operate at the server registry layer.
    • CommandRegistrarType takes in RegistryHolder.
    • CommandTreeNodeTypes is now only available in the server layer.
      • Command.Raw#commandTree takes in RegistryHolder.
    • ResourceKeyedValueParameters remains in the game layer.
      • Parameters that require registry data can be defined using ValueParameter.Bindable.
  • RegisterRegistryEvent & RegisterRegistryValueEvent improvements
    • Registries can now depend on other registries, allowing chaining.
    • RegisterRegistryValueEvent may be called multiple times in the same layer as registries are being appended.
      • Plugins wanting to modify specific registry call the #registry method and the implementation consumes the consumer if appropriate.
  • Registries that have no vanilla equivalent, a Sponge one has been added in-place to iterate and add new entries.
    • Recipes
    • Advancements

Design work required:

  • Replacement for WorldTemplete's to create new worlds.
  • DataPack final shape is still up in the air.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant