Skip to main content

Textured bar

saturn:textured_bar

Draws the resource bar with a background and a fill texture.

Used for ResourceBar.renderer; it displays the resource snapshot and does not modify the resource. Colours are written as #RRGGBB.

JSON fields​

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:textured_bar
background_spriteResource IDyes—GUI sprite ID of the background.
fill_spriteResource IDyes—GUI sprite ID of the fill.
widthIntegeryes—Width, in pixels. Codec range: 1, 1024.
heightIntegeryes—Height, in pixels. Codec range: 1, 1024.
fill_color#RRGGBB stringno"#FFFFFF"Fill RGB colour string.
show_valueBooleannofalseWhether to show the value.

JSON example​

{
"type": "saturn:textured_bar",
"background_sprite": "minecraft:boss_bar/pink_background",
"fill_sprite": "minecraft:boss_bar/pink_background",
"width": 1,
"height": 1
}

This is a value to embed in the corresponding field, not a standalone loadable data pack file. The example: references in the examples must be replaced with defined entries.

Java entry point​

com.iafenvoy.saturn.data.resourcebar.builtin.renderdata.TexturedRenderData. This page is based on the Codec in the current 26.1.2 source.