Record Class EntityModifierImpl.Attv
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.world.entity.EntityModifierImpl.Attv
- 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.doublevalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
Attv
public Attv(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, double value) Creates an instance of aAttvrecord class.- Parameters:
entity- the value for theentityrecord componentattribute- the value for theattributerecord componentvalue- the value for thevaluerecord component
-
-
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 '=='. -
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
-
value
public double value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-