Class ColorType
java.lang.Object
net.ixdarklord.coolcatcore.api.config.type.ColorType
- All Implemented Interfaces:
ConfigType<Integer>
A packed ARGB color, written as
"#RRGGBB" (or "#AARRGGBB" with alpha). Without alpha the stored
value is always opaque. Files may also hold the plain integer.-
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<Integer> codec()List<net.minecraft.network.chat.Component> describe()The constraints in words, for the file's comments and the screen's tooltips ("Range: 0 ~ 10").The value as a player would type it, the inverse ofConfigType.parse(String).booleanhasAlpha()Reads a value typed by a player, and validates it.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, suggestions
-
Method Details
-
hasAlpha
public boolean hasAlpha() -
codec
- Specified by:
codecin interfaceConfigType<Integer>
-
validate
Description copied from interface:ConfigTypeChecks a value, possibly correcting it.- Specified by:
validatein interfaceConfigType<Integer>
-
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<Integer>
-
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<Integer>
-
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<Integer>
-