Fix entities not rendering when Identity menu is opened #512
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.
私が制作しているMod、LittleMaidModelLoaderを導入時に発生するバグを修正しました。
Identity menuを開くと、その後にすべてのエンティティがレンダリングされなくなる不具合を修正しました。
変更内容を大まかに説明しますと、InventoryScreen.drawEntity()の実行時に例外が投げられた場合、catch内で後処理を実行するように変更しました。
InventoryScreen.drawEntity()の処理内容は前処理、描画処理、後処理の三つに分かれています。
しかし、描画処理で例外が発生した後、後処理が実行されないことで不具合が発生していました。
そのため、catch内で後処理を実行することで不具合を回避しています。
Forge/Fabricの両環境でテストしました。
Fixed a bug that occurred when installing LittleMaidModelLoader, a mod I am working on.
Fixed a bug where opening the Identity menu would not render all entities afterwards.
Roughly speaking, if an exception is thrown when executing InventoryScreen.drawEntity(), the post-processing is now performed in catch.
The processing content of InventoryScreen.drawEntity() is divided into three parts: pre-processing, drawing, and post-processing.
However, after an exception occurred during the drawing process, the post-processing was not executed, causing a problem.
Therefore, the post-processing is executed in the "catch" to avoid the problem.
Tested on both Forge and Fabric environments.
Translated with www.DeepL.com/Translator (free version)