Class VanillaHudElements

java.lang.Object
net.fabricmc.fabric.api.client.rendering.v1.hud.VanillaHudElements

public final class VanillaHudElements extends Object
A hud element that has an identifier attached for use in HudElementRegistry.

The identifiers in this interface are the vanilla hud layers in the order they are drawn in. The first element is drawn first, which means it is at the bottom. All vanilla layers except SLEEP are in sub drawers and have a render condition attached (Options.hideGui). Operations relative to any element will generally inherit that element's render condition. There is currently no mechanism to change the render condition of an element.

For common use cases and more details on how this API deals with render condition, see HudElementRegistry.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.Identifier
    The identifier for the player air level bar.
    static final net.minecraft.resources.Identifier
    The identifier for the player armor level bar.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla boss bar element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla chat element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla crosshair element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla demo timer element.
    static final net.minecraft.resources.Identifier
    The identifier for experience level tooltip.
    static final net.minecraft.resources.Identifier
    The identifier for the player hunger level bar.
    static final net.minecraft.resources.Identifier
    The identifier for the player health bar.
    static final net.minecraft.resources.Identifier
    The identifier for held item tooltip.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla hotbar.
    static final net.minecraft.resources.Identifier
    The identifier for the info bar, either empty, experience bar, locator, or jump bar.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla miscellaneous overlays (such as vignette, spyglass, and powder snow) element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla mob effects element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla mount health.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla overlay message element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla player list element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla scoreboard element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla sleep overlay element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla spectator menu.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla spectator tooltip.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla sound subtitles element.
    static final net.minecraft.resources.Identifier
    The identifier for the vanilla title and subtitle element.
  • Method Summary

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MISC_OVERLAYS

      public static final net.minecraft.resources.Identifier MISC_OVERLAYS
      The identifier for the vanilla miscellaneous overlays (such as vignette, spyglass, and powder snow) element.
    • CROSSHAIR

      public static final net.minecraft.resources.Identifier CROSSHAIR
      The identifier for the vanilla crosshair element.
    • SPECTATOR_MENU

      public static final net.minecraft.resources.Identifier SPECTATOR_MENU
      The identifier for the vanilla spectator menu.
    • HOTBAR

      public static final net.minecraft.resources.Identifier HOTBAR
      The identifier for the vanilla hotbar.
    • ARMOR_BAR

      public static final net.minecraft.resources.Identifier ARMOR_BAR
      The identifier for the player armor level bar.
    • HEALTH_BAR

      public static final net.minecraft.resources.Identifier HEALTH_BAR
      The identifier for the player health bar.
    • FOOD_BAR

      public static final net.minecraft.resources.Identifier FOOD_BAR
      The identifier for the player hunger level bar.
    • AIR_BAR

      public static final net.minecraft.resources.Identifier AIR_BAR
      The identifier for the player air level bar.
    • MOUNT_HEALTH

      public static final net.minecraft.resources.Identifier MOUNT_HEALTH
      The identifier for the vanilla mount health.
    • INFO_BAR

      public static final net.minecraft.resources.Identifier INFO_BAR
      The identifier for the info bar, either empty, experience bar, locator, or jump bar.
    • EXPERIENCE_LEVEL

      public static final net.minecraft.resources.Identifier EXPERIENCE_LEVEL
      The identifier for experience level tooltip.
    • HELD_ITEM_TOOLTIP

      public static final net.minecraft.resources.Identifier HELD_ITEM_TOOLTIP
      The identifier for held item tooltip.
    • SPECTATOR_TOOLTIP

      public static final net.minecraft.resources.Identifier SPECTATOR_TOOLTIP
      The identifier for the vanilla spectator tooltip.
    • MOB_EFFECTS

      public static final net.minecraft.resources.Identifier MOB_EFFECTS
      The identifier for the vanilla mob effects element.
    • BOSS_BAR

      public static final net.minecraft.resources.Identifier BOSS_BAR
      The identifier for the vanilla boss bar element.
    • SLEEP

      public static final net.minecraft.resources.Identifier SLEEP
      The identifier for the vanilla sleep overlay element.
    • DEMO_TIMER

      public static final net.minecraft.resources.Identifier DEMO_TIMER
      The identifier for the vanilla demo timer element.
    • SCOREBOARD

      public static final net.minecraft.resources.Identifier SCOREBOARD
      The identifier for the vanilla scoreboard element.
    • OVERLAY_MESSAGE

      public static final net.minecraft.resources.Identifier OVERLAY_MESSAGE
      The identifier for the vanilla overlay message element.
    • TITLE_AND_SUBTITLE

      public static final net.minecraft.resources.Identifier TITLE_AND_SUBTITLE
      The identifier for the vanilla title and subtitle element.

      Note that this is not the sound subtitles.

    • CHAT

      public static final net.minecraft.resources.Identifier CHAT
      The identifier for the vanilla chat element.
    • PLAYER_LIST

      public static final net.minecraft.resources.Identifier PLAYER_LIST
      The identifier for the vanilla player list element.
    • SUBTITLES

      public static final net.minecraft.resources.Identifier SUBTITLES
      The identifier for the vanilla sound subtitles element.