Package net.minecraft.entity.attribute
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$Packedintermediary net/minecraft/class_1324$class_11345official cfy$anamed attributeintermediary comp_4214official cnamed baseValueintermediary comp_4215official dnamed modifiersintermediary comp_4216official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistryEntry<EntityAttribute> The field for theattributerecord component.private final doubleThe field for thebaseValuerecord component.static final com.mojang.serialization.Codec<EntityAttributeInstance.Packed> static final com.mojang.serialization.Codec<List<EntityAttributeInstance.Packed>> private final List<EntityAttributeModifier> The field for themodifiersrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPacked(RegistryEntry<EntityAttribute> registryEntry, double double2, List<EntityAttributeModifier> list) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributerecord component.doubleReturns the value of thebaseValuerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themodifiersrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
attribute
The field for theattributerecord component. -
baseValue
private final double baseValueThe field for thebaseValuerecord component. -
modifiers
The field for themodifiersrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/entity/attribute/EntityAttributeInstance$Packed;CODEC:Lcom/mojang/serialization/Codec;intermediary field_60357Lnet/minecraft/class_1324$class_11345;field_60357:Lcom/mojang/serialization/Codec;official aLcfy$a;a:Lcom/mojang/serialization/Codec;
-
LIST_CODEC
- Mappings:
Namespace Name Mixin selector named LIST_CODECLnet/minecraft/entity/attribute/EntityAttributeInstance$Packed;LIST_CODEC:Lcom/mojang/serialization/Codec;intermediary field_60358Lnet/minecraft/class_1324$class_11345;field_60358:Lcom/mojang/serialization/Codec;official bLcfy$a;b:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
Packed
public Packed(RegistryEntry<EntityAttribute> registryEntry, double double2, List<EntityAttributeModifier> list)
-
-
Method Details
-
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 '=='. -
attribute
Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
baseValue
public double baseValue()Returns the value of thebaseValuerecord component.- Returns:
- the value of the
baseValuerecord component
-
modifiers
Returns the value of themodifiersrecord component.- Returns:
- the value of the
modifiersrecord component
-