Enum Class EntityAttributeModifier.Operation

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

public static enum EntityAttributeModifier.Operation extends Enum<EntityAttributeModifier.Operation> implements StringIdentifiable
Represents an operation which can be applied to an attribute modifier.
Mappings:
Namespace Name
official bnp$a
intermediary net/minecraft/class_1322$class_1323
named net/minecraft/entity/attribute/EntityAttributeModifier$Operation
  • Enum Constant Details

    • ADDITION

      public static final EntityAttributeModifier.Operation ADDITION
      Adds to the base value of an attribute.
      Mappings:
      Namespace Name Mixin selector
      official a Lbnp$a;a:Lbnp$a;
      intermediary field_6328 Lnet/minecraft/class_1322$class_1323;field_6328:Lnet/minecraft/class_1322$class_1323;
      named ADDITION Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;ADDITION:Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;
    • MULTIPLY_BASE

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

      Is applied after addition.

      Mappings:
      Namespace Name Mixin selector
      official b Lbnp$a;b:Lbnp$a;
      intermediary field_6330 Lnet/minecraft/class_1322$class_1323;field_6330:Lnet/minecraft/class_1322$class_1323;
      named MULTIPLY_BASE Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;MULTIPLY_BASE:Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;
    • 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.

      Mappings:
      Namespace Name Mixin selector
      official c Lbnp$a;c:Lbnp$a;
      intermediary field_6331 Lnet/minecraft/class_1322$class_1323;field_6331:Lnet/minecraft/class_1322$class_1323;
      named MULTIPLY_TOTAL Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;MULTIPLY_TOTAL:Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;
  • Field Details

    • VALUES

      private static final EntityAttributeModifier.Operation[] VALUES
      Mappings:
      Namespace Name Mixin selector
      official e Lbnp$a;e:[Lbnp$a;
      intermediary field_6332 Lnet/minecraft/class_1322$class_1323;field_6332:[Lnet/minecraft/class_1322$class_1323;
      named VALUES Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;VALUES:[Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;
    • CODEC

      public static final com.mojang.serialization.Codec<EntityAttributeModifier.Operation> CODEC
      Mappings:
      Namespace Name Mixin selector
      official d Lbnp$a;d:Lcom/mojang/serialization/Codec;
      intermediary field_45742 Lnet/minecraft/class_1322$class_1323;field_45742:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;CODEC:Lcom/mojang/serialization/Codec;
    • name

      private final String name
      Mappings:
      Namespace Name Mixin selector
      official f Lbnp$a;f:Ljava/lang/String;
      intermediary field_45743 Lnet/minecraft/class_1322$class_1323;field_45743:Ljava/lang/String;
      named name Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;name:Ljava/lang/String;
    • id

      private final int id
      Mappings:
      Namespace Name Mixin selector
      official g Lbnp$a;g:I
      intermediary field_6329 Lnet/minecraft/class_1322$class_1323;field_6329:I
      named id Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;id:I
  • Constructor Details

    • Operation

      private Operation(String name, int id)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbnp$a;<init>(Ljava/lang/String;ILjava/lang/String;I)V
      intermediary <init> Lnet/minecraft/class_1322$class_1323;<init>(Ljava/lang/String;ILjava/lang/String;I)V
      named <init> Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;<init>(Ljava/lang/String;ILjava/lang/String;I)V
  • Method Details

    • values

      public static EntityAttributeModifier.Operation[] 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 EntityAttributeModifier.Operation 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
    • getId

      public int getId()
      Mappings:
      Namespace Name Mixin selector
      official a Lbnp$a;a()I
      intermediary method_6191 Lnet/minecraft/class_1322$class_1323;method_6191()I
      named getId Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;getId()I
    • fromId

      public static EntityAttributeModifier.Operation fromId(int id)
      Mappings:
      Namespace Name Mixin selector
      official a Lbnp$a;a(I)Lbnp$a;
      intermediary method_6190 Lnet/minecraft/class_1322$class_1323;method_6190(I)Lnet/minecraft/class_1322$class_1323;
      named fromId Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;fromId(I)Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;
    • asString

      public String asString()
      Returns the unique string representation of the enum, used for serialization.
      Specified by:
      asString in interface StringIdentifiable
      Returns:
      the unique string representation of the enum, used for serialization
      Mappings:
      Namespace Name Mixin selector
      official c Lavk;c()Ljava/lang/String;
      intermediary method_15434 Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;
      named asString Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;