[Bug]: getGuiExtraAreas is fired before Screen init causing a crash
AlphaMode opened this issue ยท 2 comments
Steps to Reproduce the Bug
Have a screen that defines its extras areas a screen init method
Such as https://github.com/Alpha-s-Stuff/TinkersConstruct/blob/8cdebdb5cbf7b16381099f2d4247ef009c1d35b2/src/main/java/slimeknights/tconstruct/tables/client/inventory/BaseTabbedScreen.java#L48
Expected Behavior
For my screens areas to be initialized fine
Actual Behavior
Game crashes saying my tabsScreen variable is null which is initialized after init, which rei calls before init
Mod Pack URL (Optional)
No response
Mod Pack Version (Optional)
No response
Extra Notes (Optional)
No response
latest.log
https://gist.github.com/AlphaMode/decb5741e35f02d06cf07b5059dd9356
Thanks for the report!
This seems to be an issue in Tinker's Construct:
https://github.com/SlimeKnights/TinkersConstruct/blob/c52d82ce60872f70263ac7b30f378e9bcb659ce2/src/main/java/slimeknights/tconstruct/tables/client/inventory/BaseTabbedScreen.java#L96-L101C4
You can check if tabsScreen
is null
, and if so just return an empty list.