Enum Class PropertyFormat
- All Implemented Interfaces:
Serializable,Comparable<PropertyFormat>,Constable,IPropertyFormat
Formats a property string using various separator patterns.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFormats a property with the separator aligned in the center.Formats a property with the separator aligned to the left.Formats a property without a separator.Formats a property with the separator aligned to the right.Formats a property using a single space as the separator. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationA namespaced identifier that is used to derive localization keys for the format.static PropertyFormatReturns the enum constant of this class with the specified name.static PropertyFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface net.darkhax.bookshelf.common.api.text.format.IPropertyFormat
format
-
Enum Constant Details
-
RIGHT
Formats a property with the separator aligned to the right. Example: "property: value". -
CENTER
Formats a property with the separator aligned in the center. Example: "property : value". -
LEFT
Formats a property with the separator aligned to the left. Example: "property :value". -
SPACED
Formats a property using a single space as the separator. Example: "property value". -
NONE
Formats a property without a separator. Example: "propertyvalue".
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
formatKey
public net.minecraft.resources.ResourceLocation formatKey()Description copied from interface:IPropertyFormatA namespaced identifier that is used to derive localization keys for the format.- Specified by:
formatKeyin interfaceIPropertyFormat- Returns:
- The namespace ID for the format.
-