apace100/apoli

[1.20.1] Crash when modifying a PlayerEntityRenderer externally to not render specific model parts

avetharun opened this issue · 7 comments

Error logs: (Stripped of debug error messages) https://pastebin.com/qC0LfhiD

The relevant code is here.

External mixin code which causes this:

EntityModel.headParts.forEach(modelPart -> {
    modelPart.visible = !isInvisible;
});
EntityModel.bodyParts.forEach(modelPart -> {
    modelPart.visible = !isInvisible;
});

This issue is incredibly vague, I know, but that's about as much as I can get from the errors and sources.

Would you be able to send the entire crash report?

Entire crash report is here:
https://pastebin.com/rbgN68er

Entire crash report is here: https://pastebin.com/rbgN68er

The specific issue that causes this is when rendering the PlayerEntityRenderer's parts as invisible (by setting .visible or .enabled to false)

That shouldn't be it. The crash report is saying that there's an int being casted to a float.

That's what's happening, and the function being called. This only happens when I try to hide the model via individual parts

This is quite strange... there doesn't seem to be an obvious issue with how Apoli is modifying the arguments for Model#render called in LivingEntityRenderer#render (the indices used are correct). It also looks correct when exporting the mixin. I've also checked using the debugger, which showed that the mixin modifies the correct variables in the correct indices 🤔

Can you also send the entire external mixin?

I cannot, since I already used a workaround, but the original code posted is what I used when this issue happened. Sorry