Package net.minecraftforge.common
Class ForgeConfigSpec.Builder
java.lang.Object
net.minecraftforge.common.ForgeConfigSpec.Builder
- Enclosing class:
- ForgeConfigSpec
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate ForgeConfigSpec.BuilderContext
private com.electronwill.nightconfig.core.Config
private List<ForgeConfigSpec.ConfigValue<?>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
<T> org.apache.commons.lang3.tuple.Pair<T,ForgeConfigSpec>
configure(Function<ForgeConfigSpec.Builder,T> consumer)
<T> ForgeConfigSpec.ConfigValue<T>
<T> ForgeConfigSpec.ConfigValue<T>
<T> ForgeConfigSpec.ConfigValue<T>
<T> ForgeConfigSpec.ConfigValue<T>
<T> ForgeConfigSpec.ConfigValue<T>
define(List<String> path, Supplier<T> defaultSupplier, Predicate<Object> validator, Class<?> clazz)
<T> ForgeConfigSpec.ConfigValue<T>
define(List<String> path, ForgeConfigSpec.ValueSpec value, Supplier<T> defaultSupplier)
<T> ForgeConfigSpec.ConfigValue<T>
<T> ForgeConfigSpec.ConfigValue<T>
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(String path, Supplier<V> defaultSupplier, com.electronwill.nightconfig.core.EnumGetMethod converter, Predicate<Object> validator, Class<V> clazz)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V><V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(String path, V defaultValue)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Collection<V> acceptableValues)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Predicate<Object> validator)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(String path, V defaultValue, Collection<V> acceptableValues)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(String path, V defaultValue, Predicate<Object> validator)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(String path, V defaultValue, V... acceptableValues)
<V extends Enum<V>>
ForgeConfigSpec.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>>
ForgeConfigSpec.EnumValue<V>defineEnum(List<String> path, Supplier<V> defaultSupplier, Predicate<Object> validator, Class<V> clazz)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(List<String> path, V defaultValue)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Collection<V> acceptableValues)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Predicate<Object> validator)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(List<String> path, V defaultValue, Collection<V> acceptableValues)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(List<String> path, V defaultValue, Predicate<Object> validator)
<V extends Enum<V>>
ForgeConfigSpec.EnumValue<V>defineEnum(List<String> path, V defaultValue, V... acceptableValues)
<T> ForgeConfigSpec.ConfigValue<T>
defineInList(String path, Supplier<T> defaultSupplier, Collection<? extends T> acceptableValues)
<T> ForgeConfigSpec.ConfigValue<T>
defineInList(String path, T defaultValue, Collection<? extends T> acceptableValues)
<T> ForgeConfigSpec.ConfigValue<T>
defineInList(List<String> path, Supplier<T> defaultSupplier, Collection<? extends T> acceptableValues)
<T> ForgeConfigSpec.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>>
ForgeConfigSpec.ConfigValue<V>defineInRange(String path, Supplier<V> defaultSupplier, V min, V max, Class<V> clazz)
<V extends Comparable<? super V>>
ForgeConfigSpec.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>>
ForgeConfigSpec.ConfigValue<V>defineInRange(List<String> path, Supplier<V> defaultSupplier, V min, V max, Class<V> clazz)
<V extends Comparable<? super V>>
ForgeConfigSpec.ConfigValue<V>defineInRange(List<String> path, V defaultValue, V min, V max, Class<V> clazz)
<T> ForgeConfigSpec.ConfigValue<List<? extends T>>
defineList(String path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator)
<T> ForgeConfigSpec.ConfigValue<List<? extends T>>
defineList(String path, List<? extends T> defaultValue, Predicate<Object> elementValidator)
<T> ForgeConfigSpec.ConfigValue<List<? extends T>>
defineList(List<String> path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator)
<T> ForgeConfigSpec.ConfigValue<List<? extends T>>
<T> ForgeConfigSpec.ConfigValue<List<? extends T>>
defineListAllowEmpty(List<String> path, Supplier<List<? extends T>> defaultSupplier, Predicate<Object> elementValidator)
pop()
pop(int count)
translation(String translationKey)
-
Field Details
-
storage
private final com.electronwill.nightconfig.core.Config storage -
context
-
levelComments
-
currentPath
-
values
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
define
-
define
-
define
public <T> ForgeConfigSpec.ConfigValue<T> define(String path, T defaultValue, Predicate<Object> validator) -
define
public <T> ForgeConfigSpec.ConfigValue<T> define(List<String> path, T defaultValue, Predicate<Object> validator) -
define
public <T> ForgeConfigSpec.ConfigValue<T> define(String path, Supplier<T> defaultSupplier, Predicate<Object> validator) -
define
-
define
-
define
public <T> ForgeConfigSpec.ConfigValue<T> define(List<String> path, ForgeConfigSpec.ValueSpec value, Supplier<T> defaultSupplier) -
defineInRange
public <V extends Comparable<? super V>> ForgeConfigSpec.ConfigValue<V> defineInRange(String path, V defaultValue, V min, V max, Class<V> clazz) -
defineInRange
public <V extends Comparable<? super V>> ForgeConfigSpec.ConfigValue<V> defineInRange(List<String> path, V defaultValue, V min, V max, Class<V> clazz) -
defineInRange
public <V extends Comparable<? super V>> ForgeConfigSpec.ConfigValue<V> defineInRange(String path, Supplier<V> defaultSupplier, V min, V max, Class<V> clazz) -
defineInRange
public <V extends Comparable<? super V>> ForgeConfigSpec.ConfigValue<V> defineInRange(List<String> path, Supplier<V> defaultSupplier, V min, V max, Class<V> clazz) -
defineInList
public <T> ForgeConfigSpec.ConfigValue<T> defineInList(String path, T defaultValue, Collection<? extends T> acceptableValues) -
defineInList
public <T> ForgeConfigSpec.ConfigValue<T> defineInList(String path, Supplier<T> defaultSupplier, Collection<? extends T> acceptableValues) -
defineInList
public <T> ForgeConfigSpec.ConfigValue<T> defineInList(List<String> path, T defaultValue, Collection<? extends T> acceptableValues) -
defineInList
public <T> ForgeConfigSpec.ConfigValue<T> defineInList(List<String> path, Supplier<T> defaultSupplier, Collection<? extends T> acceptableValues) -
defineList
-
defineList
-
defineList
-
defineList
-
defineListAllowEmpty
-
defineEnum
-
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, V... acceptableValues) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, V... acceptableValues) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, V... acceptableValues) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, Collection<V> acceptableValues) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Collection<V> acceptableValues) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, Collection<V> acceptableValues) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(List<String> path, V defaultValue, com.electronwill.nightconfig.core.EnumGetMethod converter, Collection<V> acceptableValues) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.EnumValue<V> defineEnum(String path, V defaultValue, Predicate<Object> validator) -
defineEnum
public <V extends Enum<V>> ForgeConfigSpec.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 ForgeConfigSpec.DoubleValue defineInRange(String path, double defaultValue, double min, double max) -
defineInRange
public ForgeConfigSpec.DoubleValue defineInRange(List<String> path, double defaultValue, double min, double max) -
defineInRange
public ForgeConfigSpec.DoubleValue defineInRange(String path, Supplier<Double> defaultSupplier, double min, double max) -
defineInRange
public ForgeConfigSpec.DoubleValue defineInRange(List<String> path, Supplier<Double> defaultSupplier, double min, double max) -
defineInRange
-
defineInRange
public ForgeConfigSpec.IntValue defineInRange(List<String> path, int defaultValue, int min, int max) -
defineInRange
public ForgeConfigSpec.IntValue defineInRange(String path, Supplier<Integer> defaultSupplier, int min, int max) -
defineInRange
public ForgeConfigSpec.IntValue defineInRange(List<String> path, Supplier<Integer> defaultSupplier, int min, int max) -
defineInRange
-
defineInRange
public ForgeConfigSpec.LongValue defineInRange(List<String> path, long defaultValue, long min, long max) -
defineInRange
public ForgeConfigSpec.LongValue defineInRange(String path, Supplier<Long> defaultSupplier, long min, long max) -
defineInRange
public ForgeConfigSpec.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,ForgeConfigSpec> configure(Function<ForgeConfigSpec.Builder,T> consumer) -
build
-