接口 IDeathMessageProvider


public interface IDeathMessageProvider
An IDeathMessageProvider is used by custom DeathMessageType instances.
This allows providing custom death messages based on the available parameters, instead of the hard-coded vanilla defaults.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    Default death message provider used by the vanilla DeathMessageTypes.
  • 方法概要

    修饰符和类型
    方法
    说明
    getDeathMessage(LivingEntity entity, CombatEntry lastEntry, @Nullable CombatEntry mostSignificantFall)
    Computes the death message from the available context.
    This method is not invoked if there are no available combat entries, since the damage source would not be available.
  • 字段详细资料

  • 方法详细资料

    • getDeathMessage

      Component getDeathMessage(LivingEntity entity, CombatEntry lastEntry, @Nullable @Nullable CombatEntry mostSignificantFall)
      Computes the death message from the available context.
      This method is not invoked if there are no available combat entries, since the damage source would not be available.
      参数:
      entity - The entity being killed.
      lastEntry - The last entry from the entity's CombatTracker
      mostSignificantFall - The most significant fall inflicted to the entity, from CombatTracker.getMostSignificantFall().
      返回:
      The death message for the slain entity.