Esta página es un trabajo en proceso.
Puedes ayudar en la creación de esta página editándola y expandiendo su contenido.
icons.png en la Java Edition 1.16.5.
Content
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)