Enum Class HealingType

java.lang.Object
java.lang.Enum<HealingType>
johnsmith.enchantmentcore.api.enchantment.HealingType
All Implemented Interfaces:
Serializable, Comparable<HealingType>, Constable, net.minecraft.util.StringRepresentable

public enum HealingType extends Enum<HealingType> implements net.minecraft.util.StringRepresentable
Specifies the health restoration mechanism applied to a target entity by healing-based enchantment effects such as HealingEntityEffect and DamageHealingEffect.
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>

    Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable

    net.minecraft.util.StringRepresentable.EnumCodec<E>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Grants temporary absorption hearts via LivingEntity.setAbsorptionAmount(float), expanding the entity's Attributes.MAX_ABSORPTION base value if necessary.
    Restores standard health points directly via LivingEntity.heal(float).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<HealingType>
    Codec for serializing and deserializing HealingType constants by their lowercase identifier.

    Fields inherited from interface net.minecraft.util.StringRepresentable

    PRE_BUILT_MAP_THRESHOLD
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Returns the serialized string representation of this healing type.
    Returns the enum constant of this class with the specified name.
    static HealingType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

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

    • HEALING

      public static final HealingType HEALING
      Restores standard health points directly via LivingEntity.heal(float).
    • ABSORPTION

      public static final HealingType ABSORPTION
      Grants temporary absorption hearts via LivingEntity.setAbsorptionAmount(float), expanding the entity's Attributes.MAX_ABSORPTION base value if necessary.
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<HealingType> CODEC
      Codec for serializing and deserializing HealingType constants by their lowercase identifier.
  • Method Details

    • values

      public static HealingType[] 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 HealingType 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
    • getSerializedName

      @NotNull public @NotNull String getSerializedName()
      Returns the serialized string representation of this healing type.
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable
      Returns:
      The lowercase identifier string.