Record Class KineticWeapon
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.item.data.KineticWeapon
public record KineticWeapon(int contactCooldownTicks, int delayTicks, @Nullable KineticWeapon.Condition dismountConditions, @Nullable KineticWeapon.Condition knockbackConditions, @Nullable KineticWeapon.Condition damageConditions, float forwardMovement, float damageMultiplier, @Nullable Holder<SoundEvent> sound, @Nullable Holder<SoundEvent> hitSound)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKineticWeapon(int contactCooldownTicks, int delayTicks, @Nullable KineticWeapon.Condition dismountConditions, @Nullable KineticWeapon.Condition knockbackConditions, @Nullable KineticWeapon.Condition damageConditions, float forwardMovement, float damageMultiplier, @Nullable Holder<SoundEvent> sound, @Nullable Holder<SoundEvent> hitSound) Creates an instance of aKineticWeaponrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns 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.@Nullable Holder<SoundEvent>hitSound()Returns the value of thehitSoundrecord component.@Nullable KineticWeapon.ConditionReturns the value of theknockbackConditionsrecord component.@Nullable Holder<SoundEvent>sound()Returns the value of thesoundrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TYPE
-
-
Constructor Details
-
KineticWeapon
public KineticWeapon(int contactCooldownTicks, int delayTicks, @Nullable KineticWeapon.Condition dismountConditions, @Nullable KineticWeapon.Condition knockbackConditions, @Nullable KineticWeapon.Condition damageConditions, float forwardMovement, float damageMultiplier, @Nullable Holder<SoundEvent> sound, @Nullable Holder<SoundEvent> hitSound) Creates an instance of aKineticWeaponrecord class.- Parameters:
contactCooldownTicks- 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
-
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 '=='. -
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
-