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

Fix for some entities crashing when getting added to a constructed ship. #1006

Open
wants to merge 3 commits into
base: 1.20.1/main
Choose a base branch
from

Conversation

Andy608
Copy link

@Andy608 Andy608 commented Nov 17, 2024

This change adds a check against the entity's renderer to see if it is eligible for rendering before it calls the render function. This prevents crashes from occurring where an entity may not be ready to render yet, i.e. in the case of Mekanism's Universal Cables.

Also changed the way the java version is set for the project, so developers that have multiple java versions installed can still use this project without needing to reset their java home to java 17.

This change adds a check against the entity's renderer to see if it is eligible for rendering before it calls the render function. This prevents crashes from occurring where an entity may not be ready to render yet, i.e. in the case of Mekanism's Universal Cables.

Also changed the way the java version is set for the project, so developers that have multiple java versions installed can still use this project without needing to reset their java home to java 17.
@CLAassistant
Copy link

CLAassistant commented Nov 17, 2024

CLA assistant check
All committers have signed the CLA.

@Andy608
Copy link
Author

Andy608 commented Nov 17, 2024

See Mekanism thread for vis: mekanism/Mekanism#8260

@Rubydesic
Copy link
Contributor

Please leave the Java release/compiler options in place. The toolchain stuff is fine but you don't need to remove the previous settings.

@Rubydesic
Copy link
Contributor

I don't really understand why this patch does anything. We're calling blockEntityRenderDispatcher#render (which is what vanilla does), which already checks #shouldRender. This is actually necessary for Mekanism not to crash?

@Andy608
Copy link
Author

Andy608 commented Nov 18, 2024

I did more testing and found that this causes beds and other uniquely rendered things to be invisible so this isn't a good fix.

I think my original null check in Mekanism is the best approach to solve this.

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 this pull request may close these issues.

3 participants