允许在任何时间点设置 Forge 配置。特别是对于在 Coremod / Tweaker 的加载阶段使用 Forge 配置系统的开发人员。
开发用法:
repositories {
maven {
url 'https://maven.cleanroommc.com'
}
}
dependencies {
implementation 'com.cleanroommc:configanytime:1.0'
}
@Config(modid = "configanytime")
public class ConfigClass {
public static boolean configBooleanProperty = true;
public static int configIntProperty = 42;
// Static initializers go after the properties!
// This will run automatically when you retrieve any properties from this config class
static {
ConfigAnytime.register(ConfigClass.class);
}
}