Record Class EntityRegistry.Attributes
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.registry.EntityRegistry.Attributes
- Enclosing class:
EntityRegistry
public static record EntityRegistry.Attributes(Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> baseAttributes, Optional<ExtensibleCodecBase.Entry<net.minecraft.world.entity.ai.attributes.AttributeSupplier>> reference, List<EntityRegistry.AttributeEntry> values)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EntityRegistry.Attributes> -
Constructor Summary
ConstructorsConstructorDescriptionAttributes(Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> baseAttributes, Optional<ExtensibleCodecBase.Entry<net.minecraft.world.entity.ai.attributes.AttributeSupplier>> reference, List<EntityRegistry.AttributeEntry> values) Creates an instance of aAttributesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionOptional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> Returns the value of thebaseAttributesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Optional<ExtensibleCodecBase.Entry<net.minecraft.world.entity.ai.attributes.AttributeSupplier>> Returns the value of thereferencerecord component.final StringtoString()Returns a string representation of this record class.values()Returns the value of thevaluesrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Attributes
public Attributes(Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> baseAttributes, Optional<ExtensibleCodecBase.Entry<net.minecraft.world.entity.ai.attributes.AttributeSupplier>> reference, List<EntityRegistry.AttributeEntry> values) Creates an instance of aAttributesrecord class.- Parameters:
baseAttributes- the value for thebaseAttributesrecord componentreference- the value for thereferencerecord componentvalues- the value for thevaluesrecord 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). -
baseAttributes
public Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> baseAttributes()Returns the value of thebaseAttributesrecord component.- Returns:
- the value of the
baseAttributesrecord component
-
reference
public Optional<ExtensibleCodecBase.Entry<net.minecraft.world.entity.ai.attributes.AttributeSupplier>> reference()Returns the value of thereferencerecord component.- Returns:
- the value of the
referencerecord component
-
values
Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-