ConfigAnytime
Enables Forge configurations to be set up at any point in time. Particularly useful for developers using Forge's configuration system during the coremod/tweaker loading stage.
Developer Usage:
Add CleanroomMC's repository and specify dependency on ConfigAnytime in maven:
repositories {
maven {
url 'https://maven.cleanroommc.com'
}
}
dependencies { implementation 'com.cleanroommc:configanytime:3.0' }
API Usage Example:
@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, 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 properties!
// This will run automatically when you retrieve any properties from this config class
static {
ConfigAnytime.register(ConfigClass.class);
}
}