Issue with food Saturation

Started by Valirane on

Topic category: Help with modding (Java Edition)

Last seen on 05:05, 30. Oct 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Issue with food Saturation

I recently added a new food item and noticed it behaved as a super food. I'd heal almost a full health bar with an item that should be on par with an apple.  After much probing around, I eventually came to suspect that the Saturation value was off.  I whipped up a procedure to display Saturation and confirmed my suspicion.  All my modded food items were pumping out massive Saturation.

It turns out that the value entered for the item's Saturation is not the value that appears in game.  The actual value is equal to (2 x Food value x Saturation).  So if you want a particular Saturation value in game you need to figure out what you want its Saturation Ratio to be and halve that value and use that on your food item.

 

If you wanted to make a clone of an Apple (Food 4 , Sat 2.4) and entered those values, in game you'd get a Saturation of 19.2, better than Steak!

To get the correct value, you'd need to enter (Food 4, Sat 0.3).

 

Is this an issue with the recent updates (I'm running the 1.18 snapshot) or has this always been like this?  I didn't notice it the last time I worked on my mods (16.5) but upon reflection, I think my custom foods may have better than I thought. 

 

Last seen on 11:27, 15. Apr 2023
Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I too have just noticed this…
Sat, 01/21/2023 - 01:54

I too have just noticed this recently, it's very annoying considering Hunger Points just goes by a 1-20, same with health, but Saturation is now tripled essentially. Just updated my mod a few days ago not realizing the Saturation until now, so I won't be able to get it updated during this weekend.

Last seen on 11:27, 15. Apr 2023
Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But thank you for the…
Sat, 01/21/2023 - 02:04

But thank you for the equation.

Last seen on 12:06, 8. Jun 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey, can you give a formula…
Wed, 06/07/2023 - 09:19

Hey, can you give a formula for the same thing with ranged item damage and knockback? It seems that power influences this.

Last seen on 16:29, 23. Apr 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You are a savior, this was…
Wed, 04/10/2024 - 14:46

You are a savior, this was so problematic for me.