Quilt Loader 1
Loading...
Searching...
No Matches
org.quiltmc.loader.api.config.QuiltConfig Class Reference

Class containing helper methods that mods should use to create config files as part of Quilt's config system. More...

Static Public Member Functions

static Config create (String family, String id, Path path, Config.Creator... creators)
 Creates and registers a config file.
static Config create (String family, String id, Config.Creator... creators)
 Creates and registers a config file.
static< C extends WrappedConfig > C create (String family, String id, Path path, Config.Creator before, Class< C > configCreatorClass, Config.Creator after)
 Creates and registers a config with fields derived from the fields of the passed class.
static< C extends WrappedConfig > C create (String family, String id, Path path, Config.Creator before, Class< C > configCreatorClass)
 Creates and registers a config with fields derived from the fields of the passed class.
static< C extends WrappedConfig > C create (String family, String id, Path path, Class< C > configCreatorClass, Config.Creator after)
 Creates and registers a config with fields derived from the fields of the passed class.
static< C extends WrappedConfig > C create (String family, String id, Path path, Class< C > configCreatorClass)
 Creates and registers a config with fields derived from the fields of the passed class.
static< C extends WrappedConfig > C create (String family, String id, Config.Creator before, Class< C > configCreatorClass, Config.Creator after)
 Creates and registers a config with fields derived from the fields of the passed class.
static< C extends WrappedConfig > C create (String family, String id, Config.Creator before, Class< C > configCreatorClass)
 Creates and registers a config with fields derived from the fields of the passed class.
static< C extends WrappedConfig > C create (String family, String id, Class< C > configCreatorClass, Config.Creator after)
 Creates and registers a config with fields derived from the fields of the passed class.
static< C extends WrappedConfig > C create (String family, String id, Class< C > configCreatorClass)
 Creates and registers a config with fields derived from the fields of the passed class.

Detailed Description

Class containing helper methods that mods should use to create config files as part of Quilt's config system.

Member Function Documentation

◆ create() [1/10]

static< C extends WrappedConfig > C org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Class< C > configCreatorClass )
inlinestatic

Creates and registers a config with fields derived from the fields of the passed class.

The passed class should have the following characteristics:

  • Has a public no-argument constructor
  • Each non-static field should be final and be one of the following types:
    • A basic type (int, long, float, double, boolean, String, or enum)
    • A complex type (a ValueList or ValueMap of basic or complex types)
    • An object whose class follows these rules
Parameters
familythe mod owning the resulting config file
idthe config's id
configCreatorClassa class as described above
Returns
a

◆ create() [2/10]

static< C extends WrappedConfig > C org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Class< C > configCreatorClass,
Config.Creator after )
inlinestatic

Creates and registers a config with fields derived from the fields of the passed class.

The passed class should have the following characteristics:

  • Has a public no-argument constructor
  • Each non-static non-transient field should be final, not null, and be one of the following types:

Certain annotations can also be used on fields of this class to attach metadata to them. The org.quiltmc.config.api.annotations.Comment annotation is one such annotation that is provided by default, but additional ConfigFieldAnnotationProcessors can be registered with ConfigFieldAnnotationProcessor#register(Class, ConfigFieldAnnotationProcessor).

Parameters
familythe mod owning the resulting config file
idthe config's id
configCreatorClassa class as described above
aftera Config.Creator that can be used to configure the resulting config further
Returns
a

◆ create() [3/10]

static< C extends WrappedConfig > C org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Config.Creator before,
Class< C > configCreatorClass )
inlinestatic

Creates and registers a config with fields derived from the fields of the passed class.

The passed class should have the following characteristics:

  • Has a public no-argument constructor
  • Each non-static non-transient field should be final, not null, and be one of the following types:

Certain annotations can also be used on fields of this class to attach metadata to them. The org.quiltmc.config.api.annotations.Comment annotation is one such annotation that is provided by default, but additional ConfigFieldAnnotationProcessors can be registered with ConfigFieldAnnotationProcessor#register(Class, ConfigFieldAnnotationProcessor).

Parameters
familythe mod owning the resulting config file
idthe config's id
beforea Config.Creator that can be used to configure the resulting config further
configCreatorClassa class as described above
Returns
a

◆ create() [4/10]

static< C extends WrappedConfig > C org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Config.Creator before,
Class< C > configCreatorClass,
Config.Creator after )
inlinestatic

Creates and registers a config with fields derived from the fields of the passed class.

The passed class should have the following characteristics:

  • Has a public no-argument constructor
  • Each non-static non-transient field should be final, not null, and be one of the following types:

Certain annotations can also be used on fields of this class to attach metadata to them. The org.quiltmc.config.api.annotations.Comment annotation is one such annotation that is provided by default, but additional ConfigFieldAnnotationProcessors can be registered with ConfigFieldAnnotationProcessor#register(Class, ConfigFieldAnnotationProcessor).

Parameters
familythe mod owning the resulting config file
idthe config's id
beforea Config.Creator that can be used to configure the resulting config further
configCreatorClassa class as described above
aftera Config.Creator that can be used to configure the resulting config further
Returns
a

◆ create() [5/10]

Config org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Config.Creator... creators )
inlinestatic

