接口 PiercingWeaponComponent

所有超级接口:
ConfigurationSerializable

@Experimental public interface PiercingWeaponComponent extends ConfigurationSerializable
表示一个可以将任何物品转变为穿透武器的组件,该武器可以伤害多个实体。
  • 方法详细资料

    • isDealsKnockback

      boolean isDealsKnockback()
      获取攻击是否会对目标造成击退效果。

      原文:Gets whether the attack deals knockback to the target.

      返回:
      如果有击退效果则返回true
    • setDealsKnockback

      void setDealsKnockback(boolean knockback)
      设置攻击是否会对目标造成击退效果。

      原文:Sets whether the attack deals knockback to the target.

      参数:
      knockback - 如果有击退效果则为true
    • isDismounts

      boolean isDismounts()
      获取攻击是否会使目标下马。

      原文:Gets whether the attack dismounts the target.

      返回:
      如果会使目标下马则返回true
    • setDismounts

      void setDismounts(boolean dismounts)
      设置攻击是否会使目标下马。

      原文:Sets whether the attack dismounts the target.

      参数:
      dismounts - 如果会使目标下马则为true
    • 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表示使用当前默认值