接口 KineticWeaponComponent

所有超级接口:
ConfigurationSerializable

@Experimental public interface KineticWeaponComponent extends ConfigurationSerializable
表示一个可以将任何物品转变为动能武器的组件,该武器根据目标和攻击者的相对速度造成伤害。
  • 方法详细资料

    • getContactCooldownTicks

      int getContactCooldownTicks()
      获取武器击中实体后可以再次使用前的延迟。

      原文:Gets the delay before the weapon can be used after hitting an entity.

      返回:
      冷却时间(以刻为单位)
    • setContactCooldownTicks

      void setContactCooldownTicks(int ticks)
      设置武器击中实体后可以再次使用前的延迟。

      原文:Sets the delay before the weapon can be used after hitting an entity.

      参数:
      ticks - 新的冷却时间(以刻为单位)
    • getDelayTicks

      int getDelayTicks()
      获取武器可以使用前的延迟。

      原文:Gets the delay before the weapon can be used.

      返回:
      延迟时间(以刻为单位)
    • setDelayTicks

      void setDelayTicks(int ticks)
      设置武器可以使用前的延迟。

      原文:Sets the delay before the weapon can be used.

      参数:
      ticks - 新的延迟时间(以刻为单位)
    • getDismountConditions

      获取武器使目标下马所需的条件。

      原文:Gets the conditions required for the weapon to dismount the target.

      返回:
      下马条件
    • setDismountConditions

      void setDismountConditions(@Nullable @Nullable KineticWeaponComponent.Condition condition)
      设置武器使目标下马所需的条件。

      原文:Sets the conditions required for the weapon to dismount the target.

      参数:
      condition - 下马条件
    • getKnockbackConditions

      获取武器击退目标所需的条件。

      原文:Gets the conditions required for the weapon to knockback the target.

      返回:
      击退条件
    • setKnockbackConditions

      void setKnockbackConditions(@Nullable @Nullable KineticWeaponComponent.Condition condition)
      设置武器击退目标所需的条件。

      原文:Sets the conditions required for the weapon to knockback the target.

      参数:
      condition - 击退条件
    • getDamageConditions

      获取武器对目标造成伤害所需的条件。

      原文:Gets the conditions required for the weapon to damage the target.

      返回:
      伤害条件
    • setDamageConditions

      void setDamageConditions(@Nullable @Nullable KineticWeaponComponent.Condition condition)
      设置武器对目标造成伤害所需的条件。

      原文:Sets the conditions required for the weapon to damage the target.

      参数:
      condition - 伤害条件
    • getForwardMovement

      float getForwardMovement()
      获取物品的前移动画。

      原文:Gets the forward movement animation of the item.

      返回:
      前移距离
    • setForwardMovement

      void setForwardMovement(float movement)
      设置物品的前移动画。

      原文:Sets the forward movement animation of the item.

      参数:
      movement - 新的前移距离
    • getDamageMultiplier

      float getDamageMultiplier()
      获取基于目标和攻击者相对速度的最终伤害倍率。

      原文:Gets the final damage multiplier based on target and attacker relative speed.

      返回:
      伤害倍率
    • setDamageMultipler

      void setDamageMultipler(float multiplier)
      设置基于目标和攻击者相对速度的最终伤害倍率。

      原文:Sets the final damage multiplier based on target and attacker relative speed.

      参数:
      multiplier - 新的倍率
    • getSound

      获取使用物品时播放的音效。

      原文:Gets the sound to play when the item is used.

      返回:
      音效
    • setSound

      void setSound(@Nullable @Nullable Sound sound)
      设置使用物品时播放的音效。

      原文:Sets the sound to play when the item is used.

      参数:
      sound - 音效或null表示使用当前默认值
    • getHitSound

      @Nullable @Nullable Sound getHitSound()
      获取物品成功击中目标时播放的音效。

      原文:Gets the sound to play when the item successfully hits a target.

      返回:
      音效
    • setHitSound

      void setHitSound(@Nullable @Nullable Sound sound)
      设置物品成功击中目标时播放的音效。

      原文:Sets the sound to play when the item successfully hits a target.

      参数:
      sound - 音效或null表示使用当前默认值