Record Class AttackRange
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.AttackRange
public record AttackRange(float minRange, float maxRange, float minCreativeRange, float maxCreativeRange, float hitboxMargin, float mobFactor)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAttackRange(float minRange, float maxRange, float minCreativeRange, float maxCreativeRange, float hitboxMargin, float mobFactor) Creates an instance of aAttackRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thehitboxMarginrecord component.floatReturns the value of themaxCreativeRangerecord component.floatmaxRange()Returns the value of themaxRangerecord component.floatReturns the value of theminCreativeRangerecord component.floatminRange()Returns the value of theminRangerecord component.floatReturns the value of themobFactorrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TYPE
-
-
Constructor Details
-
AttackRange
public AttackRange(float minRange, float maxRange, float minCreativeRange, float maxCreativeRange, float hitboxMargin, float mobFactor) Creates an instance of aAttackRangerecord class.- Parameters:
minRange- the value for theminRangerecord componentmaxRange- the value for themaxRangerecord componentminCreativeRange- the value for theminCreativeRangerecord componentmaxCreativeRange- the value for themaxCreativeRangerecord componenthitboxMargin- the value for thehitboxMarginrecord componentmobFactor- the value for themobFactorrecord 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. All components in this record class are compared with '=='. -
minRange
public float minRange()Returns the value of theminRangerecord component.- Returns:
- the value of the
minRangerecord component
-
maxRange
public float maxRange()Returns the value of themaxRangerecord component.- Returns:
- the value of the
maxRangerecord component
-
minCreativeRange
public float minCreativeRange()Returns the value of theminCreativeRangerecord component.- Returns:
- the value of the
minCreativeRangerecord component
-
maxCreativeRange
public float maxCreativeRange()Returns the value of themaxCreativeRangerecord component.- Returns:
- the value of the
maxCreativeRangerecord component
-
hitboxMargin
public float hitboxMargin()Returns the value of thehitboxMarginrecord component.- Returns:
- the value of the
hitboxMarginrecord component
-
mobFactor
public float mobFactor()Returns the value of themobFactorrecord component.- Returns:
- the value of the
mobFactorrecord component
-