Skip to content
nixie123 edited this page Feb 6, 2025 · 68 revisions

depends on whether the image is a single or listener.

single is used to simply place an image and is universal.

listener is used to create a variable bar, such as health.

type: single

image_id:
  type: single
  file: "example.png"

you can load the example.png file with the id named 'image_id' in the assets folder.

type: listener

health_bar:
  type: listener
  file: "example.png"
  split: 10
  split-type: up
  setting:
    listener:
      class: health

split

more you split, the more detail you can display, but it also increases the resourcepack capacity.

split: 10, a total of 10 resources will be created, as shown in the photo below.

12

split-type

types: up, down, left, right, circle, reverse_circle

they decrease in the direction shown in the photo below.

class

built-in listeners

placeholder (details below)

etc: [Link]

placeholder listener

if you don't find what you're looking for, you can still create custom listeners using the PAPI.

health_bar:
  type: listener
  file: "example.png"
  split: 10
  split-type: up
  setting:
    listener:
      class: placeholder
      value: "(number)papi:mmocore_health"
      max: "(number)papi:mmocore_max_health"
  1. class as a placeholder
  2. value is current value
  3. max is maximum value

PAPI is a string by default, so you need to prefix it with (number)

you can also just enter a number. max: 1000

more details are covered in the placeholder documentation

type: sequence

an animated image.

works with 1 tick per photo.

test_gif:
  type: sequence
  files:
    - test/test_00000.png
    - test/test_00001.png
    - test/test_00002.png
    - test/test_00003.png
    - test/test_00004.png
    - test/test_00005.png
    - test/test_00006.png
    - test/test_00007.png
    - test/test_00008.png
    - test/test_00009.png
    - test/test_00010.png

can set the duration on a per-frame basis.

The units are ticks and are as follows

test_gif:
  type: sequence
  files:
    - test/test_00000.png:4
    - test/test_00001.png
    - test/test_00002.png:2

4 ticks, then 1 tick, then 2 ticks, and so on, for a total of 7 ticks.

stack

can use this feature to implement a vanilla minecraft hud. LINK

children

children_full:
  type: single
  file: "children/full.png" #parent image
  setting:
    children: #define the children you want use.
      - children_half
      - children_container
    children-mapper: #replace the image to child if this condition is matched.
      children_container:
        1:
          first: health_percentage
          second: 0.33
          operation: "<"
      children_half:
        1:
          first: health_percentage
          second: 0.66
          operation: "<"
children_half:
  type: single
  file: "children/half.png"
children_container:
  type: single
  file: "children/container.png"
Clone this wiki locally