Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Mod Menu Badges Lib Wiki › Guides › How to Add a Custom Badge to Your Mod with Mod Menu Badges Lib

How to Add a Custom Badge to Your Mod with Mod Menu Badges Lib

Setting Up the Badge Entry Point

Mod Menu Badges Lib exposes a registration API that other mods call during initialization. To attach a badge to your own mod, you need to register a badge provider that Mod Menu will query when it builds the mod list. Create a class that implements the library's badge provider interface, then register it from your mod's initializer. The provider is asked for badges per mod ID, so you can return different badges for different mods if your project ships several.

Defining the Badge Itself

A badge in this library is built from a few pieces: an identifier, a display text or icon, and a tooltip that appears on hover. Use the library's builder to assemble these rather than constructing raw objects. The text is what players see on the Mod Menu entry, and the tooltip is where you explain what the badge means (for example, "requires another mod" or "client-side only").

Verifying It Appears

Launch the game with Mod Menu and your mod present, open the mod list, and find your mod's entry. If the badge does not show, check that your provider was actually registered before Mod Menu builds its list, and that the mod ID you return matches the ID in your mod metadata exactly. A mismatched ID is the most common reason a badge silently fails to render.