Package net.minecraft.entity.attribute
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 bqu$aintermediary net/minecraft/class_1322$class_1323named net/minecraft/entity/attribute/EntityAttributeModifier$Operation
-
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.StringIdentifiable
StringIdentifiable.BasicCodec<S extends StringIdentifiable>, StringIdentifiable.EnumCodec<E extends Enum<E> & StringIdentifiable> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAdds to the base value of an attribute.Multiplies the base value of the attribute.Multiplies the total value of the attribute. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EntityAttributeModifier.Operation> private final intstatic final IntFunction<EntityAttributeModifier.Operation> private final Stringstatic final PacketCodec<ByteBuf, EntityAttributeModifier.Operation> Fields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasString()Returns the unique string representation of the enum, used for serialization.intgetId()Returns the enum constant of this class with the specified name.static EntityAttributeModifier.Operation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ADDITION
Adds to the base value of an attribute.- Mappings:
Namespace Name Mixin selector official aLbqu$a;a:Lbqu$a;intermediary field_6328Lnet/minecraft/class_1322$class_1323;field_6328:Lnet/minecraft/class_1322$class_1323;named ADDITIONLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;ADDITION:Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;
-
MULTIPLY_BASE
Multiplies the base value of the attribute.Is applied after addition.
- Mappings:
Namespace Name Mixin selector official bLbqu$a;b:Lbqu$a;intermediary field_6330Lnet/minecraft/class_1322$class_1323;field_6330:Lnet/minecraft/class_1322$class_1323;named MULTIPLY_BASELnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;MULTIPLY_BASE:Lnet/minecraft/entity/attribute/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 cLbqu$a;c:Lbqu$a;intermediary field_6331Lnet/minecraft/class_1322$class_1323;field_6331:Lnet/minecraft/class_1322$class_1323;named MULTIPLY_TOTALLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;MULTIPLY_TOTAL:Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;
-
-
Field Details
-
ID_TO_VALUE
- Mappings:
Namespace Name Mixin selector official dLbqu$a;d:Ljava/util/function/IntFunction;intermediary field_48325Lnet/minecraft/class_1322$class_1323;field_48325:Ljava/util/function/IntFunction;named ID_TO_VALUELnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;ID_TO_VALUE:Ljava/util/function/IntFunction;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector official eLbqu$a;e:Lxs;intermediary field_48326Lnet/minecraft/class_1322$class_1323;field_48326:Lnet/minecraft/class_9139;named PACKET_CODECLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
CODEC
- Mappings:
Namespace Name Mixin selector official fLbqu$a;f:Lcom/mojang/serialization/Codec;intermediary field_45742Lnet/minecraft/class_1322$class_1323;field_45742:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;CODEC:Lcom/mojang/serialization/Codec;
-
name
- Mappings:
Namespace Name Mixin selector official gLbqu$a;g:Ljava/lang/String;intermediary field_45743Lnet/minecraft/class_1322$class_1323;field_45743:Ljava/lang/String;named nameLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;name:Ljava/lang/String;
-
id
private final int id- Mappings:
Namespace Name Mixin selector official hLbqu$a;h:Iintermediary field_6329Lnet/minecraft/class_1322$class_1323;field_6329:Inamed idLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;id:I
-
-
Constructor Details
-
Operation
- Mappings:
Namespace Name Mixin selector official <init>Lbqu$a;<init>(Ljava/lang/String;ILjava/lang/String;I)Vintermediary <init>Lnet/minecraft/class_1322$class_1323;<init>(Ljava/lang/String;ILjava/lang/String;I)Vnamed <init>Lnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;<init>(Ljava/lang/String;ILjava/lang/String;I)V
-
-
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
-
getId
public int getId()- Mappings:
Namespace Name Mixin selector official aLbqu$a;a()Iintermediary method_56082Lnet/minecraft/class_1322$class_1323;method_56082()Inamed getIdLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;getId()I
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asStringin interfaceStringIdentifiable- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector official cLaxq;c()Ljava/lang/String;intermediary method_15434Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;named asStringLnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
-