接口 IScalingFunction

函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface IScalingFunction
An IScalingFunction is used by custom DamageScaling instances.
This allows finer control over the actual scaling value, instead of the hard-coded vanilla defaults.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final IScalingFunction
    Default Scaling function used by the vanilla DamageScaling values.
  • 方法概要

    修饰符和类型
    方法
    说明
    float
    scaleDamage(DamageSource source, Player target, float amount, Difficulty difficulty)
    Scales the incoming damage amount based on the current difficulty.
    Only damage dealt to players is scaled, other damage is not impacted.
  • 字段详细资料

  • 方法详细资料

    • scaleDamage

      float scaleDamage(DamageSource source, Player target, float amount, Difficulty difficulty)
      Scales the incoming damage amount based on the current difficulty.
      Only damage dealt to players is scaled, other damage is not impacted.
      参数:
      source - The source of the incoming damage.
      target - The player which is being attacked.
      amount - The amount of damage being dealt.
      difficulty - The current game difficulty.
      返回:
      The scaled damage value.