Creates and registers a config file.

Parameters
familythe mod owning the resulting config file
idthe configs id
creatorsany number of Config.Creators that can be used to configure the resulting config

◆ create() [6/10]

static< C extends WrappedConfig > C org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Path path,
Class< C > configCreatorClass )
inlinestatic

Creates and registers a config with fields derived from the fields of the passed class.

The passed class should have the following characteristics:

  • Has a public no-argument constructor
  • Each non-static non-transient field should be final, not null, and be one of the following types:

Certain annotations can also be used on fields of this class to attach metadata to them. The org.quiltmc.config.api.annotations.Comment annotation is one such annotation that is provided by default, but additional ConfigFieldAnnotationProcessors can be registered with ConfigFieldAnnotationProcessor#register(Class, ConfigFieldAnnotationProcessor).

Parameters
familythe mod owning the resulting config file
idthe config's id
pathadditional path elements to include as part of this configs file, e.g. if the path is empty, the config file might be ".minecraft/config/example_mod/id.toml" if the path is "client/gui", the config file might be ".minecraft/config/example_mod/client/gui/id.toml"
configCreatorClassa class as described above
Returns
a

◆ create() [7/10]

static< C extends WrappedConfig > C org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Path path,
Class< C > configCreatorClass,
Config.Creator after )
inlinestatic

Creates and registers a config with fields derived from the fields of the passed class.

The passed class should have the following characteristics:

  • Has a public no-argument constructor
  • Each non-static non-transient field should be final, not null, and be one of the following types:

Certain annotations can also be used on fields of this class to attach metadata to them. The org.quiltmc.config.api.annotations.Comment annotation is one such annotation that is provided by default, but additional ConfigFieldAnnotationProcessors can be registered with ConfigFieldAnnotationProcessor#register(Class, ConfigFieldAnnotationProcessor).

Parameters
familythe mod owning the resulting config file
idthe configs id
pathadditional path elements to include as part of this configs file, e.g. if the path is empty, the config file might be ".minecraft/config/example_mod/id.toml" if the path is "client/gui", the config file might be ".minecraft/config/example_mod/client/gui/id.toml"
configCreatorClassa class as described above
aftera Config.Creator that can be used to configure the resulting config further
Returns
a

◆ create() [8/10]

static< C extends WrappedConfig > C org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Path path,
Config.Creator before,
Class< C > configCreatorClass )
inlinestatic

Creates and registers a config with fields derived from the fields of the passed class.

The passed class should have the following characteristics:

  • Has a public no-argument constructor
  • Each non-static non-transient field should be final, not null, and be one of the following types:

Certain annotations can also be used on fields of this class to attach metadata to them. The org.quiltmc.config.api.annotations.Comment annotation is one such annotation that is provided by default, but additional ConfigFieldAnnotationProcessors can be registered with ConfigFieldAnnotationProcessor#register(Class, ConfigFieldAnnotationProcessor).

Parameters
familythe mod owning the resulting config file
idthe config's id
pathadditional path elements to include as part of this configs file, e.g. if the path is empty, the config file might be ".minecraft/config/example_mod/id.toml" if the path is "client/gui", the config file might be ".minecraft/config/example_mod/client/gui/id.toml"
beforea Config.Creator that can be used to configure the resulting config further
configCreatorClassa class as described above
Returns
a

◆ create() [9/10]

static< C extends WrappedConfig > C org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Path path,
Config.Creator before,
Class< C > configCreatorClass,
Config.Creator after )
inlinestatic

Creates and registers a config with fields derived from the fields of the passed class.

The passed class should have the following characteristics:

  • Has a public no-argument constructor
  • Each non-static non-transient field should be final, not null, and be one of the following types:

Certain annotations can also be used on fields of this class to attach metadata to them. The org.quiltmc.config.api.annotations.Comment annotation is one such annotation that is provided by default, but additional ConfigFieldAnnotationProcessors can be registered with ConfigFieldAnnotationProcessor#register(Class, ConfigFieldAnnotationProcessor).

Parameters
familythe mod owning the resulting config file
idthe config's id
pathadditional path elements to include as part of this configs file, e.g. if the path is empty, the config file might be ".minecraft/config/example_mod/id.toml" if the path is "client/gui", the config file might be ".minecraft/config/example_mod/client/gui/id.toml"
beforea Config.Creator that can be used to configure the resulting config further
configCreatorClassa class as described above
aftera Config.Creator that can be used to configure the resulting config further
Returns
a

◆ create() [10/10]

Config org.quiltmc.loader.api.config.QuiltConfig.create ( String family,
String id,
Path path,
Config.Creator... creators )
inlinestatic

Creates and registers a config file.

Parameters
familythe mod owning the resulting config file
idthe configs id
pathadditional path elements to include as part of this configs file, e.g. if the path is empty, the config file might be ".minecraft/config/example_mod/id.toml" if the path is "client/gui", the config file might be ".minecraft/config/example_mod/client/gui/id.toml"
creatorsany number of Config.Creators that can be used to configure the resulting config

The documentation for this class was generated from the following file:
  • src/main/java/org/quiltmc/loader/api/config/QuiltConfig.java