images - toxicity188/BetterHud GitHub Wiki
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.
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(https://github.com/toxicity188/BetterHud/wiki/placeholders#built-in-papi)
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"
- class as a placeholder
- value is current value
- 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
#setting:
# animation-type: play_once
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.
setting
animation-type
types: loop, play_once
default: loop
If set to loop
, it will play infinitely.
If set to play-once
, it will not loop and will play only once.
This feature is useful for popups.
stack
can use this feature to implement a vanilla minecraft hud. LINK