Download ConfigAnytime — Minecraft Mods — MetaMods

ConfigAnytime

Active

Downloads

9

Last update

1 year ago

Versions

1.12.2
Client and server
Forge
Libraries
Utils

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

}
Project members
Rongmario

Rongmario

Developer

Cleanroom

Cleanroom

Developer

CleanroomMC

CleanroomMC

Created: 31 Aug 2023

ID: 3458