[1.16.4] Workbench renderer for manual Workbench stuck in infinite loop if output is not drawable
kindlich opened this issue ยท 0 comments
Description of the issue:
When AutoWorkbenchRenderer.getBlueprintDrawable(Recipe, World)
returns null
, then the loop counter inside ModWorkbenchRenderer#render is not updated and the game will get stuck there.
Here's a link to the code in question (line 88 is the aforementioned loop counter increment)
This is due to the loop counter also being used as position for the renderer.
Moving the increment of the counter out solves the rendering loop but can cause gaps in the rendered outputs.
This image is after moving the i++
out of the if block.
Crashlog:
None - game gets stuck, but does not crash.
Versions & Modlist
Development instance (based on commit 0d13b23).
No other mods than the ones listed in the build.gradle (plus a maven dep for CraftTweaker, version 7.1.0.77)
Reproduction Steps
Add a recipe with an output that has no BlueprintDrawable associated with it.
In my case, I created a recipe Bedrock -> Iron Block
via the CraftTweaker integration I'm working on.
Only happens in the manual workbench, the renderer for the Automatic workbench and the ItemFrame handle this case more gracefully (same blueprint as above, both set to the iron block result):