File tree Expand file tree Collapse file tree
src/main/java/com/terraformersmc/modmenu Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,8 +103,9 @@ public void onInitializeClient() {
103103 String modId = metadata .getId ();
104104 try {
105105 ModMenuApi api = entrypoint .getEntrypoint ();
106- configScreenFactories .put (modId , api .getModConfigScreenFactory ());
107- apiImplementations .add (api );
106+ var factory = api .getModConfigScreenFactory ();
107+ if (factory != null ) configScreenFactories .put (modId , factory );
108+ apiImplementations .add (api );
108109 updateCheckers .put (modId , api .getUpdateChecker ());
109110 providedUpdateCheckers .putAll (api .getProvidedUpdateCheckers ());
110111 api .attachModpackBadges (modpackMods ::add );
Original file line number Diff line number Diff line change 22
33import com .terraformersmc .modmenu .ModMenu ;
44import com .terraformersmc .modmenu .gui .ModsScreen ;
5+ import org .jetbrains .annotations .Nullable ;
56import net .minecraft .client .gui .screen .Screen ;
67import net .minecraft .text .Text ;
78
@@ -37,8 +38,8 @@ static Text createModsButtonText() {
3738 *
3839 * @return A factory for constructing config screen instances.
3940 */
40- default ConfigScreenFactory <?> getModConfigScreenFactory () {
41- return screen -> null ;
41+ default @ Nullable ConfigScreenFactory <?> getModConfigScreenFactory () {
42+ return null ;
4243 }
4344
4445 /**
You can’t perform that action at this time.
0 commit comments