Record Class KineticWeapon
java.lang.Object
java.lang.Record
net.minestom.server.item.component.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 SoundEvent sound, @Nullable SoundEvent hitSound)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<KineticWeapon> static final NetworkBuffer.Type<KineticWeapon> -
Constructor Summary
ConstructorsConstructorDescriptionKineticWeapon(int contactCooldownTicks, int delayTicks, @Nullable KineticWeapon.Condition dismountConditions, @Nullable KineticWeapon.Condition knockbackConditions, @Nullable KineticWeapon.Condition damageConditions, float forwardMovement, float damageMultiplier, @Nullable SoundEvent sound, @Nullable SoundEvent hitSound) Creates an instance of aKineticWeaponrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecontactCooldownTicksrecord component.Returns the value of thedamageConditionsrecord component.floatReturns the value of thedamageMultiplierrecord component.intReturns the value of thedelayTicksrecord component.Returns 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.hitSound()Returns the value of thehitSoundrecord component.Returns the value of theknockbackConditionsrecord component.sound()Returns the value of thesoundrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
KineticWeapon
public KineticWeapon(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 SoundEvent sound, @Nullable @Nullable 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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
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
-