ConfigAnytime

ConfigAnytime

Mod

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.

Client and server LibraryUtility

35.0k downloads
7 followers
Follow Save
90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!

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);
    }
    
}

Project members

Cleanroom

Cleanroom

Organization

Rongmario

Lead Developer

Details

Licensed MIT
Published a year ago
Updated 9 months ago