# ModMenu Integration

Now, you've created your config screen, you may want to add it to ModMenu.

### Adding ModMenu with Gradle

{% code title="build.gradle" %}

```java
dependencies {
    [...]
    modApi "com.terraformersmc:modmenu:ABC"
}
```

{% endcode %}

{% hint style="info" %}
Replace **ABC** with the version of ModMenu desired, the versions of ModMenu can be found at [Linkie Web](https://linkie.shedaniel.me/dependencies).
{% endhint %}

### Creating the ModMenu entrypoint

Create a class that is implementing `ModMenuApi`

{% code title="ExampleModMenuIntegration.class" %}

```java
public class ExampleModMenuIntegration implements ModMenuApi {
}
```

{% endcode %}

Override the config screen method to provide our screen.

{% code title="ExampleModMenuIntegration.class" %}

```java
public class ExampleModMenuIntegration implements ModMenuApi {
    [...]
    @Override
    public ConfigScreenFactory<?> getModConfigScreenFactory() {
        return parent -> {
            // Return the screen here with the one you created from Cloth Config Builder
        };
    }
}
```

{% endcode %}

Add your entrypoint to `fabric.mod.json`.

{% code title="fabric.mod.json" %}

```
"entrypoints": {
    "modmenu": [
        "full.path.to.ExampleModMenuIntegration"
    ]
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shedaniel.gitbook.io/cloth-config/advanced/modmenu-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
