You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was brought to attention that ModMenuApi#getModConfigScreenFactory() is able to return null (the factory itself, not the value created by it). This is not mentioned in the method documentation or annotated.
I was brought to attention that
ModMenuApi#getModConfigScreenFactory()
is able to returnnull
(the factory itself, not the value created by it). This is not mentioned in the method documentation or annotated.A null check is performed here when retrieving the factory from the map, but is this to allow the mentioned method to return null or is this just a standard null check after getting a value from a map?
https://github.com/TerraformersMC/ModMenu/blob/1.20.3/src/main/java/com/terraformersmc/modmenu/ModMenu.java#L61-L62
The factory is pushed to the map even if it is
null
.https://github.com/TerraformersMC/ModMenu/blob/1.20.3/src/main/java/com/terraformersmc/modmenu/ModMenu.java#L80
I am not sure right now if this is intended or is being confused with the return value of
ConfigScreenFactory#create
.The text was updated successfully, but these errors were encountered: