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

Great Registry Repackaging #3396

Merged
merged 10 commits into from
Nov 16, 2022
Merged

Conversation

apple502j
Copy link
Contributor

Resolves #3002

Since this snapshot's changes mean people have to change imports anyway, why not do it now?

And question to folks: should we make subpackages? and if so how?

Registry packages have moved to `net.minecraft.registry`.
Tag packages have moved to `net.minecraft.registry.tag`.
@apple502j apple502j added refactor A PR that renames existing names. new A PR that maps mainly new names snapshot A PR that targets a snapshot version of Minecraft impactful A change that is likely to affect some mods. Will require more reviews. labels Nov 9, 2022
@apple502j apple502j requested a review from a team November 9, 2022 23:13
Copy link
Contributor

@Shnupbups Shnupbups left a comment

Choose a reason for hiding this comment

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

Not that I oppose it exactly, but why repackage tag to registry/tag?

@apple502j
Copy link
Contributor Author

Tags are now managed by the registry (since 1.18.2).

@YanisBft YanisBft requested a review from a team November 13, 2022 18:54
@haykam821
Copy link
Contributor

Could entry and entry list classes be placed into a separate package?

@Bixilon
Copy link
Contributor

Bixilon commented Nov 15, 2022

this PR can't be serious...

@Shnupbups Shnupbups merged commit 3bd4327 into FabricMC:22w45a Nov 16, 2022
@md5
Copy link

md5 commented Feb 26, 2023

Placing the entry classes in a separate package results in this error when trying to bootstrap during a JUnit test:

java.lang.IllegalAccessError: class net.minecraft.registry.SimpleRegistry tried to access method 'void net.minecraft.registry.entry.RegistryEntry$Reference.setRegistryKey(net.minecraft.registry.RegistryKey)' (net.minecraft.registry.SimpleRegistry and net.minecraft.registry.entry.RegistryEntry$Reference are in unnamed module of loader 'app')

It looks like the fabric-loader-junit package allows me to get past that error, so perhaps it doesn't matter all that much for my use case, but I thought I'd bring it up since this mapping is resulting code that tries to access a package private member across package boundaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impactful A change that is likely to affect some mods. Will require more reviews. new A PR that maps mainly new names refactor A PR that renames existing names. snapshot A PR that targets a snapshot version of Minecraft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Top-level registry package
6 participants