Class PlayerHeartTypeEvent


public class PlayerHeartTypeEvent extends PlayerEvent
Fired by Gui.HeartType.forPlayer(net.minecraft.world.entity.player.Player) to allow mods to change the heart sprite which is displayed in the player's health bar.

This event is fired only on the client.

  • Field Details

  • Constructor Details

  • Method Details

    • getOriginalType

      public Gui.HeartType getOriginalType()
      Returns:
      The original heart type which would be displayed by vanilla.
    • getType

      public Gui.HeartType getType()
      Returns:
      The heart type which will be displayed on the health bar.
    • setType

      public void setType(Gui.HeartType type)
      Set the heart sprite which will be displayed on the Player's health bar.
      Parameters:
      type - The Gui.HeartType to display