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

Can't join server due to: Internal Exception: java.lang.IllegalArgumentException: Registry ResourceKey[minecraft:root / apoli:configured_power] was missing. #324

Closed
EmilyBabin opened this issue May 2, 2023 · 7 comments
Assignees
Labels
1.19 bug crash worked around No proper fix was implemented, but a workaround is currently implemented.

Comments

@EmilyBabin
Copy link

Internal Exception: java.lang.IllegalArgumentException: Registry ResourceKey[minecraft:root / apoli:configured_power] was missing.

MC - 1.19.2
Forge - 43.2.7
Origins - 1.19.2-1.7.1.0
Caelus API (Forge) - 1.19.2-3.0.0.6

It's really inconsistent. Doesn't happen every time but it happens most times. If we keep persisting we get into the server eventually but sometimes it takes 2-3 tries. Also (unsure if related) sometimes in the game some clients just have their origins disappear. Player A can /set origin to whatever they want just fine, but player B can only /set origin to origins:empty and nothing else. Fixed on relog but still sometimes the Registry error occurs.

@BlueYoshi68
Copy link

You ever get a fix to this?

@EmilyBabin
Copy link
Author

Nope. A mod author recommended I get the 'spit it out' mod made by Mr Bysco to maybe see what's going on further, but I haven't had the issue since I added the mod. The mod is just supposed to rewrite the disconnect messages to give you more details so it shouldn't fix it but the modpack owner still has the issues and he doesn't have the mod.

@norfaremc
Copy link

Driving me insane. This has been an issue since last year. When will this ever get fixed? And randomly when the server loads all powers and subpowers for some origins are removed. Players are frustrated and I am too at this point.

@MerchantPug
Copy link
Collaborator

I'm looking into it now.

@MerchantPug MerchantPug self-assigned this Jul 19, 2023
@MerchantPug MerchantPug added bug WTF? Something is wrong, I don't know why. 1.19 worked around No proper fix was implemented, but a workaround is currently implemented. labels Jul 19, 2023
@MerchantPug
Copy link
Collaborator

MerchantPug commented Jul 21, 2023

This should be fixed next update, although I'm unsure on if it's a proper fix but hey it works.

@MerchantPug
Copy link
Collaborator

MerchantPug commented Jul 22, 2023

I've taken another look at this fix, and I think I've made the proper fix now.

Technical Java explanation below

The problem

The ResourceKey class on Mojang's part does not have a proper implementation of the Object#hashCode method. HashMaps use this to check what's in the map, otherwise they'll fallback to equals, which has inaccuracies with getting a value from HashMaps. Which when this doesn't work, it causes this exception.

The solution

The solution was to essentially create a record that stores a ResourceKey that actually has a hashCode implementation this time around. This should then fix the issues with actually getting values from a map, on top of potentially being more performant.

@MerchantPug MerchantPug added crash and removed worked around No proper fix was implemented, but a workaround is currently implemented. WTF? Something is wrong, I don't know why. labels Jul 22, 2023
@MerchantPug
Copy link
Collaborator

MerchantPug commented Jul 22, 2023

Provided you don't repeatedly run /reload in a short timeframe, consider this bug should be considered fixed next update.

@MerchantPug MerchantPug added the worked around No proper fix was implemented, but a workaround is currently implemented. label Jul 22, 2023
MerchantPug added a commit to EdwinMindcraft/calio that referenced this issue Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.19 bug crash worked around No proper fix was implemented, but a workaround is currently implemented.
Projects
None yet
Development

No branches or pull requests

4 participants