接口 AttackRangeComponent

所有超级接口:
ConfigurationSerializable

@Experimental public interface AttackRangeComponent extends ConfigurationSerializable
Represents a component which dictates the attack range of the item.
  • 方法概要

    修饰符和类型
    方法
    说明
    float
    Gets the margin applied to the target hitbox.
    float
    Gets the maximum distance the target must be from the attacker when the attacker is in creative mode.
    float
    Gets the maximum distance the target must be from the attacker.
    float
    Gets the minimum distance the target must be from the attacker when the attacker is in creative mode.
    float
    Gets the minimum distance the target must be from the attacker.
    float
    Gets the multiplier applied to reach when the item is used by a mob.
    void
    setHitboxMargin(float margin)
    Sets the margin applied to the target hitbox.
    void
    setMaxCreativeReach(float reach)
    Sets the maximum distance the target must be from the attacker when the attacker is in creative mode.
    void
    setMaxReach(float reach)
    Sets the maximum distance the target must be from the attacker.
    void
    setMinCreativeReach(float reach)
    Sets the minimum distance the target must be from the attacker when the attacker is in creative mode.
    void
    setMinReach(float reach)
    Sets the minimum distance the target must be from the attacker.
    void
    setMobFactor(float factor)
    Sets the multiplier applied to reach when the item is used by a mob.

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

    serialize
  • 方法详细资料

    • getMinReach

      float getMinReach()
      Gets the minimum distance the target must be from the attacker.
      返回:
      minimum reach distance
    • setMinReach

      void setMinReach(float reach)
      Sets the minimum distance the target must be from the attacker.
      参数:
      reach - minimum reach distance
    • getMaxReach

      float getMaxReach()
      Gets the maximum distance the target must be from the attacker.
      返回:
      maximum reach
    • setMaxReach

      void setMaxReach(float reach)
      Sets the maximum distance the target must be from the attacker.
      参数:
      reach - maximum reach
    • getMinCreativeReach

      float getMinCreativeReach()
      Gets the minimum distance the target must be from the attacker when the attacker is in creative mode.
      返回:
      minimum reach distance
    • setMinCreativeReach

      void setMinCreativeReach(float reach)
      Sets the minimum distance the target must be from the attacker when the attacker is in creative mode.
      参数:
      reach - minimum reach distance
    • getMaxCreativeReach

      float getMaxCreativeReach()
      Gets the maximum distance the target must be from the attacker when the attacker is in creative mode.
      返回:
      maximum 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 - maximum reach
    • getHitboxMargin

      float getHitboxMargin()
      Gets the margin applied to the target hitbox.
      返回:
      the margin
    • setHitboxMargin

      void setHitboxMargin(float margin)
      Sets the margin applied to the target hitbox.
      参数:
      margin - target hitbox margin
    • getMobFactor

      float getMobFactor()
      Gets the multiplier applied to reach when the item is used by a mob.
      返回:
      the multiplier
    • setMobFactor

      void setMobFactor(float factor)
      Sets the multiplier applied to reach when the item is used by a mob.
      参数:
      factor - mob use multiplier