Record Class AttackRange
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.item.component.AttackRange
public record AttackRange(float minReach, float maxReach, float minCreativeReach, float maxCreativeReach, float hitboxMargin, float mobFactor)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAttackRange(float minReach, float maxReach, float minCreativeReach, float maxCreativeReach, float hitboxMargin, float mobFactor) Creates an instance of aAttackRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull AttackRange.AttackRangeBuilderbuilder()final 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 themaxCreativeReachrecord component.floatmaxReach()Returns the value of themaxReachrecord component.floatReturns the value of theminCreativeReachrecord component.floatminReach()Returns the value of theminReachrecord component.floatReturns the value of themobFactorrecord component.@NonNull AttackRange.AttackRangeBuilderfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AttackRange
public AttackRange(float minReach, float maxReach, float minCreativeReach, float maxCreativeReach, float hitboxMargin, float mobFactor) Creates an instance of aAttackRangerecord class.- Parameters:
minReach- the value for theminReachrecord componentmaxReach- the value for themaxReachrecord componentminCreativeReach- the value for theminCreativeReachrecord componentmaxCreativeReach- the value for themaxCreativeReachrecord componenthitboxMargin- the value for thehitboxMarginrecord componentmobFactor- the value for themobFactorrecord component
-
-
Method Details
-
builder
-
toBuilder
-
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 '=='. -
minReach
public float minReach()Returns the value of theminReachrecord component.- Returns:
- the value of the
minReachrecord component
-
maxReach
public float maxReach()Returns the value of themaxReachrecord component.- Returns:
- the value of the
maxReachrecord component
-
minCreativeReach
public float minCreativeReach()Returns the value of theminCreativeReachrecord component.- Returns:
- the value of the
minCreativeReachrecord component
-
maxCreativeReach
public float maxCreativeReach()Returns the value of themaxCreativeReachrecord component.- Returns:
- the value of the
maxCreativeReachrecord 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
-