Language

ConfigAnytime

ConfigAnytime

Modrinth

Allows Forge configurations to be setup at any point in time. Especially for developers that use Forge's configuration system during coremod/tweaker's loading stage.

219.7k downloads 13 followers updated 27mo ago
latest v3.0 Modrinth
Forge 1.12.2 – 1.12.2 LibraryUtility

ConfigAnytime

Allows Forge configurations to be setup at any point in time. Especially for developers that use Forge's configuration system during coremod/tweaker's loading stage.

Dev Usage:

  • Add CleanroomMC's repository and depend on ConfigAnytime's maven entry:
repositories {
    maven {
        url 'https://maven.cleanroommc.com'
    }
}

dependencies {
    implementation 'com.cleanroommc:configanytime:3.0'
}
  • Example API Usage:
@Config(modid = "configanytime")
public class ConfigClass {
    
    public static boolean configBooleanProperty = true;
    public static int configIntProperty = 42;
    
    public static final InnerClass INNER_CLASS = new InnerClass(); // Inner access via this member, this is processed automatically by ConfigManager
    
    public static class InnerClass {
        
        public boolean innerProperty = false; // Must be non-static, referenced via the member field in the outer class
        
    }
    
    // Static initializers go after the properties!
    // This will run automatically when you retrieve any properties from this config class
    static {
        ConfigAnytime.register(ConfigClass.class);
    }
    
}

Versions

Release
3.0
forge · 1.12.2 · 27mo ago
- Fixes configs not being named when annotation name isn't populated
195.3k
Release
2.0
forge · 1.12.2 · 29mo ago
- Delay NO-OP checks so configurations registered in ILateMixinLoader runs properly
4.7k
Release
1.0
forge · 1.12.2 · 34mo ago
First release.
19.7k

Comments 0

No comments yet. Be the first to share your thoughts.

Download ConfigAnytime

Files are served directly from the original source. Modgrid does not host or modify them.