Issue
colored-light's ModelPartMixin conflicts with bendy-lib's IModelPartMixin.
Both are trying to redirect the same ModelPart.renderCuboids()
call.
Attempt 1
I initially tried solving this by replacing the colored-lights @Redirect
with a @ModifyArgs
, but this caused issues which I can only describe as undefined behavior.
This is how it looked like:
Initially, running with a bunch of other mods, args.<Integer>get(2);
was reading a client/render/BufferBuilder
instead of an int
/Integer
. Disabling all other mods except Emotecraft changed this to a client/render/SpriteTexturedVertexConsumer
.
Both these classes are not used in ModelPart
or the mixin-methods.
Even weirder, enabling some mods again, it suddenly started working.
In short: It seems you cannot work with redirected methods at all.
Attempt 2
My second try was compiling against bendy-lib and adding a mixin for bendy-lib's IModelPartMixin
- but this doesn't work since mixin classes cannot be refered to directly.
One Possible Solution
If bendy-lib moves it's IModelPartMixin.redirectRenderCuboids()
code into any referable class, then colored-lights can redirect all cuboid.renderCuboid()
calls inside that method instead of ModelPart.render()
.
This is doable by using a IMixinConfigPlugin
: If bendy-lib is installed, disable the ModelPartMixin
and enable the mixin for bendy-lib.