Skip to content

RegistryClassInfo Housekeeping#8759

Open
APickledWalrus wants to merge 1 commit into
dev/featurefrom
feature/registry-classinfo-cleanup
Open

RegistryClassInfo Housekeeping#8759
APickledWalrus wants to merge 1 commit into
dev/featurefrom
feature/registry-classinfo-cleanup

Conversation

@APickledWalrus

Copy link
Copy Markdown
Member

Problem

This PR addresses a few problems:

  1. RegistryClassInfo only accepts Registry, whereas RegistryKey is now preferred. We can simplify usages with a constructor that accepts RegistryKey
  2. Adding alternative constructors is pretty annoying due to all of the different combinations of parameters.

Solution

I've removed the need for the defaultExpression constructor parameter by allowing defaultExpression to be used more than once on ClassInfo. Until we have a sane builder system, I think this will be fine.

I've deprecated the existing Registry based constructors in favor of others using RegistryKey. It is useful to store RegistryKey as well for future work (e.g. command arguments). For now, for compatibility, it is nullable. I don't believe there is a way to go from Registry->RegistryKey (someone please correct me if I am wrong).

Finally, I've overridden some of the ClassInfo methods to guarantee stronger contracts.

I've also updated all deprecated usages and cleaned up the unnecessary EntityData work.

Testing Completed

Standard tests to confirm continued functionality.

Supporting Information

This PR will not run on the 1.21.4 environment. I've updated the API version to 1.21.5 for the purposes of the other versions (below 1.21.5, the bytecode rewriter will rewrite Cow into AbstractCow, cause NSME for variant operations). This should be done separately in a proper PR after 2.16 is released.


Completes: none
Related: none
AI assistance: none

@APickledWalrus APickledWalrus requested review from a team and Absolutionism as code owners July 7, 2026 16:52
@APickledWalrus APickledWalrus requested review from UnderscoreTud and cheeezburga and removed request for a team July 7, 2026 16:52

@Absolutionism Absolutionism left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to go ahead and remove the 1.21.4 environment + workflow?

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.

2 participants