foods with no hunger/saturation should be ignored
Opened this issue ยท 7 comments
forge: 36.1.17
MC: 1.16.5
AppleSkin: 1.16.4-2.0.0
Some foods, like the vault burger and oozing pizza from the Vault Hunters mod, actually have 0 hunger/saturation
This causes a blank line and a faint black hunger honch to be drawn. Foods with no food values should be ignored
This should already be the case:
AppleSkin/java/squeek/appleskin/client/TooltipOverlayHandler.java
Lines 178 to 186 in 86d0eef
Will need to look into what's happening more.
is it because of line 138 ? the max being set to 1?
Good catch, that's definitely it.
Note to self: it also seems weird to evaluate hunger and saturation rendering separately. If one is rendered, both should be I think (and vice versa; if one is not rendered, neither should be).
but sometime, someplace, somewhere there'll be occasion where a food has hunger and no sat, and vice versa? maybe?
@squeek502 Could food. saturationModifier
be a negative number?
Yes, AppleSkin should already negative saturation. See #35 and joshiejack/Mariculture#125.
- 0 hunger and non-zero saturation is impossible, since saturation is calculated via
food.hunger * food.saturationModifier
. - Non-zero hunger and 0 saturation is possible, but it would be better to render
0x <saturation icon>
than not render saturation at all (should be easy to extend our current 'large saturation' text rendering to handle the zero case)