接口 AttackRangeComponent

所有超级接口:
ConfigurationSerializable

@Experimental public interface AttackRangeComponent extends ConfigurationSerializable
表示一个决定物品攻击范围的组件。
  • 方法概要

    修饰符和类型
    方法
    说明
    float
    获取应用于目标碰撞箱的边距。
    float
    获取当攻击者处于创造模式时目标必须距离攻击者的最大距离。
    float
    获取目标必须距离攻击者的最大距离。
    float
    获取当攻击者处于创造模式时目标必须距离攻击者的最小距离。
    float
    获取目标必须距离攻击者的最小距离。
    float
    获取当物品被生物使用时应用于reach的倍率。
    void
    setHitboxMargin(float margin)
    设置应用于目标碰撞箱的边距。
    void
    setMaxCreativeReach(float reach)
    设置当攻击者处于创造模式时目标必须距离攻击者的最大距离。
    void
    setMaxReach(float reach)
    设置目标必须距离攻击者的最大距离。
    void
    setMinCreativeReach(float reach)
    设置当攻击者处于创造模式时目标必须距离攻击者的最小距离。
    void
    setMinReach(float reach)
    设置目标必须距离攻击者的最小距离。
    void
    setMobFactor(float factor)
    设置当物品被生物使用时应用于reach的倍率。

    从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable

    serialize
  • 方法详细资料

    • getMinReach

      float getMinReach()
      获取目标必须距离攻击者的最小距离。

      原文:Gets the minimum distance the target must be from the attacker.

      返回:
      最小reach距离
    • setMinReach

      void setMinReach(float reach)
      设置目标必须距离攻击者的最小距离。

      原文:Sets the minimum distance the target must be from the attacker.

      参数:
      reach - 最小reach距离
    • getMaxReach

      float getMaxReach()
      获取目标必须距离攻击者的最大距离。

      原文:Gets the maximum distance the target must be from the attacker.

      返回:
      最大reach距离
    • setMaxReach

      void setMaxReach(float reach)
      设置目标必须距离攻击者的最大距离。

      原文:Sets the maximum distance the target must be from the attacker.

      参数:
      reach - 最大reach距离
    • getMinCreativeReach

      float getMinCreativeReach()
      获取当攻击者处于创造模式时目标必须距离攻击者的最小距离。

      原文:Gets the minimum distance the target must be from the attacker when the attacker is in creative mode.

      返回:
      最小reach距离
    • setMinCreativeReach

      void setMinCreativeReach(float reach)
      设置当攻击者处于创造模式时目标必须距离攻击者的最小距离。

      原文:Sets the minimum distance the target must be from the attacker when the attacker is in creative mode.

      参数:
      reach - 最小reach距离
    • getMaxCreativeReach

      float getMaxCreativeReach()
      获取当攻击者处于创造模式时目标必须距离攻击者的最大距离。

      原文:Gets the maximum distance the target must be from the attacker when the attacker is in creative mode.

      返回:
      最大reach距离
    • setMaxCreativeReach

      void setMaxCreativeReach(float reach)
      设置当攻击者处于创造模式时目标必须距离攻击者的最大距离。

      原文:Sets the maximum distance the target must be from the attacker when the attacker is in creative mode.

      参数:
      reach - 最大reach距离
    • getHitboxMargin

      float getHitboxMargin()
      获取应用于目标碰撞箱的边距。

      原文:Gets the margin applied to the target hitbox.

      返回:
      边距
    • setHitboxMargin

      void setHitboxMargin(float margin)
      设置应用于目标碰撞箱的边距。

      原文:Sets the margin applied to the target hitbox.

      参数:
      margin - 目标碰撞箱边距
    • getMobFactor

      float getMobFactor()
      获取当物品被生物使用时应用于reach的倍率。

      原文:Gets the multiplier applied to reach when the item is used by a mob.

      返回:
      倍率
    • setMobFactor

      void setMobFactor(float factor)
      设置当物品被生物使用时应用于reach的倍率。

      原文:Sets the multiplier applied to reach when the item is used by a mob.

      参数:
      factor - 生物使用倍率