Colorful Hearts

Colorful Hearts

12M Downloads

Color Wrapping Error

Wyataz opened this issue ยท 2 comments

commented

When you have enough health to use up every entry in a given list, the colors start again from the first entry. This is expected behavior, but what isn't expected is which two colors the wrap causing health bar assumes.

Given the 10 color values seen below (vanilla red hearts enabled)
image

This is what happens in the health bar after the wrap, visualised is the 11th row of health being overlayed by row 12's color in this case 13 hp worth. But since there are only 10 colors defined, it instead wraps back to color 1 and 2 respectively, which is what I observed below working as intended.
image

What about rows 10-11? What I expected to happen is as before, full health on row 10's Maroon means it gets overlayed by row 11's aka row 1's Red, right?
image

But instead, this happens, red (color1) overlayed by orange (color2), which mind you occurs when you run out of row 11 health, meaning ingame it looks like your row 12 health glitches back to full after losing it all. Losing the miscolored row 10-11 row hp then skips to the correct 9-10 row hp
image

image

This bug occurs on a color list of any size, and is most noticable on the default lists of damaging status effects; Poison, Wither, and Freezing. As those lists are only 2 entries long, having any more than 40 max health will cause each full row lost to refill to color 2 when depleted until you reach the last 20 hp (10 Hearts)

image

commented

I hope that this fixed the issue, the testing I've done makes it seem like the colors are wrapping fine now

commented

That seems to work, thank you very much!