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$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 Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistryEntry
<EntityAttribute> The field for theattribute
record component.private final double
The field for thebaseValue
record 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 themodifiers
record component. -
Constructor Summary
ConstructorsConstructorDescriptionPacked
(RegistryEntry<EntityAttribute> registryEntry, double double2, List<EntityAttributeModifier> list) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattribute
record component.double
Returns the value of thebaseValue
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themodifiers
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
attribute
The field for theattribute
record component. -
baseValue
private final double baseValueThe field for thebaseValue
record component. -
modifiers
The field for themodifiers
record component. -
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
- 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
-
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 theattribute
record component.- Returns:
- the value of the
attribute
record component
-
baseValue
public double baseValue()Returns the value of thebaseValue
record component.- Returns:
- the value of the
baseValue
record component
-
modifiers
Returns the value of themodifiers
record component.- Returns:
- the value of the
modifiers
record component
-