yeelp / Scaling-Feast

A simple, balanced way to increase your maximum hunger in Minecraft over the course of a world.
MIT License
0 stars 1 forks source link

AppleSkin's expected tooltip behaviour leads to incorrect tooltips #63

Closed James103 closed 4 years ago

James103 commented 4 years ago

Mod Version: 1.3.3 Minecraft Version: 1.12.2 Loaded Mods: (Reproducible with just Scaling Feast, plus AppleSkin for the HUD)

Describe the bug All food values displayed by AppleSkin are scaled such that every food gives 1 hunger and X saturation, where X is much lower than intended.

For example, a golden carrot is shown as giving:

This does not affect the actual food values produced by each of the various foods.

Steps to Reproduce

  1. Install the aforementioned mods.
  2. Enchant a chestplate with Gluttony and wear it.
  3. Take a look at the food values provided by AppleSkin.

Expected behavior All food values displayed by AppleSkin are either:

For example, a golden carrot should either be shown as giving (with Gluttony 3):

Screenshots Gluttony 3, holding an Golden Carrot: image

AppleSkin tooltip for Golden Carrot: image

yeelp commented 4 years ago

AppleSkin is expecting AppleCore to be handling the hunger bar, and AppleCore sets up the hunger bar such that a full hunger bar (20 shanks) would, in this case, represent 500 hunger. So each half shank now represents 5% of the full hunger bar (which is now 25 hunger). When you have the Gluttony enchantment with such a high max hunger, these food values are still only restore at most 5% of the hunger bar, so AppleSkin scales it like so.

For a long time, I've been looking at trying to prevent AppleSkin from doing this, but the way AppleSkin scales the hunger, I don't have much control over it, outside of recreating the entire method myself in Scaling Feast. I'm not a fan of this idea as I need to get all of AppleSkin's textures, then recreate the entire method myself using reflection while at the same time ideally preventing AppleSkin from drawing the tooltips in the first place (or maybe I can draw over them).