Skip to content
ABKQPO edited this page Jun 20, 2026 · 3 revisions

navigation: title: Images parent: index.md position: 145 icon: minecraft:wool:1 categories:

  • widgets

Cycling icons example — uncomment to enable:

icons:

- minecraft:wool:1

- minecraft:wool:4

- minecraft:wool:14

Inline SNBT example on the icon item:

icon: minecraft:wool:1:{display:{Name:"Colored Wool Demo"}}


Images

<FloatingImage>, <ItemImage>, and <BlockImage> rendering tests.

FloatingImage

Relative path (test1.png in the same directory):

Test Image

Inline image mixed with text: here inline is an inline image.

<FloatingImage> now crops first and scales second. x, y, width / w, and height / h select the source rectangle on the original image. scaleX and scaleY then resize that cropped result, including single-axis stretching.

Cropped 64×64 region displayed at native size:

Cropped 64×64 region stretched to 200×80:

Cross-mod texture with true inline placement:

Text before text after.

ImageAnnotation

<ImageAnnotation> children attach hover tooltips (and optional colored borders) to rectangular regions of a <FloatingImage>. Coordinates (x, y, w, h) are in cropped-image pixels; the region is automatically scaled when the cropped image is resized or stretched. Omitting all four covers the entire image.

Whole-image annotation (hover anywhere over the image to see the tooltip):

This tooltip appears when you hover over **any part** of the image.

Region annotation with a visible red border (x=10, y=10, w=60, h=40):

Hovering the **red-bordered region** shows this tooltip.

Multiple annotations on one image — each region shows a different tooltip:

Left half Right half

Scaled crop with an annotation that follows the stretch:

Entire cropped region after stretching.

Image Sounds

Click the image or the left region to play a custom sound. Hover the right region to play a hover sound. The example declares the event ids in the resource pack's assets/guidenh/sounds.json; actual .ogg files should be placed below assets/guidenh/sounds/.

&Inline sound action

**Rich text sound link** This annotation has both a tooltip and a click sound.

ItemImage Scale

Inline Icon vs. Text Baseline

Inline <ItemImage> icons are nudged upward by ~4 pixels (scaled by scale) so their visual center lines up with the surrounding text baseline. The label text receives a separate, smaller default nudge (-2 px). Both can be overridden independently.

  • Default offset (-4px icon, -3px label): this line mixes diamond, apple and iron ingot.
  • Disabled icon offset (yOffset="0", label unchanged): diamond, apple.
  • Disabled label offset (labelYOffset="0", icon unchanged): diamond, apple.
  • Both offsets zeroed (yOffset="0" labelYOffset="0"): diamond, apple.

Values are pixels at scale=1 and are multiplied by the current scale at render time.

ItemImage Label

Label to the right (default italic name):

Label to the left:

Bold format with %s placeholder:

Strikethrough format:

Underline (using __):

Wavy underline:

Dotted underline:

Icon hidden, label only:

Icon shown, no tooltip:

BlockImage Scale

BlockImage now renders a transparent 3D placed-block preview rather than an item-form icon.

BlockImage Perspective And Tile NBT

BlockImage Row Samples

ItemLink

Basic link (text only, tooltip enabled):

Icon to the left of the link text:

Icon to the right, tooltip suppressed:

Ore-dictionary lookup:

Explicit link target with anchor:

Same-page anchor link:

Clone this wiki locally