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; 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. -
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").net.minecraft.network.chat.ComponentdisplayName(E constant) The value as a player would type it, the inverse ofConfigType.parse(java.lang.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.ixdarklord.coolcatcore.api.config.type.ConfigType
equals
-
Method Details
-
enumClass
-
constants
-
cycle
The constant after (or before) this one, wrapping around. -
displayName
-
codec
- Specified by:
codecin interfaceConfigType<E extends Enum<E>>
-
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(java.lang.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>>
-