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 Constants
    Enum Constant
    Description
    Enchantment 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 Type
    Method
    Description
    net.minecraft.core.component.DataComponentType<?>
    get()
    Retrieves the underlying DataComponentType for this enchantment effect component.
    @NotNull String
    Retrieves the serialized registry path name for this component.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BINDING_CHANCE

      public static final EnchantmentEffectComponents 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

      public static final EnchantmentEffectComponents VANISHING_CHANCE
      Enchantment effect component governing the probability that an item with Curse of Vanishing is destroyed upon player death.
    • SILK_TOUCH

      public static final EnchantmentEffectComponents SILK_TOUCH
      Enchantment effect component governing the probability that Silk Touch preserves the mined block intact.
  • Method Details

    • values

      public static EnchantmentEffectComponents[] 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

      public static EnchantmentEffectComponents valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • get

      public net.minecraft.core.component.DataComponentType<?> get()
      Retrieves the underlying DataComponentType for this enchantment effect component.
      Returns:
      The DataComponentType instance.
    • getSerializedName

      @NotNull public @NotNull String getSerializedName()
      Retrieves the serialized registry path name for this component.
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable
      Returns:
      The string identifier.