-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
[Bug]: CuriosApi.getSlotHelper() is null on client during multiplayer #387
Comments
It's intended, as slot types do not exist on the client as they do on the server. I'm not entirely sure why it doesn't happen on 1.20.1 since the code is the same, in that The question of how to get registered slot types safely on the client depends on what you need it for, and there are many potential solutions. Can you explain more about what your use-case is for these slot types? |
I have an upgrade system where you can add attributes bonuses to equipment pieces, including curios. If a curio item is being upgraded, I need to know what slots the curio can be equipped in, to be handled in the |
Would you be able to use |
That sounds like a good enough solution for now, hopefully there aren't many psychos with mismatching names |
You don't have to worry in that regard, as mismatched names wouldn't work to begin with: the tag has to match the identifier, otherwise it can't be equipped anywhere. It's actually what's used for the main validity checks. |
Minecraft Version
1.19.2
What happened?
CuriosApi.getSlotHelper()
returns null on a client when it's connected to a dedicated server (although not in singleplayer) causing a client side crash.This can be seen through the Iron's Spells 'n Spellbooks mod, when trying to upgrade a spellbook, which is a curio item (Upgrades apply attributes to an item, meaning it requires an equipment or curio slot)
If this is intended, then I am unaware of how to collect all registered slot types from the client safely.
edit: does not happen in 1.20.1, so I assume it is not supposed to be null
How do you trigger this bug?
Loader
Forge
Loader Version
43.3.0
Mod Version
1.19.2-5.1.6.1
Relevant Log Outputs
https://gist.github.com/iron431/330465ccc0f64e756841b0ea00a7f6ad
The text was updated successfully, but these errors were encountered: