Record Class AttributeModifiersComponent.Entry

java.lang.Object
java.lang.Record
net.minecraft.component.type.AttributeModifiersComponent.Entry
Record Components:
attribute -
modifier -
slot -
Enclosing class:
AttributeModifiersComponent

public static record AttributeModifiersComponent.Entry(RegistryEntry<EntityAttribute> attribute, EntityAttributeModifier modifier, AttributeModifierSlot slot) extends Record
Mappings:
Namespace Name
named net/minecraft/component/type/AttributeModifiersComponent$Entry
intermediary net/minecraft/class_9285$class_9287
official cxm$b
named attribute
intermediary comp_2395
official c
named modifier
intermediary comp_2396
official d
named slot
intermediary comp_2397
official e
  • Field Details

    • attribute

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

      private final EntityAttributeModifier modifier
      The field for the modifier record component.
    • slot

      private final AttributeModifierSlot slot
      The field for the slot record component.
    • CODEC

      public static final com.mojang.serialization.Codec<AttributeModifiersComponent.Entry> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/AttributeModifiersComponent$Entry;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49332 Lnet/minecraft/class_9285$class_9287;field_49332:Lcom/mojang/serialization/Codec;
      official a Lcxm$b;a:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/AttributeModifiersComponent$Entry;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49333 Lnet/minecraft/class_9285$class_9287;field_49333:Lnet/minecraft/class_9139;
      official b Lcxm$b;b:Lzn;
  • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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
    • modifier

      public EntityAttributeModifier modifier()
      Returns the value of the modifier record component.
      Returns:
      the value of the modifier record component
    • slot

      public AttributeModifierSlot slot()
      Returns the value of the slot record component.
      Returns:
      the value of the slot record component