接口 BlocksAttacksComponent.DamageReduction
- 所有超级接口:
ConfigurationSerializable
- 封闭接口:
- BlocksAttacksComponent
针对一组特定伤害类型的伤害减免.
原文: A damage reduction for a specific set of damage types.
-
方法概要
修饰符和类型方法说明floatgetBase()获取将要格挡的固定伤害值.float获取将要格挡的伤害比例.float获取攻击将被格挡的最大角度 (默认为 90 度).getTypes()获取此减免规则适用的伤害类型.voidsetBase(float base) 设置将要格挡的固定伤害值.voidsetFactor(float factor) 设置将要格挡的伤害比例.voidsetHorizontalBlockingAngle(float horizontalBlockingAngle) 设置攻击将被格挡的最大角度 (默认为 90 度).voidsetTypes(@Nullable Collection<DamageType> types) 设置此减免规则适用的伤害类型.voidsetTypes(@Nullable DamageType type) 设置此减免规则适用的伤害类型.voidsetTypes(@Nullable Tag<DamageType> tag) 设置此减免规则适用的伤害类型.从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
方法详细资料
-
getTypes
获取此减免规则适用的伤害类型.原文: Gets the types to which this reduction applies.
- 返回:
- 伤害类型集合
-
setTypes
设置此减免规则适用的伤害类型.原文: Sets the types to which this reduction applies.
- 参数:
type- 伤害类型
-
setTypes
设置此减免规则适用的伤害类型.原文: Sets the types to which this reduction applies.
- 参数:
types- 伤害类型集合
-
setTypes
设置此减免规则适用的伤害类型.原文: 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- 新的格挡角度
-