@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface BetterConfig
| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String |
modid
The id of the mod that this config belongs to.
|
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
addDefaultsToComments
If true, the defaults of value-, list-, and map-fields will be written to the config file.
|
boolean |
addRangesToComments
If true, the range of number-fields, if specified, will be written to the config file.
|
boolean |
bigCategoryComments
If true, category comments will be guarded, as they are in Forge.
|
java.lang.String |
category
The name of the category where all the top level settings (static fields) of this config will be stored in.
|
BetterConfig.ConfigComparator[] |
elementOrder
Defines the ordering for elements in this configuration.
|
boolean |
lowerCaseCategories
If true, category names will always be lowercase, as they are in Forge.
|
java.lang.String |
name
The name of the config file where this config will be stored in.
|
boolean |
removeDeprecatedEntries
If true, entries only present in the config file will be removed.
|
java.lang.String |
version
If non-empty, the version will be written to the config file as
~CONFIG_VERSION(<CATEGORY_NAME>): <VERSION>. |
public abstract java.lang.String modid
public abstract java.lang.String name
modid() will used instead.public abstract java.lang.String category
public abstract java.lang.String version
~CONFIG_VERSION(<CATEGORY_NAME>): <VERSION>. The config file's version will be
available in the BetterConfig.AfterRead callback, allowing for migration of old configs.public abstract boolean lowerCaseCategories
public abstract boolean bigCategoryComments
##########################################################################################################
# defaults
#--------------------------------------------------------------------------------------------------------#
# Default configuration for forge chunk loading control
##########################################################################################################
defaults { ... }
# Default configuration for forge chunk loading control
defaults { ... }
public abstract boolean addRangesToComments
Config.RangeInt,
Config.RangeDouble,
RangeLongpublic abstract boolean addDefaultsToComments
public abstract boolean removeDeprecatedEntries
public abstract BetterConfig.ConfigComparator[] elementOrder
Comparators are applied sequentially. If a comparator considers two elements equal, the next comparator is used to determine the order.
Possible values:EXPLICIT – Orders elements by the value of their @Order annotation.CATEGORIES_FIRST – Category elements come first.CATEGORIES_LAST – Category elements come last.NON_MAP_CATEGORIES_FIRST – Non-map-category elements come first.NON_MAP_CATEGORIES_LAST – Non-map-category elements come last.NAME_CASE_SENSITIVE – Orders elements by comparing their name lexicographically, case-sensitively.NAME_CASE_INSENSITIVE – Orders elements by comparing their name lexicographically, ignoring case.INITIALIZATION – WARNING, READ CAREFULLY! Attempts to order elements by their initialization order. The JVM does not provide a guaranteed way to retrieve field initialization order at runtime. BetterConfig analyzes the class bytecode to approximate this order. While this works in most cases, correctness and stability are not guaranteed.