Automobility icon indicating copy to clipboard operation
Automobility copied to clipboard

Forge 1.19.2: crash when selecting an empty recipe type.

Open NordicNooob opened this issue 1 year ago • 0 comments

Running the latest version, 0.4.1.

If all recipes of a specific category (in my case, engines) are removed from the auto mechanic table, the list is not detected as empty and will crash upon trying to display the empty list of items.

Otherwise potentially notable is that I used CraftTweaker to remove the aforementioned engine recipes, but this issue seems to simply because there are no recipes there, not that it was specifically crafttweaker that removed them.

Here's the relevant line of the crash report. ` Description: Rendering screen

java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because "recipes" is null at io.github.foundationgames.automobility.screen.AutoMechanicTableScreen.drawRecipes(AutoMechanicTableScreen.java:302) ~[automobility-0.4.1+1.19.2-forge.jar%23257!/:?] {re:classloading} at io.github.foundationgames.automobility.screen.AutoMechanicTableScreen.m_7286_(AutoMechanicTableScreen.java:128) ~[automobility-0.4.1+1.19.2-forge.jar%23257!/:?] {re:classloading} at net.minecraft.client.gui.screens.inventory.AbstractContainerScreen.m_6305_(AbstractContainerScreen.java:92) ~[client-1.19.2-20220805.130853-srg.jar%23347!/:?] `

NordicNooob avatar May 18 '23 17:05 NordicNooob