Package net.minecraftforge.common
Class ForgeConfigSpec.ConfigValue<T>
- java.lang.Object
-
- net.minecraftforge.common.ForgeConfigSpec.ConfigValue<T>
-
- Direct Known Subclasses:
ForgeConfigSpec.BooleanValue
,ForgeConfigSpec.DoubleValue
,ForgeConfigSpec.EnumValue
,ForgeConfigSpec.IntValue
,ForgeConfigSpec.LongValue
- Enclosing class:
- ForgeConfigSpec
public static class ForgeConfigSpec.ConfigValue<T> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private T
cachedValue
private java.util.function.Supplier<T>
defaultSupplier
private ForgeConfigSpec.Builder
parent
private java.util.List<java.lang.String>
path
private ForgeConfigSpec
spec
(package private) static boolean
USE_CACHES
-
Constructor Summary
Constructors Constructor Description ConfigValue(ForgeConfigSpec.Builder parent, java.util.List<java.lang.String> path, java.util.function.Supplier<T> defaultSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
T
get()
java.util.List<java.lang.String>
getPath()
protected T
getRaw(com.electronwill.nightconfig.core.Config config, java.util.List<java.lang.String> path, java.util.function.Supplier<T> defaultSupplier)
ForgeConfigSpec.Builder
next()
void
save()
void
set(T value)
-
-
-
Field Detail
-
USE_CACHES
static boolean USE_CACHES
-
parent
private final ForgeConfigSpec.Builder parent
-
path
private final java.util.List<java.lang.String> path
-
defaultSupplier
private final java.util.function.Supplier<T> defaultSupplier
-
cachedValue
private T cachedValue
-
spec
private ForgeConfigSpec spec
-
-
Constructor Detail
-
ConfigValue
ConfigValue(ForgeConfigSpec.Builder parent, java.util.List<java.lang.String> path, java.util.function.Supplier<T> defaultSupplier)
-
-
Method Detail
-
getPath
public java.util.List<java.lang.String> getPath()
-
get
public T get()
-
getRaw
protected T getRaw(com.electronwill.nightconfig.core.Config config, java.util.List<java.lang.String> path, java.util.function.Supplier<T> defaultSupplier)
-
next
public ForgeConfigSpec.Builder next()
-
save
public void save()
-
set
public void set(T value)
-
clearCache
public void clearCache()
-
-