Record Class EntityModifierImpl.Attr
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.world.entity.EntityModifierImpl.Attr
- Enclosing class:
EntityModifierImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSupplier<net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>> Returns the value of theattributerecord component.net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity> entity()Returns the value of theentityrecord 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.
-
Constructor Details
-
Attr
public Attr(net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity> entity, Supplier<net.minecraft.core.Holder<net.minecraft.world.entity.ai.attributes.Attribute>> attribute) Creates an instance of aAttrrecord class.- Parameters:
entity- the value for theentityrecord componentattribute- the value for theattributerecord 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). -
entity
public net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity> entity()Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-
attribute
public Supplier<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
-