Interface 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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Default death message provider used by the vanilla DeathMessageTypes.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
  • Field Details

  • Method Details

    • 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.
      Parameters:
      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().
      Returns:
      The death message for the slain entity.