Interface IDeathMessage

All Known Implementing Classes:
DeathMessage, DeathMessageRandom

public interface IDeathMessage
This interface defines a factory for generating death messages.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
    getMessage(Object... args)
    Generates the message to display for this death message.
    net.minecraft.network.chat.Component
    getSubMessage(String alt, Object... args)
    Generates a sub-variant of the death message.
    static Object[]
    remapArgs(Object[] args)
    Remaps certain message parameter types into their display friendly counterparts.
  • Method Details

    • getMessage

      net.minecraft.network.chat.Component getMessage(Object... args)
      Generates the message to display for this death message.
      Parameters:
      args - The message parameters such as victim name and killer name.
      Returns:
      The death message to display.
    • getSubMessage

      net.minecraft.network.chat.Component getSubMessage(String alt, Object... args)
      Generates a sub-variant of the death message.
      Parameters:
      alt - The variant suffix to generate.
      args - The message parameters such as victim name and killer name.
      Returns:
      The death message to display.
    • remapArgs

      static Object[] remapArgs(Object[] args)
      Remaps certain message parameter types into their display friendly counterparts.

      LivingEntity -> LivingEntity#getDisplayName

      ItemStack -> ItemStack#getDisplayName

      Parameters:
      args - The message parameters to remap.
      Returns:
      The remapped message parameters.