Interface KineticWeaponComponent

All Superinterfaces:
ConfigurationSerializable

@Experimental public interface KineticWeaponComponent extends ConfigurationSerializable
Represents a component which can turn any item into kinetic weapon that deals damage based on the relative speed of the target and attacker.
  • Method Details

    • getContactCooldownTicks

      int getContactCooldownTicks()
      Gets the delay before the weapon can be used after hitting an entity.
      Returns:
      cooldown ticks
    • setContactCooldownTicks

      void setContactCooldownTicks(int ticks)
      Sets the delay before the weapon can be used after hitting an entity.
      Parameters:
      ticks - new cooldown ticks
    • getDelayTicks

      int getDelayTicks()
      Gets the delay before the weapon can be used.
      Returns:
      delay ticks
    • setDelayTicks

      void setDelayTicks(int ticks)
      Sets the delay before the weapon can be used.
      Parameters:
      ticks - new delay ticks
    • getDismountConditions

      @Nullable KineticWeaponComponent.Condition getDismountConditions()
      Gets the conditions required for the weapon to dismount the target.
      Returns:
      dismount condition
    • setDismountConditions

      void setDismountConditions(@Nullable KineticWeaponComponent.Condition condition)
      Sets the conditions required for the weapon to dismount the target.
      Parameters:
      condition - dismount condition
    • getKnockbackConditions

      @Nullable KineticWeaponComponent.Condition getKnockbackConditions()
      Gets the conditions required for the weapon to knockback the target.
      Returns:
      knockback condition
    • setKnockbackConditions

      void setKnockbackConditions(@Nullable KineticWeaponComponent.Condition condition)
      Sets the conditions required for the weapon to knockback the target.
      Parameters:
      condition - knockback condition
    • getDamageConditions

      @Nullable KineticWeaponComponent.Condition getDamageConditions()
      Gets the conditions required for the weapon to damage the target.
      Returns:
      damage condition
    • setDamageConditions

      void setDamageConditions(@Nullable KineticWeaponComponent.Condition condition)
      Sets the conditions required for the weapon to damage the target.
      Parameters:
      condition - damage condition
    • getForwardMovement

      float getForwardMovement()
      Gets the forward movement animation of the item.
      Returns:
      forward movement distance
    • setForwardMovement

      void setForwardMovement(float movement)
      Sets the forward movement animation of the item.
      Parameters:
      movement - new forward movement distance
    • getDamageMultiplier

      float getDamageMultiplier()
      Gets the final damage multiplier based on target and attacker relative speed.
      Returns:
      damage multiplier
    • setDamageMultipler

      void setDamageMultipler(float multiplier)
      Sets the final damage multiplier based on target and attacker relative speed.
      Parameters:
      multiplier - new multiplier
    • getSound

      @Nullable Sound getSound()
      Gets the sound to play when the item is used.
      Returns:
      the sound
    • setSound

      void setSound(@Nullable Sound sound)
      Sets the sound to play when the item is used.
      Parameters:
      sound - sound or null for current default
    • getHitSound

      @Nullable Sound getHitSound()
      Gets the sound to play when the item successfully hits a target.
      Returns:
      the sound
    • setHitSound

      void setHitSound(@Nullable Sound sound)
      Sets the sound to play when the item successfully hits a target.
      Parameters:
      sound - sound or null for current default