Skip to main content
Layouts organize images and text elements into reusable components. They’re configured in YAML files in the layouts/ directory.

File Structure

Layout configuration files are located at:
  • plugins/BetterHud/layouts/

Basic Layout Structure

default-layout.yml
health:
  images:
    1:
      name: health_empty
      x: 0
      y: 0
    2:
      name: health_bar
      x: 15
      y: 4
  animations:
    duration: 60
    x-equation: 0
    y-equation: 3*cos(t/30 * pi)

Configuration Options

images
object
Map of image elements in the layout
texts
object
Map of text elements in the layout
animations
object
Animation configuration for the entire layout
  • duration: Animation duration in ticks
  • x-equation: Horizontal movement equation
  • y-equation: Vertical movement equation

Image/Text Position

name
string
required
Name of the image or text element to display
x
integer
required
Horizontal pixel offset within the layout
y
integer
required
Vertical pixel offset within the layout

Examples

Health Bar Layout

health-layout.yml
health:
  images:
    1:
      name: health_empty
      x: 0
      y: 0
    2:
      name: health_bar
      x: 15
      y: 4
    3:
      name: armor_empty
      x: 0
      y: 15
    4:
      name: armor_bar
      x: 15
      y: 19
  animations:
    duration: 60
    x-equation: 0
    y-equation: 3*cos(t/30 * pi)

Text and Image Layout

player-info.yml
player_info:
  images:
    1:
      name: player_background
      x: 0
      y: 0
  texts:
    1:
      name: player_name_text
      x: 10
      y: 5
    2:
      name: player_level_text
      x: 10
      y: 15

Animated Layout

floating-layout.yml
floating_health:
  images:
    1:
      name: health_indicator
      x: 0
      y: 0
  animations:
    duration: 80
    x-equation: 5*sin(t/20 * pi)
    y-equation: 3*cos(t/20 * pi)

See Also

Images

Configure image elements

Texts

Configure text elements

Animations

Learn about equation-based animations

HUDs

Use layouts in HUDs

Build docs developers (and LLMs) love