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

Quadratic scaling with Gluttony enchantment not clarified #64

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)

Describe the bug I don't know if this is intended or not, but the food point modifier provided by the Gluttony enchantment appears to be squared when calculating the saturation.

It is caused by the saturation value being linearly dependent on both the hunger value and the food point modifier. The hunger value itself is linearly dependent on the food point modifier. This creates a quadratic scaling, since a linear times a linear is a quadratic.

Steps to Reproduce

  1. Give yourself three chestplates.
  2. Enchant one chestplate with Gluttony 1 (x1.5) and another chestplate with Gluttony 3 (x2.5). Enchant the third chestplate with Gluttony 2 (x2.0).
  3. Take off your current chestplate.
  4. Hold a Golden Carrot. It is shown as giving 14.4 saturation (x1.00) and 6 hunger (x1.00).
  5. Put on the chestplate with Gluttony 1.
  6. Hold a Golden Carrot. It is shown as giving 32.4 saturation (x2.25) and 9 hunger (x1.50).
  7. Put on the chestplate with Gluttony 2.
  8. Hold a Golden Carrot. It is shown as giving 57.6 saturation (x4.00) and 12 hunger (x2.00).
  9. Put on the chestplate with Gluttony 3.
  10. Hold a Golden Carrot. It is shown as giving 90.0 saturation (x6.25) and 15 hunger (x2.50).

Expected behavior Either:

Notes

yeelp commented 4 years ago

In Scaling Feast v1.3.3, the saturation modifier for foods was multiplied by the same multiplier that the food level was multiplied by, creating this insane growth of saturation. v1.4.0 is already set to address this, as the Gluttony enchantment now only affects the food levels of foodstuffs and leaves the saturation modifier untouched. So, in v1.4.0, you'd expect the following food values from a Golden Carrot,

Gluttony Level Golden Carrot Food Values (Hunger Restored, Saturation Restored†)
0 (6, 14.4)
1 (9, 21.6)
2 (12, 28.8)
3 (15, 36.0)

†Saturation in Minecraft is calculated by Saturation = 2(Saturation Modifier)(Hunger Restored). We can use this to find that Golden Carrots have a saturation modifier of 1.2.

which lines up exactly with your description for linear scaling. The wiki should already reflect this saying "Note that foodstuffs keep their original saturation modifier.". When I developed Gluttony, this quadratic nature was unintentionally done, but kept. I've recently decided that this was ridiculous and I've made the aforementioned change for v1.4.0 already.

This has already been fixed, so I'm closing this issue.