Class EnumType<E extends Enum<E>>
java.lang.Object
net.ixdarklord.coolcatcore.api.config.type.EnumType<E>
- All Implemented Interfaces:
ConfigType<E>
One of an enum's constants, stored by name (read case-insensitively). Give constants a name for the screen by
implementing
EnumType.Displayable, and a description too (shown when choosing from the list); otherwise
FANCY_LEAVES shows as "Fancy Leaves".-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn enum constant with its own name in the config screen, and optionally a description of what it does, shown as a tooltip when choosing it from the list: -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<E> codec()The constant after (or before) this one, wrapping around.List<net.minecraft.network.chat.Component> describe()The constraints in words, for the file's comments and the screen's tooltips ("Range: 0 ~ 10").@Nullable net.minecraft.network.chat.Componentdescription(E constant) What a constant does, shown when choosing it from the list; null when it has no description.net.minecraft.network.chat.ComponentdisplayName(E constant) The value as a player would type it, the inverse ofConfigType.parse(String).Reads a value typed by a player, and validates it.Values to suggest in commands.Checks a value, possibly correcting it.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ConfigType
equals
-
Method Details
-
enumClass
-
constants
-
cycle
-
displayName
-
description
What a constant does, shown when choosing it from the list; null when it has no description. -
codec
-
validate
Description copied from interface:ConfigTypeChecks a value, possibly correcting it.- Specified by:
validatein interfaceConfigType<E extends Enum<E>>
-
parse
Description copied from interface:ConfigTypeReads a value typed by a player, and validates it. By default the text is JSON for the codec.- Specified by:
parsein interfaceConfigType<E extends Enum<E>>
-
format
Description copied from interface:ConfigTypeThe value as a player would type it, the inverse ofConfigType.parse(String). By default compact JSON.- Specified by:
formatin interfaceConfigType<E extends Enum<E>>
-
describe
Description copied from interface:ConfigTypeThe constraints in words, for the file's comments and the screen's tooltips ("Range: 0 ~ 10").- Specified by:
describein interfaceConfigType<E extends Enum<E>>
-
suggestions
Description copied from interface:ConfigTypeValues to suggest in commands.- Specified by:
suggestionsin interfaceConfigType<E extends Enum<E>>
-