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

Messed up order of items due to HashBasedTable and identical ID for different registration types #48

Open
lcy0x1 opened this issue Oct 23, 2022 · 2 comments

Comments

@lcy0x1
Copy link

lcy0x1 commented Oct 23, 2022

private final Table<String, ResourceKey<? extends Registry<?>>, Registration<?, ?>> registrations = HashBasedTable.create();

This line in abstract registry messed up the registration order of items if another type of registration happens before item and has the same name for some of the entries as the items

@tterrag1098
Copy link
Owner

Sorry, could you give a more specific example of what problem this could cause?

@lcy0x1
Copy link
Author

lcy0x1 commented Dec 26, 2022

If I have registry A and registry B, I register aaa, bbb, ddd in registry A, and then register ccc, ddd, eee in registry B. The order in registry B becomes ddd, ccc, eee

This can be fixed by registering items before everything else, though is still good to fix

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

No branches or pull requests

2 participants