implementation "curse.maven:cloth-config-348521:5987045"-Pros ----------------------------------
-Cons ----------------------------------
Everything you need in the "api" package is well documented and should be referred to
public class SimpleExampleConfigClass {
public static final Config EXAMPLE_CONFIG = new Config(MODID + "-example_config");
///The following config values are called with the {<code>EXAMPLE_CONFIG</code>} Config passed in, this automatically adds it to the Config
public static final ConfigValue<Float> EXAMPLE_FLOAT = new ConfigValue<>(10f, "exampleFloat", EXAMPLE_CONFIG);
///Comments are placed in order of declaration, so this comment will be below {<code>EXAMPLE_FLOAT</code>} and above {<code>EXAMPLE_LIST</code>}
public static final ConfigComment EXAMPLE_COMMENT = new ConfigComment("This is a list!", EXAMPLE_CONFIG);
public static final ConfigValue<List<String>> EXAMPLE_LIST = new ConfigValue<>(List.of("value1", "value2", "value3", "value4"), "exampleList", EXAMPLE_CONFIG);
public static final ConfigComment VEC3_COMMENT = new ConfigComment("This is a Vec3! Many Java classes that don't work in Forge configs will work here!", EXAMPLE_CONFIG);
public static final ConfigValue<Vec3> EXAMPLE_VEC3 = new ConfigValue<>(new Vec3(123,123,123), "exampleVec3", EXAMPLE_CONFIG);
///This method must be called in your mod's Main class
/// You will need to call the {<code>register()</code>} method on the {<code>Config</code>} you declared
/// and add any {<code>ConfigValue<?></></code>} variables you created if you did not assign them in the constructor
public static void init()/* This method can be called anything, init(), register(), etc*/ {
EXAMPLE_CONFIG.register();
///EXAMPLES OF GRABBING VALUES
//EXPLICIT (Very similar to Forge's Config)
SimpleExampleConfigClass.EXAMPLE_FLOAT.get();
}
}