Adjusts the health and hunger to always show under wither, poison, and hunger.
This commit is contained in:
@@ -758,7 +758,7 @@ public class TimerUtils
|
|||||||
* Only makes a change if the player is healthy. Otherwise,
|
* Only makes a change if the player is healthy. Otherwise,
|
||||||
* the bar is shown.
|
* the bar is shown.
|
||||||
*/
|
*/
|
||||||
if (health / maxHealth > HEALTH_BOUNDARY)
|
if (health / maxHealth > HEALTH_BOUNDARY && !mc.player.isPotionActive(Effects.WITHER) && !mc.player.isPotionActive(Effects.POISON))
|
||||||
{
|
{
|
||||||
if (healthTime > 0)
|
if (healthTime > 0)
|
||||||
{
|
{
|
||||||
@@ -828,11 +828,9 @@ public class TimerUtils
|
|||||||
* Only fade a change if the player is satisfied. Otherwise,
|
* Only fade a change if the player is satisfied. Otherwise,
|
||||||
* the bar is shown.
|
* the bar is shown.
|
||||||
*/
|
*/
|
||||||
if (hungerTime <= 0 && hunger > HUNGER_BOUNDARY)
|
if (hunger > HUNGER_BOUNDARY && !mc.player.isPotionActive(Effects.HUNGER))
|
||||||
{
|
{
|
||||||
return true;
|
if (hungerTime > 0)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
setAlpha(Main.getAlpha(hungerTime,
|
setAlpha(Main.getAlpha(hungerTime,
|
||||||
hungerTimes.getMaxTime(),
|
hungerTimes.getMaxTime(),
|
||||||
@@ -844,6 +842,13 @@ public class TimerUtils
|
|||||||
0F);
|
0F);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
stack.push();
|
||||||
|
stack.translate(0F,
|
||||||
|
getHealthTranslation(),
|
||||||
|
0F);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user