Class ModConfigSpec.Builder
- Enclosing class:
ModConfigSpec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ModConfigSpec.BuilderContext
private final com.electronwill.nightconfig.core.Config
private final List
<ModConfigSpec.ConfigValue<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
<T> org.apache.commons.lang3.tuple.Pair
<T, ModConfigSpec> configure
(Function<ModConfigSpec.Builder, T> consumer) <T> ModConfigSpec.ConfigValue
<T> <T> ModConfigSpec.ConfigValue
<T> <T> ModConfigSpec.ConfigValue
<T> <T> ModConfigSpec.ConfigValue
<T> <T> ModConfigSpec.ConfigValue
<T> <T> ModConfigSpec.ConfigValue
<T> define
(List<String> path, ModConfigSpec.ValueSpec value, Supplier<T> defaultSupplier) <T> ModConfigSpec.ConfigValue
<T> <T> ModConfigSpec.ConfigValue
<T> <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(String path, Supplier<V> defaultSupplier, com.electronwill.nightconfig.core.EnumGetMethod converter, Predicate<Object> validator, Class<V> clazz) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(String path, V defaultValue) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Collection<V> acceptableValues) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Predicate<Object> validator) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(String path, V defaultValue, Collection<V> acceptableValues) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(String path, V defaultValue, Predicate<Object> validator) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(String path, V defaultValue, V... acceptableValues) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, Supplier<V> defaultSupplier, com.electronwill.nightconfig.core.EnumGetMethod converter, Predicate<Object> validator, Class<V> clazz) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, Supplier<V> defaultSupplier, Predicate<Object> validator, Class<V> clazz) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, V defaultValue) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Collection<V> acceptableValues) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Predicate<Object> validator) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, V defaultValue, Collection<V> acceptableValues) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, V defaultValue, Predicate<Object> validator) <V extends Enum<V>>
ModConfigSpec.EnumValue<V> defineEnum
(List<String> path, V defaultValue, V... acceptableValues) <T> ModConfigSpec.ConfigValue
<T> defineInList
(String path, Supplier<T> defaultSupplier, Collection<? extends T> acceptableValues) <T> ModConfigSpec.ConfigValue
<T> defineInList
(String path, T defaultValue, Collection<? extends T> acceptableValues) <T> ModConfigSpec.ConfigValue
<T> defineInList
(List<String> path, Supplier<T> defaultSupplier, Collection<? extends T> acceptableValues) <T> ModConfigSpec.ConfigValue
<T> defineInList
(List<String> path, T defaultValue, Collection<? extends T> acceptableValues) defineInRange
(String path, double defaultValue, double min, double max) defineInRange
(String path, int defaultValue, int min, int max) defineInRange
(String path, long defaultValue, long min, long max) defineInRange
(String path, Supplier<Double> defaultSupplier, double min, double max) defineInRange
(String path, Supplier<Integer> defaultSupplier, int min, int max) defineInRange
(String path, Supplier<Long> defaultSupplier, long min, long max) <V extends Comparable<? super V>>
ModConfigSpec.ConfigValue<V> defineInRange
(String path, Supplier<V> defaultSupplier, V min, V max, Class<V> clazz) <V extends Comparable<? super V>>
ModConfigSpec.ConfigValue<V> defineInRange
(String path, V defaultValue, V min, V max, Class<V> clazz) defineInRange
(List<String> path, double defaultValue, double min, double max) defineInRange
(List<String> path, int defaultValue, int min, int max) defineInRange
(List<String> path, long defaultValue, long min, long max) defineInRange
(List<String> path, Supplier<Double> defaultSupplier, double min, double max) defineInRange
(List<String> path, Supplier<Integer> defaultSupplier, int min, int max) defineInRange
(List<String> path, Supplier<Long> defaultSupplier, long min, long max) <V extends Comparable<? super V>>
ModConfigSpec.ConfigValue<V> defineInRange
(List<String> path, Supplier<V> defaultSupplier, V min, V max, Class<V> clazz) <V extends Comparable<? super V>>
ModConfigSpec.ConfigValue<V> defineInRange
(List<String> path, V defaultValue, V min, V max, Class<V> clazz) <T> ModConfigSpec.ConfigValue
<List<? extends T>> defineList
(String path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) Deprecated.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineList
(String path, Supplier<List<? extends T>> defaultSupplier, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineList(List, Supplier, Supplier, Predicate)
for details.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineList
(String path, List<? extends T> defaultValue, Predicate<Object> elementValidator) Deprecated.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineList
(String path, List<? extends T> defaultValue, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineList(List, Supplier, Supplier, Predicate)
for details.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineList
(List<String> path, Supplier<List<? extends T>> defaultSupplier, @Nullable Supplier<T> newElementSupplier, Predicate<Object> elementValidator, @Nullable ModConfigSpec.Range<Integer> sizeRange) Build a new config value that holds aList
.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineList
(List<String> path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) Deprecated.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineList
(List<String> path, Supplier<List<? extends T>> defaultSupplier, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) Build a new config value that holds aList
.<T> ModConfigSpec.ConfigValue
<List<? extends T>> Deprecated.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineList
(List<String> path, List<? extends T> defaultValue, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineList(List, Supplier, Supplier, Predicate)
for details.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineListAllowEmpty
(String path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) Deprecated.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineListAllowEmpty
(String path, Supplier<List<? extends T>> defaultSupplier, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineListAllowEmpty
(String path, List<? extends T> defaultValue, Predicate<Object> elementValidator) Deprecated.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineListAllowEmpty
(String path, List<? extends T> defaultValue, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineListAllowEmpty
(List<String> path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) Deprecated.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineListAllowEmpty
(List<String> path, Supplier<List<? extends T>> defaultSupplier, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) Build a new config value that holds aList
.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineListAllowEmpty
(List<String> path, List<? extends T> defaultValue, Predicate<Object> elementValidator) Deprecated.<T> ModConfigSpec.ConfigValue
<List<? extends T>> defineListAllowEmpty
(List<String> path, List<? extends T> defaultValue, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.Config values marked as needing a game restart will never reset their cached value.pop()
pop
(int count) translation
(String translationKey) Config values marked as needing a world restart will not reset their cached value until they are unloaded (i.e. when a world is closed).
-
Field Details
-
spec
private final com.electronwill.nightconfig.core.Config spec -
context
-
levelComments
-
levelTranslationKeys
-
currentPath
-
values
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
define
-
define
-
define
public <T> ModConfigSpec.ConfigValue<T> define(String path, T defaultValue, Predicate<Object> validator) -
define
public <T> ModConfigSpec.ConfigValue<T> define(List<String> path, T defaultValue, Predicate<Object> validator) -
define
public <T> ModConfigSpec.ConfigValue<T> define(String path, Supplier<T> defaultSupplier, Predicate<Object> validator) -
define
-
define
-
define
public <T> ModConfigSpec.ConfigValue<T> define(List<String> path, ModConfigSpec.ValueSpec value, Supplier<T> defaultSupplier) -
defineInRange
public <V extends Comparable<? super V>> ModConfigSpec.ConfigValue<V> defineInRange(String path, V defaultValue, V min, V max, Class<V> clazz) -
defineInRange
public <V extends Comparable<? super V>> ModConfigSpec.ConfigValue<V> defineInRange(List<String> path, V defaultValue, V min, V max, Class<V> clazz) -
defineInRange
public <V extends Comparable<? super V>> ModConfigSpec.ConfigValue<V> defineInRange(String path, Supplier<V> defaultSupplier, V min, V max, Class<V> clazz) -
defineInRange
public <V extends Comparable<? super V>> ModConfigSpec.ConfigValue<V> defineInRange(List<String> path, Supplier<V> defaultSupplier, V min, V max, Class<V> clazz) -
defineInList
public <T> ModConfigSpec.ConfigValue<T> defineInList(String path, T defaultValue, Collection<? extends T> acceptableValues) -
defineInList
public <T> ModConfigSpec.ConfigValue<T> defineInList(String path, Supplier<T> defaultSupplier, Collection<? extends T> acceptableValues) -
defineInList
public <T> ModConfigSpec.ConfigValue<T> defineInList(List<String> path, T defaultValue, Collection<? extends T> acceptableValues) -
defineInList
public <T> ModConfigSpec.ConfigValue<T> defineInList(List<String> path, Supplier<T> defaultSupplier, Collection<? extends T> acceptableValues) -
defineList
@Deprecated public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineList(String path, List<? extends T> defaultValue, Predicate<Object> elementValidator) Deprecated.SeedefineList(List, Supplier, Supplier, Predicate)
for details.This variant takes its key as a string and splits it on ".".
This variant takes its default value directly and wraps it in a supplier.
This variant has no supplier for new elements, so no new elements can be added in the config UI. -
defineList
public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineList(String path, List<? extends T> defaultValue, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineList(List, Supplier, Supplier, Predicate)
for details.This variant takes its key as a string and splits it on ".".
This variant takes its default value directly and wraps it in a supplier. -
defineList
@Deprecated public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineList(String path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) Deprecated.SeedefineList(List, Supplier, Supplier, Predicate)
for details.This variant takes its key as a string and splits it on ".".
This variant has no supplier for new elements, so no new elements can be added in the config UI. -
defineList
public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineList(String path, Supplier<List<? extends T>> defaultSupplier, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineList(List, Supplier, Supplier, Predicate)
for details.This variant takes its key as a string and splits it on ".".
-
defineList
@Deprecated public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineList(List<String> path, List<? extends T> defaultValue, Predicate<Object> elementValidator) Deprecated.SeedefineList(List, Supplier, Supplier, Predicate)
for details.This variant takes its default value directly and wraps it in a supplier.
This variant has no supplier for new elements, so no new elements can be added in the config UI. -
defineList
public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineList(List<String> path, List<? extends T> defaultValue, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineList(List, Supplier, Supplier, Predicate)
for details.This variant takes its default value directly and wraps it in a supplier.
-
defineList
@Deprecated public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineList(List<String> path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) Deprecated.SeedefineList(List, Supplier, Supplier, Predicate)
for details.This variant has no supplier for new elements, so no new elements can be added in the config UI.
-
defineList
public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineList(List<String> path, Supplier<List<? extends T>> defaultSupplier, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) Build a new config value that holds aList
.This list cannot be empty. See also
defineList(List, Supplier, Supplier, Predicate, Range)
for more control over the list size.- Type Parameters:
T
- The class of element of the list. Directly supported areString
,Boolean
,Integer
,Long
andDouble
. Other classes will be saved using their string representation and will be read back from the config file as strings.- Parameters:
path
- The key for the config value in list form, i.e. pre-split into section and key.defaultSupplier
- ASupplier
for the default value of the list. This will be used if the config file doesn't exist or if it reads as invalid.newElementSupplier
- ASupplier
for new elements to be added to the list. This is only used in the UI when the user presses the "add" button. The supplied value doesn't have to validate as correct, but it should provide a good starting point for the user to make it correct. If this parameter is null, there will be no "add" button in the UI (if the default UI is used).elementValidator
- APredicate
to verify if a list element is valid. Elements that are read from the config file are removed from the list if the validator rejects them.- Returns:
- A
ModConfigSpec.ConfigValue
object that can be used to access the config value and that will live-update if the value changed, i.e. because the config file was updated or the config UI was used.
-
defineListAllowEmpty
@Deprecated public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineListAllowEmpty(String path, List<? extends T> defaultValue, Predicate<Object> elementValidator) Deprecated.SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.This variant takes its key as a string and splits it on ".".
This variant takes its default value directly and wraps it in a supplier.
This variant has no supplier for new elements, so no new elements can be added in the config UI. -
defineListAllowEmpty
public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineListAllowEmpty(String path, List<? extends T> defaultValue, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.This variant takes its key as a string and splits it on ".".
This variant takes its default value directly and wraps it in a supplier. -
defineListAllowEmpty
@Deprecated public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineListAllowEmpty(String path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) Deprecated.SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.This variant takes its key as a string and splits it on ".".
This variant has no supplier for new elements, so no new elements can be added in the config UI. -
defineListAllowEmpty
public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineListAllowEmpty(String path, Supplier<List<? extends T>> defaultSupplier, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.This variant takes its key as a string and splits it on ".".
-
defineListAllowEmpty
@Deprecated public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineListAllowEmpty(List<String> path, List<? extends T> defaultValue, Predicate<Object> elementValidator) Deprecated.SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.This variant takes its default value directly and wraps it in a supplier.
This variant has no supplier for new elements, so no new elements can be added in the config UI. -
defineListAllowEmpty
public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineListAllowEmpty(List<String> path, List<? extends T> defaultValue, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.This variant takes its default value directly and wraps it in a supplier.
-
defineListAllowEmpty
@Deprecated public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineListAllowEmpty(List<String> path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) Deprecated.SeedefineListAllowEmpty(List, Supplier, Supplier, Predicate)
for details.This variant has no supplier for new elements, so no new elements can be added in the config UI.
-
defineListAllowEmpty
public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineListAllowEmpty(List<String> path, Supplier<List<? extends T>> defaultSupplier, Supplier<T> newElementSupplier, Predicate<Object> elementValidator) Build a new config value that holds aList
.This list can be empty. See also
defineList(List, Supplier, Supplier, Predicate, Range)
for more control over the list size.- Type Parameters:
T
- The class of element of the list. Directly supported areString
,Boolean
,Integer
,Long
andDouble
. Other classes will be saved using their string representation and will be read back from the config file as strings.- Parameters:
path
- The key for the config value in list form, i.e. pre-split into section and key.defaultSupplier
- ASupplier
for the default value of the list. This will be used if the config file doesn't exist or if it reads as invalid.newElementSupplier
- ASupplier
for new elements to be added to the list. This is only used in the UI when the user presses the "add" button. The supplied value doesn't have to validate as correct, but it should provide a good starting point for the user to make it correct. If this parameter is null, there will be no "add" button in the UI (if the default UI is used).elementValidator
- APredicate
to verify if a list element is valid. Elements that are read from the config file are removed from the list if the validator rejects them.- Returns:
- A
ModConfigSpec.ConfigValue
object that can be used to access the config value and that will live-update if the value changed, i.e. because the config file was updated or the config UI was used.
-
defineList
public <T> ModConfigSpec.ConfigValue<List<? extends T>> defineList(List<String> path, Supplier<List<? extends T>> defaultSupplier, @Nullable @Nullable Supplier<T> newElementSupplier, Predicate<Object> elementValidator, @Nullable @Nullable ModConfigSpec.Range<Integer> sizeRange) Build a new config value that holds aList
.- Type Parameters:
T
- The class of element of the list. Directly supported areString
,Boolean
,Integer
,Long
andDouble
. Other classes will be saved using their string representation and will be read back from the config file as strings.- Parameters:
path
- The key for the config value in list form, i.e. pre-split into section and key.defaultSupplier
- ASupplier
for the default value of the list. This will be used if the config file doesn't exist or if it reads as invalid.newElementSupplier
- ASupplier
for new elements to be added to the list. This is only used in the UI when the user presses the "add" button. The supplied value doesn't have to validate as correct, but it should provide a good starting point for the user to make it correct. If this parameter is null, there will be no "add" button in the UI (if the default UI is used).elementValidator
- APredicate
to verify if a list element is valid. Elements that are read from the config file are removed from the list if the validator rejects them.sizeRange
- AModConfigSpec.Range
defining the valid length of the list. Lists read from the config file that don't validate with this Range will be replaced with the default. Whennull
, the list size is unbounded.- Returns:
- A
ModConfigSpec.ConfigValue
object that can be used to access the config value and that will live-update if the value changed, i.e. because the config file was updated or the config UI was used.
-
defineEnum
-
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter) -
defineEnum
-
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, V... acceptableValues) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, V... acceptableValues) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, Collection<V> acceptableValues) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Collection<V> acceptableValues) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, Collection<V> acceptableValues) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Collection<V> acceptableValues) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, Predicate<Object> validator) -
defineEnum
public <V extends Enum<V>> ModConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Predicate<Object> validator) -
defineEnum
-
defineEnum
-
defineEnum
-
defineEnum
-
defineEnum
-
defineEnum
-
define
-
define
-
define
-
define
-
defineInRange
public ModConfigSpec.DoubleValue defineInRange(String path, double defaultValue, double min, double max) -
defineInRange
public ModConfigSpec.DoubleValue defineInRange(List<String> path, double defaultValue, double min, double max) -
defineInRange
public ModConfigSpec.DoubleValue defineInRange(String path, Supplier<Double> defaultSupplier, double min, double max) -
defineInRange
public ModConfigSpec.DoubleValue defineInRange(List<String> path, Supplier<Double> defaultSupplier, double min, double max) -
defineInRange
-
defineInRange
-
defineInRange
public ModConfigSpec.IntValue defineInRange(String path, Supplier<Integer> defaultSupplier, int min, int max) -
defineInRange
public ModConfigSpec.IntValue defineInRange(List<String> path, Supplier<Integer> defaultSupplier, int min, int max) -
defineInRange
-
defineInRange
public ModConfigSpec.LongValue defineInRange(List<String> path, long defaultValue, long min, long max) -
defineInRange
public ModConfigSpec.LongValue defineInRange(String path, Supplier<Long> defaultSupplier, long min, long max) -
defineInRange
public ModConfigSpec.LongValue defineInRange(List<String> path, Supplier<Long> defaultSupplier, long min, long max) -
comment
-
comment
-
translation
-
worldRestart
Config values marked as needing a world restart will not reset their cached value until they are unloaded (i.e. when a world is closed). -
gameRestart
Config values marked as needing a game restart will never reset their cached value. -
push
-
push
-
pop
-
pop
-
configure
public <T> org.apache.commons.lang3.tuple.Pair<T,ModConfigSpec> configure(Function<ModConfigSpec.Builder, T> consumer) -
build
-
defineList(String, Supplier, Supplier, Predicate)