bendy-lib

bendy-lib

768k Downloads

ModelParts with no cuboids cause IndexOutOfBoundsException

Kneelawk opened this issue ยท 1 comments

commented

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>?

commented

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)