Minecraft:Icons.png
More actions
Template:WipTemplate:ExclusiveTemplate:Outdated featureicons.png is a texture sheet used by the game to store the textures of several UI elements.
Content
icons.png contains the sprites of older UI elements, including Minecraft:health, Minecraft:hunger, Minecraft:experience, and Minecraft:armor.
Template:IN, unlike a large amount of texture sheets, it was still used until recent updates. However, it has now been split into multiple files in the hud folder (assets/minecraft/textures/gui/sprites/hud).
The following image map shows how the elements are used when hovered over. Several of them are unused and therefore have no label.<ref>Template:Cite</ref>
<imagemap> File:icons-tripled.png|768px|border|center
rect 0 0 48 48 Minecraft:Cursor
rect 48 0 75 27 Minecraft:Heart outline rect 48 0 102 27 Minecraft:Half heart outline rect 48 0 156 27 Minecraft:Half heart outline#2
rect 48 0 183 27 Minecraft:Health heart rect 48 0 210 27 Minecraft:Half health heart rect 48 0 237 27 Minecraft:Health heart flashed when hurt rect 48 0 264 27 Minecraft:Half health heart flashed when hurt
rect 48 0 291 27 Minecraft:Poisoned heart rect 48 0 318 27 Minecraft:Half poisoned heart rect 48 0 345 27 Minecraft:Poisoned heart flashed when hurt rect 48 0 372 27 Minecraft:Half poisoned heart flashed when hurt
rect 48 0 399 27 Minecraft:Wither heart rect 48 0 426 27 Minecraft:Half wither heart rect 48 0 453 27 Minecraft:Wither heart, flashed when hurt rect 48 0 480 27 Minecraft:Half wither heart, flashed when hurt
rect 48 0 507 27 Minecraft:Absorption heart rect 48 0 534 27 Minecraft:Half absorption heart
rect 48 27 75 54 Minecraft:Empty armor slot
rect 48 27 102 54 Minecraft:Half armor slot
rect 48 27 129 54 Minecraft:Full armor slot
rect 48 27 156 54 Minecraft:Full armor slot#2
rect 48 27 183 54 Minecraft:Mob (horse) heart outline rect 48 27 210 54 Minecraft:Mob (horse) half heart outline rect 48 27 264 54 Minecraft:Mob (horse) half heart outline#2
rect 48 27 291 54 Minecraft:Mob (horse) health heart rect 48 27 318 54 Minecraft:Half mob (horse) health heart rect 48 27 345 54 Minecraft:Mob (horse) health heart flashed when hurt rect 48 27 372 54 Minecraft:Half mob (horse) health heart flashed when hurt
rect 48 54 75 81 Minecraft:Underwater bubble
rect 48 54 102 81 Minecraft:Underwater bubble popping
rect 48 81 75 108 Minecraft:Haunch outline
rect 48 81 102 108 Minecraft:Half haunch outline
rect 48 81 183 108 Minecraft:Haunch rect 48 81 210 108 Minecraft:Half haunch
rect 48 81 291 108 Minecraft:Hunger haunch rect 48 81 318 108 Minecraft:Half hunger haunch
rect 48 135 75 162 Minecraft:Heart outline (hardcore) rect 48 135 102 162 Minecraft:Half heart outline (hardcore) rect 48 135 156 162 Minecraft:Half heart outline#2 (hardcore)
rect 48 135 183 162 Minecraft:Health heart (hardcore) rect 48 135 210 162 Minecraft:Half health heart (hardcore) rect 48 135 237 162 Minecraft:Health heart flashed when hurt (hardcore) rect 48 135 264 162 Minecraft:Half health heart flashed when hurt (hardcore)
rect 48 135 291 162 Minecraft:Poisoned heart (hardcore) rect 48 135 318 162 Minecraft:Half poisoned heart (hardcore) rect 48 135 345 162 Minecraft:Poisoned heart flashed when hurt (hardcore) rect 48 135 372 162 Minecraft:Half poisoned heart flashed when hurt (hardcore)
rect 48 135 399 162 Minecraft:Wither heart (hardcore) rect 48 135 426 162 Minecraft:Half wither heart (hardcore) rect 48 135 453 162 Minecraft:Wither heart, flashed when hurt (hardcore) rect 48 135 480 162 Minecraft:Half wither heart, flashed when hurt (hardcore)
rect 48 135 507 162 Minecraft:Absorption heart (hardcore)
rect 48 135 534 162 Minecraft:Half absorption heart (hardcore)
rect 0 192 546 207 Minecraft:Empty experience bar
rect 0 207 546 222 Minecraft:Full experience bar
rect 0 252 546 267 Minecraft:Empty horse jump bar rect 0 267 546 282 Minecraft:Full horse jump bar
rect 0 282 108 345 Minecraft:Weapon readiness indicators (hotbar) rect 108 282 252 310 Minecraft:Weapon readiness indicators (crosshair)
rect 0 48 30 228 Minecraft:Player list signal strength rect 0 531 30 672 Minecraft:Server list signal strength rect 30 531 60 648 Minecraft:Server ping animation frames </imagemap>
Logic for determining what heart or haunch icon to use:
<syntaxhighlight lang="python">
def draw_heart(x, y):
if is_hardcore:
v = 45
else:
v = 0
# Draw background/outline
if recently_changed:
# White outline
draw(x, y, 16 + 9, v, 9, 9) # 25
else:
# Black outline
draw(x, y, 16, v, 9, 9)
if not is_absorption_heart:
# Above check did not exist until 20w49a, causing invisible absorption hearts
# https://bugs.mojang.com/browse/MC-18880
if is_poisoned:
u = 16 + 36 # 52
elif is_withered:
u = 16 + 72 # 88
elif is_frozen:
u = 16 + 126 # 142
else:
u = 16
if recently_lost:
# These are always drawn, but are overwritten in most cases
# (They draw up to the previous health value, while the regular hearts
# draw to the current health value)
# This references a nonexistent texture when frozen:
# https://bugs.mojang.com/browse/MC-206881
if half_heart:
draw(x, y, u + 54 + 9, v, 9, 9) # 79 / 115 / 151 / 205 (invalid)
else:
draw(x, y, u + 54, v, 9, 9) # 70 / 106 / 142 / 196 (invalid)
if is_absorption_heart:
# Prior to MC-18880 being fixed this could use missing textures
# After the fix u is always 16
if half_heart:
draw(x, y, u + 144 + 9, v, 9, 9) # 169
else:
draw(x, y, u + 144, v, 9, 9) # 160
else:
if half_heart:
draw(x, y, u + 36 + 9, v, 9, 9) # 61 / 97 / 133 / 203
else:
draw(x, y, u + 36, v, 9, 9) # 52 / 88 / 124 / 194
# 34 and 43 (red outline, white outline) seem to be unused)
def draw_haunch(x, y):
# Draw background/outline
if has_hunger:
# Green outline
draw(x, y, 16 + 13 * 9, 27, 9, 9) # 133
u = 16 + 36 # 52
else:
# Black outline
draw(x, y, 16, 27, 9, 9)
u = 16
if half_haunch:
draw(x, y, u + 45, 27, 9, 9) # 61 / 97
else:
draw(x, y, u + 36, 27, 9, 9) # 52 / 88
# 25, 34, 43, and 124 (white, red, white, and brown outlines) go unused # As are 70, 79, 106, 155 (lighter variants that could have served the same # purpose as recently lost hearts, but that doesn't really make sense for # hunger)
</syntaxhighlight>
There are a few additional invisible textures that have alpha set to zero but still have color data.
History
Template:Info needed section The file was compressed in 13w09c, 15w49a, 1.11-pre1, 17w50a and 19w41a.
Java Edition
Bedrock Edition
Gallery
-
Most of the historically unused textures in icons.png, excluding those whose positions would have coincided.