Enum Class EnchantmentEffectComponents
java.lang.Object
java.lang.Enum<EnchantmentEffectComponents>
johnsmith.enchantingoverhauled.api.enchantment.effect.EnchantmentEffectComponents
- All Implemented Interfaces:
Serializable,Comparable<EnchantmentEffectComponents>,Constable,net.minecraft.util.StringRepresentable
public enum EnchantmentEffectComponents
extends Enum<EnchantmentEffectComponents>
implements net.minecraft.util.StringRepresentable
Enumeration of custom enchantment effect
DataComponentTypes introduced by Enchanting Overhauled.
These components are registered to BuiltInRegistries.ENCHANTMENT_EFFECT_COMPONENT_TYPE
and allow enchantments to define probabilistic behavior for Binding Curse, Vanishing Curse, and Silk Touch.
-
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 ConstantDescriptionEnchantment effect component governing the probability that an equipped armor piece with Curse of Binding is retained across death and respawn.Enchantment effect component governing the probability that Silk Touch preserves the mined block intact.Enchantment effect component governing the probability that an item with Curse of Vanishing is destroyed upon player death. -
Field Summary
Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.component.DataComponentType<?> get()Retrieves the underlyingDataComponentTypefor this enchantment effect component.@NotNull StringRetrieves the serialized registry path name for this component.static EnchantmentEffectComponentsReturns the enum constant of this class with the specified name.static EnchantmentEffectComponents[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BINDING_CHANCE
Enchantment effect component governing the probability that an equipped armor piece with Curse of Binding is retained across death and respawn. -
VANISHING_CHANCE
Enchantment effect component governing the probability that an item with Curse of Vanishing is destroyed upon player death. -
SILK_TOUCH
Enchantment effect component governing the probability that Silk Touch preserves the mined block intact.
-
-
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
-
get
public net.minecraft.core.component.DataComponentType<?> get()Retrieves the underlyingDataComponentTypefor this enchantment effect component.- Returns:
- The
DataComponentTypeinstance.
-
getSerializedName
Retrieves the serialized registry path name for this component.- Specified by:
getSerializedNamein interfacenet.minecraft.util.StringRepresentable- Returns:
- The string identifier.
-