Skip to content

Getting Started

Bizarre Cube edited this page Aug 14, 2026 · 2 revisions

Getting Started

Requirements

  • Fabric: Fabric API is required additionally.
  • Forge / NeoForge: no additional dependencies required.

Your First Config

  1. Create a class with a public no-argument constructor and annotate it with @AutoConfig.
  2. Describe the fields.
  3. Register the class via ConfigHolder.register(...).
@AutoConfig(name = "example")  
public class ExampleConfig {  
    @Slider(min = 30, max = 240, step = 10)  
    public int fpsLimit = 120;  
  
    @Color(alpha = true)  
    public int overlayColor = 0x80FF0000;  
}  
  
ConfigHolder<ExampleConfig> holder = ConfigHolder.register(ExampleConfig.class);  
ExampleConfig config = holder.get();  

Data is stored in config/<name>.json, where <name> is the value of name() from @AutoConfig.

Clone this wiki locally