Documentation
¶
Index ¶
- type Element
- func AirBubbles() Element
- func All() []Element
- func Armour() Element
- func Crosshair() Element
- func Health() Element
- func HorseHealth() Element
- func HotBar() Element
- func Hunger() Element
- func ItemText() Element
- func PaperDoll() Element
- func ProgressBar() Element
- func StatusEffects() Element
- func ToolTips() Element
- func TouchControls() Element
- type Renderer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
Element represents a HUD element in the game that can either be hidden or shown.
func AirBubbles ¶
func AirBubbles() Element
AirBubbles is the element that shows the player's air bubbles, which indicate how much air the player has left when underwater. It is located either above the hotbar or at the top of the screen on in non-classic views. It is only visible when the player is underwater or they are regenerating air after being underwater.
func All ¶
func All() []Element
All returns all the HUD elements that are available to be shown or hidden in the game.
func Armour ¶
func Armour() Element
Armour is the element that shows the player's armour level, sitting either above the hotbar or at the top of the screen on in non-classic views.
func Crosshair ¶
func Crosshair() Element
Crosshair is the element that shows the crosshair in the middle of the screen, which is used for aiming and targeting entities or blocks.
func Health ¶
func Health() Element
Health is the element that shows the player's health bar, sitting either above the hotbar or at the top of the screen on in non-classic views.
func HorseHealth ¶
func HorseHealth() Element
HorseHealth is the element that shows the health of the player's horse, which replaces the player's own health bar when riding a horse/other entity with health.
func HotBar ¶
func HotBar() Element
HotBar is the element that shows all the items in the player's hotbar, located at the bottom of the screen.
func Hunger ¶
func Hunger() Element
Hunger is the element that shows the player's hunger bar, which indicates how hungry the player is and how much food they need to consume to restore their hunger. It is located either above the hotbar or at the top of the screen on in non-classic views.
func ItemText ¶
func ItemText() Element
ItemText is the element that shows the text of the item currently held in the player's hand, which is displayed just above the hotbar when switching to a new item.
func PaperDoll ¶
func PaperDoll() Element
PaperDoll is the element that shows the player's paper doll, which is a visual representation of the player's character model and equipment, as well as any currently played animations. It is located in the top left corner of the screen.
func ProgressBar ¶
func ProgressBar() Element
ProgressBar is the element that shows the player's experience bar. It is always located just above the hotbar.
func StatusEffects ¶
func StatusEffects() Element
StatusEffects is the element that shows the icons of the currently active status effects, located on the right side of the screen.
func ToolTips ¶
func ToolTips() Element
ToolTips is the element that shows useful hints and tips to the player, such as how to use items or how to perform certain actions in the game. These tips are displayed at the top right of the screen.
func TouchControls ¶
func TouchControls() Element
TouchControls is the element that shows the touch controls on the screen, which is used for touch-based devices.
type Renderer ¶
type Renderer interface {
// ShowHudElement shows a HUD element to the renderer if it is not already shown.
ShowHudElement(e Element)
// HideHudElement hides a HUD element from the renderer if it is not already hidden.
HideHudElement(e Element)
// HudElementHidden checks if a HUD element is currently hidden from the renderer.
HudElementHidden(e Element) bool
}
Renderer represents an interface that can manage HUD elements for a player.