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

ModelParts with no cuboids cause IndexOutOfBoundsException #17

Closed
Kneelawk opened this issue Jul 8, 2021 · 1 comment · Fixed by #18
Closed

ModelParts with no cuboids cause IndexOutOfBoundsException #17

Kneelawk opened this issue Jul 8, 2021 · 1 comment · Fixed by #18

Comments

@Kneelawk
Copy link

Kneelawk commented Jul 8, 2021

I am the author of the mod Magical Mahou.

I have been using BipedEntityModels to attach Objs to the player model under certain conditions. I do this by creating custom ModelParts that render the Myron Objs instead of cuboids. This means that these ModelParts have no cuboids.

When a mod using BendyLib calls ModelPartAccessor.getCuboid(...), ModelPartAccessor assumes that cuboid actually exists. It might make sense for ModelPartAccessor.getCuboid(...) to return an Optional<MutableCuboid>?

@KosmX
Copy link
Owner

KosmX commented Jul 8, 2021

I think, yes, I can do that.
Now, I don't have access to my PC (I'm currently upgrading it) but I'll check, what can I do.
I won't change getCuboid, but I can make it deprecated and add a new method. (changing that will make the lib completely incompatible with any mods what are using an older version)

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 a pull request may close this issue.

2 participants