Record Class EntityRegistry.AttributeEntry
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.registry.EntityRegistry.AttributeEntry
- Enclosing class:
EntityRegistry
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EntityRegistry.AttributeEntry> -
Constructor Summary
ConstructorsConstructorDescriptionAttributeEntry(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, Optional<Double> value) Creates an instance of aAttributeEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> Returns the value of theattributerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
AttributeEntry
public AttributeEntry(net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute, Optional<Double> value) Creates an instance of aAttributeEntryrecord class.- Parameters:
attribute- the value for theattributerecord componentvalue- the value for thevaluerecord component
-
-
Method Details
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
attribute
public net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute> attribute()Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
value
-