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

Add an instanceof check #14

Open
wants to merge 1 commit into
base: 1.18.x
Choose a base branch
from
Open

Add an instanceof check #14

wants to merge 1 commit into from

Conversation

Mrbysco
Copy link

@Mrbysco Mrbysco commented Feb 16, 2023

Currently if a pack dev allows other mods quivers to go into the quiver curios slot it'll cause a nullpointer when QuiverItem#getInventory is called. The instanceof makes sure it won't get to that point if it isn't a quiver from this mod.

An example of the nullpointer that would be fixed:
https://pastebin.com/0cgXQqF2

Making sure quivers from other mods don't cause a nullpointer when calling `QuiverItem#getInventory` if a pack dev allows them to be in the same curios slot
@Nyfaria
Copy link
Owner

Nyfaria commented Feb 20, 2023

Why are other non-nyf's quivers quivers going into my quiver slot?

@Darkosto
Copy link

allowing other quivers to go into that slot makes it multi-purpose, and ties multiple mods together in the same modpack. It also adds a level of immersion for players.

@Mrbysco
Copy link
Author

Mrbysco commented Feb 20, 2023

There's always the possibility of multiple mods adding a curios slot and use the same identifier. Going off the Curios description identical identifiers will be merged together

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.

3 participants