public static class ForgeConfigSpec.Builder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ForgeConfigSpec.Builder.BuilderConsumer |
Modifier and Type | Field and Description |
---|---|
private ForgeConfigSpec.BuilderContext |
context |
private java.util.List<java.lang.String> |
currentPath |
private java.util.Map<java.util.List<java.lang.String>,java.lang.String> |
levelComments |
private com.electronwill.nightconfig.core.Config |
storage |
private java.util.List<ForgeConfigSpec.ConfigValue<?>> |
values |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ForgeConfigSpec |
build() |
ForgeConfigSpec.Builder |
comment(java.lang.String... comment) |
ForgeConfigSpec.Builder |
comment(java.lang.String comment) |
<T> org.apache.commons.lang3.tuple.Pair<T,ForgeConfigSpec> |
configure(java.util.function.Function<ForgeConfigSpec.Builder,T> consumer) |
ForgeConfigSpec.BooleanValue |
define(java.util.List<java.lang.String> path,
boolean defaultValue) |
<T> ForgeConfigSpec.ConfigValue<T> |
define(java.util.List<java.lang.String> path,
ForgeConfigSpec.ValueSpec value,
java.util.function.Supplier<T> defaultSupplier) |
ForgeConfigSpec.BooleanValue |
define(java.util.List<java.lang.String> path,
java.util.function.Supplier<java.lang.Boolean> defaultSupplier) |
<T> ForgeConfigSpec.ConfigValue<T> |
define(java.util.List<java.lang.String> path,
java.util.function.Supplier<T> defaultSupplier,
java.util.function.Predicate<java.lang.Object> validator) |
<T> ForgeConfigSpec.ConfigValue<T> |
define(java.util.List<java.lang.String> path,
java.util.function.Supplier<T> defaultSupplier,
java.util.function.Predicate<java.lang.Object> validator,
java.lang.Class<?> clazz) |
<T> ForgeConfigSpec.ConfigValue<T> |
define(java.util.List<java.lang.String> path,
T defaultValue) |
<T> ForgeConfigSpec.ConfigValue<T> |
define(java.util.List<java.lang.String> path,
T defaultValue,
java.util.function.Predicate<java.lang.Object> validator) |
ForgeConfigSpec.BooleanValue |
define(java.lang.String path,
boolean defaultValue) |
ForgeConfigSpec.BooleanValue |
define(java.lang.String path,
java.util.function.Supplier<java.lang.Boolean> defaultSupplier) |
<T> ForgeConfigSpec.ConfigValue<T> |
define(java.lang.String path,
java.util.function.Supplier<T> defaultSupplier,
java.util.function.Predicate<java.lang.Object> validator) |
<T> ForgeConfigSpec.ConfigValue<T> |
define(java.lang.String path,
T defaultValue) |
<T> ForgeConfigSpec.ConfigValue<T> |
define(java.lang.String path,
T defaultValue,
java.util.function.Predicate<java.lang.Object> validator) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
java.util.function.Supplier<V> defaultSupplier,
com.electronwill.nightconfig.core.EnumGetMethod converter,
java.util.function.Predicate<java.lang.Object> validator,
java.lang.Class<V> clazz) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
java.util.function.Supplier<V> defaultSupplier,
java.util.function.Predicate<java.lang.Object> validator,
java.lang.Class<V> clazz) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
V defaultValue) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
V defaultValue,
java.util.Collection<V> acceptableValues) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
V defaultValue,
com.electronwill.nightconfig.core.EnumGetMethod converter) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
V defaultValue,
com.electronwill.nightconfig.core.EnumGetMethod converter,
java.util.Collection<V> acceptableValues) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
V defaultValue,
com.electronwill.nightconfig.core.EnumGetMethod converter,
java.util.function.Predicate<java.lang.Object> validator) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
V defaultValue,
com.electronwill.nightconfig.core.EnumGetMethod converter,
V... acceptableValues) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
V defaultValue,
java.util.function.Predicate<java.lang.Object> validator) |
<V extends java.lang.Enum<V>> |
defineEnum(java.util.List<java.lang.String> path,
V defaultValue,
V... acceptableValues) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
java.util.function.Supplier<V> defaultSupplier,
com.electronwill.nightconfig.core.EnumGetMethod converter,
java.util.function.Predicate<java.lang.Object> validator,
java.lang.Class<V> clazz) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
java.util.function.Supplier<V> defaultSupplier,
java.util.function.Predicate<java.lang.Object> validator,
java.lang.Class<V> clazz) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
V defaultValue) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
V defaultValue,
java.util.Collection<V> acceptableValues) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
V defaultValue,
com.electronwill.nightconfig.core.EnumGetMethod converter) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
V defaultValue,
com.electronwill.nightconfig.core.EnumGetMethod converter,
java.util.Collection<V> acceptableValues) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
V defaultValue,
com.electronwill.nightconfig.core.EnumGetMethod converter,
java.util.function.Predicate<java.lang.Object> validator) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
V defaultValue,
com.electronwill.nightconfig.core.EnumGetMethod converter,
V... acceptableValues) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
V defaultValue,
java.util.function.Predicate<java.lang.Object> validator) |
<V extends java.lang.Enum<V>> |
defineEnum(java.lang.String path,
V defaultValue,
V... acceptableValues) |
<T> ForgeConfigSpec.ConfigValue<T> |
defineInList(java.util.List<java.lang.String> path,
java.util.function.Supplier<T> defaultSupplier,
java.util.Collection<? extends T> acceptableValues) |
<T> ForgeConfigSpec.ConfigValue<T> |
defineInList(java.util.List<java.lang.String> path,
T defaultValue,
java.util.Collection<? extends T> acceptableValues) |
<T> ForgeConfigSpec.ConfigValue<T> |
defineInList(java.lang.String path,
java.util.function.Supplier<T> defaultSupplier,
java.util.Collection<? extends T> acceptableValues) |
<T> ForgeConfigSpec.ConfigValue<T> |
defineInList(java.lang.String path,
T defaultValue,
java.util.Collection<? extends T> acceptableValues) |
ForgeConfigSpec.DoubleValue |
defineInRange(java.util.List<java.lang.String> path,
double defaultValue,
double min,
double max) |
ForgeConfigSpec.IntValue |
defineInRange(java.util.List<java.lang.String> path,
int defaultValue,
int min,
int max) |
ForgeConfigSpec.LongValue |
defineInRange(java.util.List<java.lang.String> path,
long defaultValue,
long min,
long max) |
ForgeConfigSpec.DoubleValue |
defineInRange(java.util.List<java.lang.String> path,
java.util.function.Supplier<java.lang.Double> defaultSupplier,
double min,
double max) |
ForgeConfigSpec.IntValue |
defineInRange(java.util.List<java.lang.String> path,
java.util.function.Supplier<java.lang.Integer> defaultSupplier,
int min,
int max) |
ForgeConfigSpec.LongValue |
defineInRange(java.util.List<java.lang.String> path,
java.util.function.Supplier<java.lang.Long> defaultSupplier,
long min,
long max) |
<V extends java.lang.Comparable<? super V>> |
defineInRange(java.util.List<java.lang.String> path,
java.util.function.Supplier<V> defaultSupplier,
V min,
V max,
java.lang.Class<V> clazz) |
<V extends java.lang.Comparable<? super V>> |
defineInRange(java.util.List<java.lang.String> path,
V defaultValue,
V min,
V max,
java.lang.Class<V> clazz) |
ForgeConfigSpec.DoubleValue |
defineInRange(java.lang.String path,
double defaultValue,
double min,
double max) |
ForgeConfigSpec.IntValue |
defineInRange(java.lang.String path,
int defaultValue,
int min,
int max) |
ForgeConfigSpec.LongValue |
defineInRange(java.lang.String path,
long defaultValue,
long min,
long max) |
ForgeConfigSpec.DoubleValue |
defineInRange(java.lang.String path,
java.util.function.Supplier<java.lang.Double> defaultSupplier,
double min,
double max) |
ForgeConfigSpec.IntValue |
defineInRange(java.lang.String path,
java.util.function.Supplier<java.lang.Integer> defaultSupplier,
int min,
int max) |
ForgeConfigSpec.LongValue |
defineInRange(java.lang.String path,
java.util.function.Supplier<java.lang.Long> defaultSupplier,
long min,
long max) |
<V extends java.lang.Comparable<? super V>> |
defineInRange(java.lang.String path,
java.util.function.Supplier<V> defaultSupplier,
V min,
V max,
java.lang.Class<V> clazz) |
<V extends java.lang.Comparable<? super V>> |
defineInRange(java.lang.String path,
V defaultValue,
V min,
V max,
java.lang.Class<V> clazz) |
<T> ForgeConfigSpec.ConfigValue<java.util.List<? extends T>> |
defineList(java.util.List<java.lang.String> path,
java.util.List<? extends T> defaultValue,
java.util.function.Predicate<java.lang.Object> elementValidator) |
<T> ForgeConfigSpec.ConfigValue<java.util.List<? extends T>> |
defineList(java.util.List<java.lang.String> path,
java.util.function.Supplier<java.util.List<? extends T>> defaultSupplier,
java.util.function.Predicate<java.lang.Object> elementValidator) |
<T> ForgeConfigSpec.ConfigValue<java.util.List<? extends T>> |
defineList(java.lang.String path,
java.util.List<? extends T> defaultValue,
java.util.function.Predicate<java.lang.Object> elementValidator) |
<T> ForgeConfigSpec.ConfigValue<java.util.List<? extends T>> |
defineList(java.lang.String path,
java.util.function.Supplier<java.util.List<? extends T>> defaultSupplier,
java.util.function.Predicate<java.lang.Object> elementValidator) |
ForgeConfigSpec.Builder |
pop() |
ForgeConfigSpec.Builder |
pop(int count) |
ForgeConfigSpec.Builder |
push(java.util.List<java.lang.String> path) |
ForgeConfigSpec.Builder |
push(java.lang.String path) |
ForgeConfigSpec.Builder |
translation(java.lang.String translationKey) |
ForgeConfigSpec.Builder |
worldRestart() |
private final com.electronwill.nightconfig.core.Config storage
private ForgeConfigSpec.BuilderContext context
private java.util.Map<java.util.List<java.lang.String>,java.lang.String> levelComments
private java.util.List<java.lang.String> currentPath
private java.util.List<ForgeConfigSpec.ConfigValue<?>> values
public <T> ForgeConfigSpec.ConfigValue<T> define(java.lang.String path, T defaultValue)
public <T> ForgeConfigSpec.ConfigValue<T> define(java.util.List<java.lang.String> path, T defaultValue)
public <T> ForgeConfigSpec.ConfigValue<T> define(java.lang.String path, T defaultValue, java.util.function.Predicate<java.lang.Object> validator)
public <T> ForgeConfigSpec.ConfigValue<T> define(java.util.List<java.lang.String> path, T defaultValue, java.util.function.Predicate<java.lang.Object> validator)
public <T> ForgeConfigSpec.ConfigValue<T> define(java.lang.String path, java.util.function.Supplier<T> defaultSupplier, java.util.function.Predicate<java.lang.Object> validator)
public <T> ForgeConfigSpec.ConfigValue<T> define(java.util.List<java.lang.String> path, java.util.function.Supplier<T> defaultSupplier, java.util.function.Predicate<java.lang.Object> validator)
public <T> ForgeConfigSpec.ConfigValue<T> define(java.util.List<java.lang.String> path, java.util.function.Supplier<T> defaultSupplier, java.util.function.Predicate<java.lang.Object> validator, java.lang.Class<?> clazz)
public <T> ForgeConfigSpec.ConfigValue<T> define(java.util.List<java.lang.String> path, ForgeConfigSpec.ValueSpec value, java.util.function.Supplier<T> defaultSupplier)
public <V extends java.lang.Comparable<? super V>> ForgeConfigSpec.ConfigValue<V> defineInRange(java.lang.String path, V defaultValue, V min, V max, java.lang.Class<V> clazz)
public <V extends java.lang.Comparable<? super V>> ForgeConfigSpec.ConfigValue<V> defineInRange(java.util.List<java.lang.String> path, V defaultValue, V min, V max, java.lang.Class<V> clazz)
public <V extends java.lang.Comparable<? super V>> ForgeConfigSpec.ConfigValue<V> defineInRange(java.lang.String path, java.util.function.Supplier<V> defaultSupplier, V min, V max, java.lang.Class<V> clazz)
public <V extends java.lang.Comparable<? super V>> ForgeConfigSpec.ConfigValue<V> defineInRange(java.util.List<java.lang.String> path, java.util.function.Supplier<V> defaultSupplier, V min, V max, java.lang.Class<V> clazz)
public <T> ForgeConfigSpec.ConfigValue<T> defineInList(java.lang.String path, T defaultValue, java.util.Collection<? extends T> acceptableValues)
public <T> ForgeConfigSpec.ConfigValue<T> defineInList(java.lang.String path, java.util.function.Supplier<T> defaultSupplier, java.util.Collection<? extends T> acceptableValues)
public <T> ForgeConfigSpec.ConfigValue<T> defineInList(java.util.List<java.lang.String> path, T defaultValue, java.util.Collection<? extends T> acceptableValues)
public <T> ForgeConfigSpec.ConfigValue<T> defineInList(java.util.List<java.lang.String> path, java.util.function.Supplier<T> defaultSupplier, java.util.Collection<? extends T> acceptableValues)
public <T> ForgeConfigSpec.ConfigValue<java.util.List<? extends T>> defineList(java.lang.String path, java.util.List<? extends T> defaultValue, java.util.function.Predicate<java.lang.Object> elementValidator)
public <T> ForgeConfigSpec.ConfigValue<java.util.List<? extends T>> defineList(java.lang.String path, java.util.function.Supplier<java.util.List<? extends T>> defaultSupplier, java.util.function.Predicate<java.lang.Object> elementValidator)
public <T> ForgeConfigSpec.ConfigValue<java.util.List<? extends T>> defineList(java.util.List<java.lang.String> path, java.util.List<? extends T> defaultValue, java.util.function.Predicate<java.lang.Object> elementValidator)
public <T> ForgeConfigSpec.ConfigValue<java.util.List<? extends T>> defineList(java.util.List<java.lang.String> path, java.util.function.Supplier<java.util.List<? extends T>> defaultSupplier, java.util.function.Predicate<java.lang.Object> elementValidator)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, V defaultValue)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, V defaultValue)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, V defaultValue, V... acceptableValues)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, V defaultValue, V... acceptableValues)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, V defaultValue, java.util.Collection<V> acceptableValues)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, java.util.Collection<V> acceptableValues)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, V defaultValue, java.util.Collection<V> acceptableValues)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, java.util.Collection<V> acceptableValues)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, V defaultValue, java.util.function.Predicate<java.lang.Object> validator)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, java.util.function.Predicate<java.lang.Object> validator)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, V defaultValue, java.util.function.Predicate<java.lang.Object> validator)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, java.util.function.Predicate<java.lang.Object> validator)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, java.util.function.Supplier<V> defaultSupplier, java.util.function.Predicate<java.lang.Object> validator, java.lang.Class<V> clazz)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.lang.String path, java.util.function.Supplier<V> defaultSupplier, com.electronwill.nightconfig.core.EnumGetMethod converter, java.util.function.Predicate<java.lang.Object> validator, java.lang.Class<V> clazz)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, java.util.function.Supplier<V> defaultSupplier, java.util.function.Predicate<java.lang.Object> validator, java.lang.Class<V> clazz)
public <V extends java.lang.Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(java.util.List<java.lang.String> path, java.util.function.Supplier<V> defaultSupplier, com.electronwill.nightconfig.core.EnumGetMethod converter, java.util.function.Predicate<java.lang.Object> validator, java.lang.Class<V> clazz)
public ForgeConfigSpec.BooleanValue define(java.lang.String path, boolean defaultValue)
public ForgeConfigSpec.BooleanValue define(java.util.List<java.lang.String> path, boolean defaultValue)
public ForgeConfigSpec.BooleanValue define(java.lang.String path, java.util.function.Supplier<java.lang.Boolean> defaultSupplier)
public ForgeConfigSpec.BooleanValue define(java.util.List<java.lang.String> path, java.util.function.Supplier<java.lang.Boolean> defaultSupplier)
public ForgeConfigSpec.DoubleValue defineInRange(java.lang.String path, double defaultValue, double min, double max)
public ForgeConfigSpec.DoubleValue defineInRange(java.util.List<java.lang.String> path, double defaultValue, double min, double max)
public ForgeConfigSpec.DoubleValue defineInRange(java.lang.String path, java.util.function.Supplier<java.lang.Double> defaultSupplier, double min, double max)
public ForgeConfigSpec.DoubleValue defineInRange(java.util.List<java.lang.String> path, java.util.function.Supplier<java.lang.Double> defaultSupplier, double min, double max)
public ForgeConfigSpec.IntValue defineInRange(java.lang.String path, int defaultValue, int min, int max)
public ForgeConfigSpec.IntValue defineInRange(java.util.List<java.lang.String> path, int defaultValue, int min, int max)
public ForgeConfigSpec.IntValue defineInRange(java.lang.String path, java.util.function.Supplier<java.lang.Integer> defaultSupplier, int min, int max)
public ForgeConfigSpec.IntValue defineInRange(java.util.List<java.lang.String> path, java.util.function.Supplier<java.lang.Integer> defaultSupplier, int min, int max)
public ForgeConfigSpec.LongValue defineInRange(java.lang.String path, long defaultValue, long min, long max)
public ForgeConfigSpec.LongValue defineInRange(java.util.List<java.lang.String> path, long defaultValue, long min, long max)
public ForgeConfigSpec.LongValue defineInRange(java.lang.String path, java.util.function.Supplier<java.lang.Long> defaultSupplier, long min, long max)
public ForgeConfigSpec.LongValue defineInRange(java.util.List<java.lang.String> path, java.util.function.Supplier<java.lang.Long> defaultSupplier, long min, long max)
public ForgeConfigSpec.Builder comment(java.lang.String comment)
public ForgeConfigSpec.Builder comment(java.lang.String... comment)
public ForgeConfigSpec.Builder translation(java.lang.String translationKey)
public ForgeConfigSpec.Builder worldRestart()
public ForgeConfigSpec.Builder push(java.lang.String path)
public ForgeConfigSpec.Builder push(java.util.List<java.lang.String> path)
public ForgeConfigSpec.Builder pop()
public ForgeConfigSpec.Builder pop(int count)
public <T> org.apache.commons.lang3.tuple.Pair<T,ForgeConfigSpec> configure(java.util.function.Function<ForgeConfigSpec.Builder,T> consumer)
public ForgeConfigSpec build()