Enum Class EnchantState
- All Implemented Interfaces:
Serializable,Comparable<EnchantState>,Constable,net.minecraft.util.StringRepresentable
public enum EnchantState
extends Enum<EnchantState>
implements net.minecraft.util.StringRepresentable
Defines the structural classification and interactivity status of an enchantment widget
in the UI list. Used by the Widget Factory to instantiate the correct UI component.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable
net.minecraft.util.StringRepresentable.EnumCodec<E extends Enum<E> & net.minecraft.util.StringRepresentable>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S extends net.minecraft.util.StringRepresentable> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a standard, interactable enchantment action (e.g., an upgrade or transfer).Represents a placeholder slot with no enchantment data to display.Represents an enchantment option that is blocked or missing a required catalyst.Represents an enchantment that has reached its maximum natural level.Represents an enchantment that has been pushed past its natural maximum level. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EnchantState> The serialization codec mapping for this enum.final StringThe internal string ID used for serialization.Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Method Summary
Modifier and TypeMethodDescription@NotNull Stringstatic EnchantStateReturns the enum constant of this class with the specified name.static EnchantState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EMPTY
Represents a placeholder slot with no enchantment data to display. -
LOCKED
Represents an enchantment option that is blocked or missing a required catalyst. -
AVAILABLE
Represents a standard, interactable enchantment action (e.g., an upgrade or transfer). -
MAXED
Represents an enchantment that has reached its maximum natural level. -
OVERLEVELED
Represents an enchantment that has been pushed past its natural maximum level.
-
-
Field Details
-
CODEC
The serialization codec mapping for this enum. -
id
The internal string ID used for serialization.
-
-
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
-
getSerializedName
- Specified by:
getSerializedNamein interfacenet.minecraft.util.StringRepresentable
-