Fix client crash when rendering a facade on a cable with a null model… - #1691
Open
mashen456 wants to merge 1 commit into
Open
Fix client crash when rendering a facade on a cable with a null model…#1691mashen456 wants to merge 1 commit into
mashen456 wants to merge 1 commit into
Conversation
… baker CableModelBase.MODEL_BAKER is populated lazily when the cable item model is baked (ItemModelCable.Unbaked#bake). Under deferred/lazy model baking, e.g. ModernFix's dynamic_resources, it may still be null when a chunk section containing a facade is first meshed, causing a NullPointerException in FaceBakery#bakeQuad (ModelBaker.interner()). Guard against this in addFacadeQuad by skipping the facade quad while the baker is unavailable; it renders once the item model has been baked.
|
|
rubensworks
reviewed
Jul 30, 2026
| // Under deferred/lazy model baking (e.g. ModernFix's dynamic_resources) that may not have happened yet when a | ||
| // chunk section containing a facade is first meshed, leaving MODEL_BAKER null and crashing FaceBakery#bakeQuad. | ||
| // Skip the facade quad in that case instead of crashing; it will render once the item model has been baked. | ||
| if (MODEL_BAKER == null) { |
Member
There was a problem hiding this comment.
This is not a solution, since this will just make facades invisible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… baker
CableModelBase.MODEL_BAKER is populated lazily when the cable item model is baked (ItemModelCable.Unbaked#bake). Under deferred/lazy model baking, e.g. ModernFix's dynamic_resources, it may still be null when a chunk section containing a facade is first meshed, causing a NullPointerException in FaceBakery#bakeQuad (ModelBaker.interner()).
Guard against this in addFacadeQuad by skipping the facade quad while the baker is unavailable; it renders once the item model has been baked.