Enum EntityAttributeModifier.Operation

java.lang.Object
java.lang.Enum<EntityAttributeModifier.Operation>
net.minecraft.entity.attribute.EntityAttributeModifier.Operation
All Implemented Interfaces:
Serializable, Comparable<EntityAttributeModifier.Operation>, java.lang.constant.Constable
Enclosing class:
EntityAttributeModifier

public static enum EntityAttributeModifier.Operation
extends Enum<EntityAttributeModifier.Operation>
Represents an operation which can be applied to an attribute modifier.
  • Enum Constant Details

    • ADDITION

      public static final EntityAttributeModifier.Operation ADDITION
      Adds to the base value of an attribute.
    • MULTIPLY_BASE

      public static final EntityAttributeModifier.Operation MULTIPLY_BASE
      Multiplies the base value of the attribute.

      Is applied after addition.

    • MULTIPLY_TOTAL

      public static final EntityAttributeModifier.Operation MULTIPLY_TOTAL
      Multiplies the total value of the attribute.

      The total value is equal to the sum of all additions and base multiplications applied by an attribute modifier.

  • Field Details

  • Constructor Details

    • Operation

      private Operation​(int id)
  • Method Details

    • values

      public static EntityAttributeModifier.Operation[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EntityAttributeModifier.Operation valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getId

      public int getId()
    • fromId

      public static EntityAttributeModifier.Operation fromId​(int id)