Package net.neoforged.neoforge.common
Class ModConfigSpec.Builder
java.lang.Object
net.neoforged.neoforge.common.ModConfigSpec.Builder
- Enclosing class:
 - ModConfigSpec
 
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ModConfigSpec.BuilderContextprivate final com.electronwill.nightconfig.core.Configprivate 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) <T> ModConfigSpec.ConfigValue<List<? extends T>>defineList(String path, List<? extends T> defaultValue, Predicate<Object> elementValidator) <T> ModConfigSpec.ConfigValue<List<? extends T>>defineList(List<String> path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) <T> ModConfigSpec.ConfigValue<List<? extends T>><T> ModConfigSpec.ConfigValue<List<? extends T>>defineListAllowEmpty(String path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) <T> ModConfigSpec.ConfigValue<List<? extends T>>defineListAllowEmpty(String path, List<? extends T> defaultValue, Predicate<Object> elementValidator) <T> ModConfigSpec.ConfigValue<List<? extends T>>defineListAllowEmpty(List<String> path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator) <T> ModConfigSpec.ConfigValue<List<? extends T>>defineListAllowEmpty(List<String> path, List<? extends T> defaultValue, Predicate<Object> elementValidator) pop()pop(int count) translation(String translationKey)  
- 
Field Details
- 
storage
private final com.electronwill.nightconfig.core.Config storage - 
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
 - 
defineList
 - 
defineList
 - 
defineList
 - 
defineListAllowEmpty
 - 
defineListAllowEmpty
 - 
defineListAllowEmpty
 - 
defineListAllowEmpty
 - 
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
 - 
push
 - 
push
 - 
pop
 - 
pop
 - 
configure
public <T> org.apache.commons.lang3.tuple.Pair<T,ModConfigSpec> configure(Function<ModConfigSpec.Builder, T> consumer)  - 
build
 
 -