Package net.minecraft.entity.attribute
Record Class EntityAttributeModifier
java.lang.Object
java.lang.Record
net.minecraft.entity.attribute.EntityAttributeModifier
- Record Components:
id
-value
-operation
-
public record EntityAttributeModifier(Identifier id, double value, EntityAttributeModifier.Operation operation)
extends Record
- Mappings:
Namespace Name named net/minecraft/entity/attribute/EntityAttributeModifier
intermediary net/minecraft/class_1322
official bxl
named id
intermediary comp_2447
official d
named value
intermediary comp_2449
official e
named operation
intermediary comp_2450
official f
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Represents an operation which can be applied to an attribute modifier. -
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<EntityAttributeModifier> private final Identifier
The field for theid
record component.private static final Logger
static final com.mojang.serialization.MapCodec
<EntityAttributeModifier> private final EntityAttributeModifier.Operation
The field for theoperation
record component.static final PacketCodec
<ByteBuf, EntityAttributeModifier> private final double
The field for thevalue
record component. -
Constructor Summary
ConstructorDescriptionEntityAttributeModifier
(Identifier identifier, double double2, EntityAttributeModifier.Operation operation) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static @Nullable EntityAttributeModifier
fromNbt
(NbtCompound nbt) final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.boolean
idMatches
(Identifier id) Returns the value of theoperation
record component.toNbt()
final String
toString()
Returns a string representation of this record class.double
value()
Returns the value of thevalue
record component.
-
Field Details
-
id
The field for theid
record component. -
value
private final double valueThe field for thevalue
record component. -
operation
The field for theoperation
record component. -
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGER
Lnet/minecraft/entity/attribute/EntityAttributeModifier;LOGGER:Lorg/slf4j/Logger;
intermediary field_23712
Lnet/minecraft/class_1322;field_23712:Lorg/slf4j/Logger;
official g
Lbxl;g:Lorg/slf4j/Logger;
-
MAP_CODEC
- Mappings:
Namespace Name Mixin selector named MAP_CODEC
Lnet/minecraft/entity/attribute/EntityAttributeModifier;MAP_CODEC:Lcom/mojang/serialization/MapCodec;
intermediary field_49232
Lnet/minecraft/class_1322;field_49232:Lcom/mojang/serialization/MapCodec;
official a
Lbxl;a:Lcom/mojang/serialization/MapCodec;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/entity/attribute/EntityAttributeModifier;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_46247
Lnet/minecraft/class_1322;field_46247:Lcom/mojang/serialization/Codec;
official b
Lbxl;b:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/entity/attribute/EntityAttributeModifier;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_49233
Lnet/minecraft/class_1322;field_49233:Lnet/minecraft/class_9139;
official c
Lbxl;c:Lzt;
-
-
Constructor Details
-
EntityAttributeModifier
public EntityAttributeModifier(Identifier identifier, double double2, EntityAttributeModifier.Operation operation)
-
-
Method Details
-
toNbt
- Mappings:
Namespace Name Mixin selector named toNbt
Lnet/minecraft/entity/attribute/EntityAttributeModifier;toNbt()Lnet/minecraft/nbt/NbtCompound;
intermediary method_26860
Lnet/minecraft/class_1322;method_26860()Lnet/minecraft/class_2487;
official a
Lbxl;a()Lux;
-
fromNbt
- Mappings:
Namespace Name Mixin selector named fromNbt
Lnet/minecraft/entity/attribute/EntityAttributeModifier;fromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/entity/attribute/EntityAttributeModifier;
intermediary method_26859
Lnet/minecraft/class_1322;method_26859(Lnet/minecraft/class_2487;)Lnet/minecraft/class_1322;
official a
Lbxl;a(Lux;)Lbxl;
-
idMatches
- Mappings:
Namespace Name Mixin selector named idMatches
Lnet/minecraft/entity/attribute/EntityAttributeModifier;idMatches(Lnet/minecraft/util/Identifier;)Z
intermediary method_60718
Lnet/minecraft/class_1322;method_60718(Lnet/minecraft/class_2960;)Z
official a
Lbxl;a(Lalz;)Z
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
value
public double value()Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
operation
Returns the value of theoperation
record component.- Returns:
- the value of the
operation
record component
-