Wiki 9Minecraft Wiki 9Minecraft

Create a Custom Config File with UI Integration

Java EditionModGuides 4FAQ 10Related mods 60
DownloadWunderLib Mod

Get the files on 9Minecraft

Contents (3)
  1. Setting Up Your Config Class
  2. Generating the Config Screen
  3. Best Practices

Setting Up Your Config Class

WunderLib's typesafe config system lets you define configuration options that automatically generate a ModMenu-compatible UI screen. Start by creating a config class that extends WunderLib's config framework and annotate your fields with the provided decorators to control how they appear in the UI.

Generating the Config Screen

Once your config class is defined with proper annotations (such as sliders for numeric ranges, toggles for booleans, or text fields for strings), WunderLib automatically converts these into a user-friendly screen. Players can open this screen through ModMenu without editing JSON files manually.

Best Practices

  • Use descriptive field names; they become UI labels
  • Group related settings using category annotations if available
  • Test your config screen in-game to ensure all field types display correctly
  • Provide sensible default values so players have a working config immediately

This approach eliminates manual config file editing and keeps your mod's settings organized and accessible.

More guides for this mod