Record Class EntityAttributeModifier

java.lang.Object
java.lang.Record
net.minecraft.entity.attribute.EntityAttributeModifier
Record Components:
uuid -
name -
value -
operation -

public record EntityAttributeModifier(UUID uuid, String name, double value, EntityAttributeModifier.Operation operation) extends Record
Mappings:
Namespace Name
named net/minecraft/entity/attribute/EntityAttributeModifier
intermediary net/minecraft/class_1322
official bux
named uuid
intermediary comp_2447
official d
named name
intermediary comp_2448
official e
named value
intermediary comp_2449
official f
named operation
intermediary comp_2450
official g
  • Field Details

    • uuid

      private final UUID uuid
      The field for the uuid record component.
    • name

      private final String name
      The field for the name record component.
    • value

      private final double value
      The field for the value record component.
    • operation

      private final EntityAttributeModifier.Operation operation
      The field for the operation record component.
    • LOGGER

      private static final Logger 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 h Lbux;h:Lorg/slf4j/Logger;
    • MAP_CODEC

      public static final com.mojang.serialization.MapCodec<EntityAttributeModifier> 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 Lbux;a:Lcom/mojang/serialization/MapCodec;
    • CODEC

      public static final com.mojang.serialization.Codec<EntityAttributeModifier> 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 Lbux;b:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,EntityAttributeModifier> 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 Lbux;c:Lzn;
  • Constructor Details

    • EntityAttributeModifier

      public EntityAttributeModifier(String name, double value, EntityAttributeModifier.Operation operation)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/attribute/EntityAttributeModifier;<init>(Ljava/lang/String;DLnet/minecraft/entity/attribute/EntityAttributeModifier$Operation;)V
      intermediary <init> Lnet/minecraft/class_1322;<init>(Ljava/lang/String;DLnet/minecraft/class_1322$class_1323;)V
      official <init> Lbux;<init>(Ljava/lang/String;DLbux$a;)V
    • EntityAttributeModifier

      public EntityAttributeModifier(UUID uuid, String name, double value, EntityAttributeModifier.Operation operation)
      Creates an instance of a EntityAttributeModifier record class.
      Parameters:
      uuid - the value for the uuid record component
      name - the value for the name record component
      value - the value for the value record component
      operation - the value for the operation record component
  • Method Details

    • toNbt

      public NbtCompound 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 Lbux;a()Lus;
    • 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 Lbux;a(Lus;)Lbux;
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • uuid

      public UUID uuid()
      Returns the value of the uuid record component.
      Returns:
      the value of the uuid record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • value

      public double value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • operation

      Returns the value of the operation record component.
      Returns:
      the value of the operation record component