Record Class KineticWeapon.Condition
java.lang.Object
java.lang.Record
net.minestom.server.item.component.KineticWeapon.Condition
- Enclosing class:
KineticWeapon
public static record KineticWeapon.Condition(int maxDurationTicks, float minSpeed, float minRelativeSpeed)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<KineticWeapon.Condition> static final NetworkBuffer.Type<KineticWeapon.Condition> -
Constructor Summary
ConstructorsConstructorDescriptionCondition(int maxDurationTicks, float minSpeed, float minRelativeSpeed) Creates an instance of aConditionrecord 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.intReturns the value of themaxDurationTicksrecord component.floatReturns the value of theminRelativeSpeedrecord component.floatminSpeed()Returns the value of theminSpeedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
Condition
public Condition(int maxDurationTicks, float minSpeed, float minRelativeSpeed) Creates an instance of aConditionrecord class.- Parameters:
maxDurationTicks- the value for themaxDurationTicksrecord componentminSpeed- the value for theminSpeedrecord componentminRelativeSpeed- the value for theminRelativeSpeedrecord 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 with thecomparemethod from their corresponding wrapper classes. -
maxDurationTicks
public int maxDurationTicks()Returns the value of themaxDurationTicksrecord component.- Returns:
- the value of the
maxDurationTicksrecord component
-
minSpeed
public float minSpeed()Returns the value of theminSpeedrecord component.- Returns:
- the value of the
minSpeedrecord component
-
minRelativeSpeed
public float minRelativeSpeed()Returns the value of theminRelativeSpeedrecord component.- Returns:
- the value of the
minRelativeSpeedrecord component
-