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

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

Open
avetharun opened this issue Jul 19, 2023 · 7 comments
Labels
bug Something isn't working missing info This is missing needed information

Comments

@avetharun
Copy link

avetharun commented Jul 19, 2023

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.

@eggohito
Copy link
Collaborator

Would you be able to send the entire crash report?

@avetharun
Copy link
Author

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

@avetharun
Copy link
Author

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)

@MerchantPug
Copy link
Contributor

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

@avetharun
Copy link
Author

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

@eggohito
Copy link
Collaborator

eggohito commented Jul 27, 2023

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?

@avetharun
Copy link
Author

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

@eggohito eggohito added bug Something isn't working missing info This is missing needed information labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working missing info This is missing needed information
Projects
None yet
Development

No branches or pull requests

3 participants