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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
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
-