Package net.minecraftforge.common
Class ForgeConfigSpec.ValueSpec
- java.lang.Object
-
- net.minecraftforge.common.ForgeConfigSpec.ValueSpec
-
- Enclosing class:
- ForgeConfigSpec
public static class ForgeConfigSpec.ValueSpec extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object
_default
private java.lang.Class<?>
clazz
private java.lang.String
comment
private java.lang.String
langKey
private ForgeConfigSpec.Range<?>
range
private java.util.function.Supplier<?>
supplier
private java.util.function.Predicate<java.lang.Object>
validator
private boolean
worldRestart
-
Constructor Summary
Constructors Modifier Constructor Description private
ValueSpec(java.util.function.Supplier<?> supplier, java.util.function.Predicate<java.lang.Object> validator, ForgeConfigSpec.BuilderContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
correct(java.lang.Object value)
java.lang.Class<?>
getClazz()
java.lang.String
getComment()
java.lang.Object
getDefault()
<V extends java.lang.Comparable<? super V>>
ForgeConfigSpec.Range<V>getRange()
java.lang.String
getTranslationKey()
boolean
needsWorldRestart()
boolean
test(java.lang.Object value)
-
-
-
Field Detail
-
comment
private final java.lang.String comment
-
langKey
private final java.lang.String langKey
-
range
private final ForgeConfigSpec.Range<?> range
-
worldRestart
private final boolean worldRestart
-
clazz
private final java.lang.Class<?> clazz
-
supplier
private final java.util.function.Supplier<?> supplier
-
validator
private final java.util.function.Predicate<java.lang.Object> validator
-
_default
private java.lang.Object _default
-
-
Constructor Detail
-
ValueSpec
private ValueSpec(java.util.function.Supplier<?> supplier, java.util.function.Predicate<java.lang.Object> validator, ForgeConfigSpec.BuilderContext context)
-
-
Method Detail
-
getComment
public java.lang.String getComment()
-
getTranslationKey
public java.lang.String getTranslationKey()
-
getRange
public <V extends java.lang.Comparable<? super V>> ForgeConfigSpec.Range<V> getRange()
-
needsWorldRestart
public boolean needsWorldRestart()
-
getClazz
public java.lang.Class<?> getClazz()
-
test
public boolean test(java.lang.Object value)
-
correct
public java.lang.Object correct(java.lang.Object value)
-
getDefault
public java.lang.Object getDefault()
-
-