Record Class EntityAttributeInstance.Packed

java.lang.Object
java.lang.Record
net.minecraft.entity.attribute.EntityAttributeInstance.Packed
Record Components:
attribute -
baseValue -
modifiers -
Enclosing class:
EntityAttributeInstance

public static record EntityAttributeInstance.Packed(RegistryEntry<EntityAttribute> attribute, double baseValue, List<EntityAttributeModifier> modifiers) extends Record
Mappings:
Namespace Name
named net/minecraft/entity/attribute/EntityAttributeInstance$Packed
intermediary net/minecraft/class_1324$class_11345
official cbo$a
named attribute
intermediary comp_4214
official c
named baseValue
intermediary comp_4215
official d
named modifiers
intermediary comp_4216
official e
  • Field Details

    • attribute

      private final RegistryEntry<EntityAttribute> attribute
      The field for the attribute record component.
    • baseValue

      private final double baseValue
      The field for the baseValue record component.
    • modifiers

      private final List<EntityAttributeModifier> modifiers
      The field for the modifiers record component.
    • CODEC

      public static final com.mojang.serialization.Codec<EntityAttributeInstance.Packed> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/entity/attribute/EntityAttributeInstance$Packed;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_60357 Lnet/minecraft/class_1324$class_11345;field_60357:Lcom/mojang/serialization/Codec;
      official a Lcbo$a;a:Lcom/mojang/serialization/Codec;
    • LIST_CODEC

      public static final com.mojang.serialization.Codec<List<EntityAttributeInstance.Packed>> LIST_CODEC
      Mappings:
      Namespace Name Mixin selector
      named LIST_CODEC Lnet/minecraft/entity/attribute/EntityAttributeInstance$Packed;LIST_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_60358 Lnet/minecraft/class_1324$class_11345;field_60358:Lcom/mojang/serialization/Codec;
      official b Lcbo$a;b:Lcom/mojang/serialization/Codec;
  • Constructor Details

  • Method Details

    • 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 object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • attribute

      public RegistryEntry<EntityAttribute> attribute()
      Returns the value of the attribute record component.
      Returns:
      the value of the attribute record component
    • baseValue

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

      public List<EntityAttributeModifier> modifiers()
      Returns the value of the modifiers record component.
      Returns:
      the value of the modifiers record component