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
In my mod Configured, I only provide config screens for other mods using ModMenuApi#getProvidedConfigScreenFactories, I do not provide one to the mod itself. However, as of 4fd1eb7 and 39f0fcf, ModMenu will now believe that Configured itself has a config and will show a config button that is non-functional when clicked. My implementation of ModMenuApi#getProvidedConfigScreenFactories has also explicitly ensured that a config screen is not provided by itself.
Solution, default implementation of getModConfigScreenFactory should return null instead of an empty factory, then check for null before putting into ModMenu#configScreenFactories map. I am not sure what implications this will have changing the default implementation, but I don't see another way to detect if a mod has a config screen without an expensive to ConfigScreenFactory#create.
The text was updated successfully, but these errors were encountered:
MrCrayfish
changed the title
[1,21.3] Mods will have an non-functional config button when ModMenuApi#getModConfigScreenFactory is not implemented.
[1.21.3] Mods will have an non-functional config button when ModMenuApi#getModConfigScreenFactory is not implemented.
Nov 18, 2024
In my mod Configured, I only provide config screens for other mods using
ModMenuApi#getProvidedConfigScreenFactories
, I do not provide one to the mod itself. However, as of 4fd1eb7 and 39f0fcf, ModMenu will now believe that Configured itself has a config and will show a config button that is non-functional when clicked. My implementation ofModMenuApi#getProvidedConfigScreenFactories
has also explicitly ensured that a config screen is not provided by itself.Solution, default implementation of
getModConfigScreenFactory
should returnnull
instead of an empty factory, then check fornull
before putting intoModMenu#configScreenFactories
map. I am not sure what implications this will have changing the default implementation, but I don't see another way to detect if a mod has a config screen without an expensive toConfigScreenFactory#create
.The text was updated successfully, but these errors were encountered: