Record Class KineticWeapon
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.item.component.KineticWeapon
public record KineticWeapon(float minReach, float maxReach, float hitboxMargin, int contactCooldownTicks, int delayTicks, @Nullable KineticWeapon.Condition dismountConditions, @Nullable KineticWeapon.Condition knockbackConditions, @Nullable KineticWeapon.Condition damageConditions, float forwardMovement, float damageMultiplier, @Nullable Sound sound, @Nullable Sound hitSound)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic class -
Constructor Summary
ConstructorsConstructorDescriptionKineticWeapon(float minReach, float maxReach, float hitboxMargin, int contactCooldownTicks, int delayTicks, @Nullable KineticWeapon.Condition dismountConditions, @Nullable KineticWeapon.Condition knockbackConditions, @Nullable KineticWeapon.Condition damageConditions, float forwardMovement, float damageMultiplier, @Nullable Sound sound, @Nullable Sound hitSound) Creates an instance of aKineticWeaponrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull KineticWeapon.KineticWeaponBuilderbuilder()intReturns the value of thecontactCooldownTicksrecord component.@Nullable KineticWeapon.ConditionReturns the value of thedamageConditionsrecord component.floatReturns the value of thedamageMultiplierrecord component.intReturns the value of thedelayTicksrecord component.@Nullable KineticWeapon.ConditionReturns the value of thedismountConditionsrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of theforwardMovementrecord component.final inthashCode()Returns a hash code value for this object.floatReturns the value of thehitboxMarginrecord component.@Nullable SoundhitSound()Returns the value of thehitSoundrecord component.@Nullable KineticWeapon.ConditionReturns the value of theknockbackConditionsrecord component.floatmaxReach()Returns the value of themaxReachrecord component.floatminReach()Returns the value of theminReachrecord component.@Nullable Soundsound()Returns the value of thesoundrecord component.@NonNull KineticWeapon.KineticWeaponBuilderfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
KineticWeapon
public KineticWeapon(float minReach, float maxReach, float hitboxMargin, int contactCooldownTicks, int delayTicks, @Nullable @Nullable KineticWeapon.Condition dismountConditions, @Nullable @Nullable KineticWeapon.Condition knockbackConditions, @Nullable @Nullable KineticWeapon.Condition damageConditions, float forwardMovement, float damageMultiplier, @Nullable @Nullable Sound sound, @Nullable @Nullable Sound hitSound) Creates an instance of aKineticWeaponrecord class.- Parameters:
minReach- the value for theminReachrecord componentmaxReach- the value for themaxReachrecord componenthitboxMargin- the value for thehitboxMarginrecord componentcontactCooldownTicks- the value for thecontactCooldownTicksrecord componentdelayTicks- the value for thedelayTicksrecord componentdismountConditions- the value for thedismountConditionsrecord componentknockbackConditions- the value for theknockbackConditionsrecord componentdamageConditions- the value for thedamageConditionsrecord componentforwardMovement- the value for theforwardMovementrecord componentdamageMultiplier- the value for thedamageMultiplierrecord componentsound- the value for thesoundrecord componenthitSound- the value for thehitSoundrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components 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
-
hitboxMargin
public float hitboxMargin()Returns the value of thehitboxMarginrecord component.- Returns:
- the value of the
hitboxMarginrecord component
-
contactCooldownTicks
public int contactCooldownTicks()Returns the value of thecontactCooldownTicksrecord component.- Returns:
- the value of the
contactCooldownTicksrecord component
-
delayTicks
public int delayTicks()Returns the value of thedelayTicksrecord component.- Returns:
- the value of the
delayTicksrecord component
-
dismountConditions
Returns the value of thedismountConditionsrecord component.- Returns:
- the value of the
dismountConditionsrecord component
-
knockbackConditions
Returns the value of theknockbackConditionsrecord component.- Returns:
- the value of the
knockbackConditionsrecord component
-
damageConditions
Returns the value of thedamageConditionsrecord component.- Returns:
- the value of the
damageConditionsrecord component
-
forwardMovement
public float forwardMovement()Returns the value of theforwardMovementrecord component.- Returns:
- the value of the
forwardMovementrecord component
-
damageMultiplier
public float damageMultiplier()Returns the value of thedamageMultiplierrecord component.- Returns:
- the value of the
damageMultiplierrecord component
-
sound
Returns the value of thesoundrecord component.- Returns:
- the value of the
soundrecord component
-
hitSound
Returns the value of thehitSoundrecord component.- Returns:
- the value of the
hitSoundrecord component
-