类 ModConfigSpec.ListValueSpec
java.lang.Object
net.neoforged.neoforge.common.ModConfigSpec.ValueSpec
net.neoforged.neoforge.common.ModConfigSpec.ListValueSpec
- 封闭类:
ModConfigSpec
-
字段概要
字段修饰符和类型字段说明private static final ModConfigSpec.Range
<Integer> private final @Nullable Supplier
<?> private static final ModConfigSpec.Range
<Integer> private final @Nullable ModConfigSpec.Range
<Integer> -
构造器概要
构造器限定符构造器说明private
ListValueSpec
(Supplier<?> supplier, @Nullable Supplier<?> newElementSupplier, Predicate<Object> listValidator, Predicate<Object> elementValidator, ModConfigSpec.BuilderContext context, List<String> path, @Nullable ModConfigSpec.Range<Integer> sizeRange) -
方法概要
修饰符和类型方法说明@Nullable Supplier
<?> Creates a new empty element that can be added to the end of the list or null if the list doesn't support adding elements.The allowable range of the size of the list.boolean
testElement
(Object value) Determines if a given object can be part of the list.从类继承的方法 net.neoforged.neoforge.common.ModConfigSpec.ValueSpec
correct, getClazz, getComment, getDefault, getRange, getTranslationKey, restartType, test
-
字段详细资料
-
MAX_ELEMENTS
-
NON_EMPTY
-
newElementSupplier
-
sizeRange
-
elementValidator
-
-
构造器详细资料
-
ListValueSpec
-
-
方法详细资料
-
getNewElementSupplier
Creates a new empty element that can be added to the end of the list or null if the list doesn't support adding elements.The element does not need to validate with either
ModConfigSpec.ValueSpec.test(Object)
ortestElement(Object)
, but it should give the user a good starting point for their edit.Only used by the UI!
-
testElement
Determines if a given object can be part of the list.Note that the list-level validator overrules this.
Only used by the UI!
-
getSizeRange
The allowable range of the size of the list.Note that the validator overrules this.
Only used by the UI!
-