ModMenu Integration
Now, you've created your config screen, you may want to add it to ModMenu.
Adding ModMenu with Gradle
dependencies {
[...]
modApi "com.terraformersmc:modmenu:ABC"
}
Creating the ModMenu entrypoint
Create a class that is implementing ModMenuApi
public class ExampleModMenuIntegration implements ModMenuApi {
}
Override the config screen method to provide our screen.
public class ExampleModMenuIntegration implements ModMenuApi {
[...]
@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return parent -> {
// Return the screen here with the one you created from Cloth Config Builder
};
}
}
Add your entrypoint to fabric.mod.json
.
"entrypoints": {
"modmenu": [
"full.path.to.ExampleModMenuIntegration"
]
}
Last updated
Was this helpful?