接口 BlocksAttacksComponent.DamageReduction

所有超级接口:
ConfigurationSerializable
封闭接口:
BlocksAttacksComponent

public static interface BlocksAttacksComponent.DamageReduction extends ConfigurationSerializable
针对一组特定伤害类型的伤害减免.

原文: A damage reduction for a specific set of damage types.

  • 方法详细资料

    • getTypes

      获取此减免规则适用的伤害类型.

      原文: Gets the types to which this reduction applies.

      返回:
      伤害类型集合
    • setTypes

      void setTypes(@Nullable @Nullable DamageType type)
      设置此减免规则适用的伤害类型.

      原文: Sets the types to which this reduction applies.

      参数:
      type - 伤害类型
    • setTypes

      void setTypes(@Nullable @Nullable Collection<DamageType> types)
      设置此减免规则适用的伤害类型.

      原文: Sets the types to which this reduction applies.

      参数:
      types - 伤害类型集合
    • setTypes

      void setTypes(@Nullable @Nullable Tag<DamageType> tag)
      设置此减免规则适用的伤害类型.

      原文: Sets the types to which this reduction applies.

      参数:
      tag - 伤害类型标签
    • getBase

      float getBase()
      获取将要格挡的固定伤害值.

      原文: Gets the constant amount of damage to be blocked.

      返回:
      基础格挡值
    • setBase

      void setBase(float base)
      设置将要格挡的固定伤害值.

      原文: Sets the constant amount of damage to be blocked.

      参数:
      base - 新的基础格挡值
    • getFactor

      float getFactor()
      获取将要格挡的伤害比例.

      原文: Gets the proportion of damage to be blocked.

      返回:
      基础格挡系数
    • setFactor

      void setFactor(float factor)
      设置将要格挡的伤害比例.

      原文: Sets the proportion of damage to be blocked.

      参数:
      factor - 新的格挡系数
    • getHorizontalBlockingAngle

      float getHorizontalBlockingAngle()
      获取攻击将被格挡的最大角度 (默认为 90 度).

      原文: Gets the maximum angle at which attacks will be blocked (defaults to 90).

      返回:
      最大格挡角度
    • setHorizontalBlockingAngle

      void setHorizontalBlockingAngle(float horizontalBlockingAngle)
      设置攻击将被格挡的最大角度 (默认为 90 度).

      原文: Sets the maximum angle at which attacks will be blocked (defaults to 90).

      参数:
      horizontalBlockingAngle - 新的格挡角度