Calculation bug with saturation/float
I'll try to keep it very simple. When you eat many potatos (unbaked) from food-level 0 up to 20, then there occurres an calculation bug from Java. You can test it, when you add like 16 times the number 0.6 on a float and look up every number in the calculation. You can see there are some numbers like 1.8000001 or 7.1999993.
The Problem: When the Saturation starts to raise the health-bar, the Saturation sinks until it reached a very small number (like 1.70392E-6), which minecraft dosn't lower any more, but it isn't 0. When the player dosn't move, then this saturation last for at least a long time and the player won't lose any food-level.
Reconstruate this bug: Go down to like 2 full hearth and 0 food. Then eat normal potatos until you are full and wait what happen.
To fix this problem you can round every number onto the first decimal.
2018-10-09, 04:39 PM
2018-10-09, 08:57 PM
2018-10-09, 07:08 PM
0
0
-