接口 PotionBrewer


public interface PotionBrewer
代表构建 PotionEffect 对象的酿造台. (译注:此“酿造台”与游戏中的酿造台无任何关系, 只是对PotionEffect类的包装, 且一般只在1.9版本前的API中使用).
  • 方法详细资料

    • createEffect

      @NotNull @NotNull PotionEffect createEffect(@NotNull @NotNull PotionEffectType potion, int duration, int amplifier)
      创建指定类型的药水效果, 应用指定的时长.

      原文:Creates a PotionEffect from the given PotionEffectType, applying duration modifiers and checks.

      参数:
      potion - 药水效果类型
      duration - 持续时长 (单位为tick)
      amplifier - 效果倍率
      返回:
      药水效果对象
    • getEffectsFromDamage

      @Deprecated @NotNull @NotNull Collection<PotionEffect> getEffectsFromDamage(int damage)
      已过时。
      无任何作用
      返回根据指定数据值可应用的效果列表.

      原文:Returns a collection of PotionEffect that would be applied from a potion with the given data value.

      参数:
      damage - 药水数据值
      返回:
      效果列表
    • getEffects

      @NotNull @NotNull Collection<PotionEffect> getEffects(@NotNull @NotNull PotionType type, boolean upgraded, boolean extended)
      返回从指定药水种类中可应用的效果的列表.

      原文:Returns a collection of PotionEffect that would be applied from a potion with the given type.

      参数:
      type - 药水种类
      upgraded - 是否为时长延长的药水
      extended - 是否为升阶的药水
      返回:
      效果列表