-
-
Notifications
You must be signed in to change notification settings - Fork 3
Proposal: native registry API #21
Copy link
Copy link
Open
Labels
A: Core TechArea: Underlying core tech for the mod and the GitHub repository.Area: Underlying core tech for the mod and the GitHub repository.A: RegistryArea: Registration API and registry containers.Area: Registration API and registry containers.D0: Very HighDifficulty: Codebase knowledge required is extreme.Difficulty: Codebase knowledge required is extreme.P2: RaisedPriority: Item has a raised priority, indicating it might get increased maintainer attention.Priority: Item has a raised priority, indicating it might get increased maintainer attention.T: RefactorType: Refactor of notable amount of codebase.Type: Refactor of notable amount of codebase.
Metadata
Metadata
Assignees
Labels
A: Core TechArea: Underlying core tech for the mod and the GitHub repository.Area: Underlying core tech for the mod and the GitHub repository.A: RegistryArea: Registration API and registry containers.Area: Registration API and registry containers.D0: Very HighDifficulty: Codebase knowledge required is extreme.Difficulty: Codebase knowledge required is extreme.P2: RaisedPriority: Item has a raised priority, indicating it might get increased maintainer attention.Priority: Item has a raised priority, indicating it might get increased maintainer attention.T: RefactorType: Refactor of notable amount of codebase.Type: Refactor of notable amount of codebase.
Type
Fields
Give feedbackNo fields configured for Task.
The why
Instead of doing custom registries like modkit does right now, we could use MC's built-in registry system. This would give us a lot of benefits like stability and speed, as well as native support for all the registry shenanigans.
The how
Obviously, this means that the registry elements will lose GSON support, opting for Codecs instead.
First, we need to inject into
RegistryLoader#DYNAMIC_REGISTRIESlist field. Registry's element's codecs can be whatever, but referencing registry elements in other registry element codecs is better to do viaRegistryElementCodec, as seen inDimensionTypeandDimensionOptions.