Icons and items

Icons sit in a line like text does.

Item icons, armor with durability bars, a count icon, the player head and a rotated totem

Kinds

SyntaxDraws
{icon:diamond_sword}Any item
{item:head:icon}Whatever is in a slot
{itemcount_icon:ender_pearl}The item with how many you have
{player_head}Your face
{target_block_icon}The block you look at
{record_icon}The disc playing nearby, a barrier if none
{icon:textures/mob_effect/speed}Any texture, from the game or a resource pack
{crosshair:textures/gui/sprites/hud/crosshair}A texture blended like the crosshair

Textures can be cut out of a bigger sheet: {icon:path, u, v, width, height, drawWidth, drawHeight}. Leave out what you do not need.

The old {gizmo} icon does not work on 26.x and reports an error.

Item slots

SlotShort names
weapon.mainhandmainhand, main, weapon
weapon.offhandoffhand, off
armor.head, armor.chest, armor.legs, armor.feethead, chest, legs, feet
hotbar.0 to hotbar.8h0 to h8
inventory.0 to inventory.26i0 to i26

{item:chest} is the item name. Add a method to get something else: {item:chest:dur}, {item:chest:dur_per}, {item:main:enchant:sharpness:full}. All methods are listed on the variables page.

Icon flags

FlagEffect
-s1.5Scale. Fractions like -s1/2 work
-w14How much line width the icon takes
-sh2,-1Nudge right and down
-r45Rotate in degrees
-dvcAnchor at the corner instead of centering vertically
-durDurability bar, item slots only
-countStack count, item slots only
-cooldownCooldown overlay, item slots only
-richAll three

Armor examples

Vertical armor list on the right
Armor names with percentages and bars