Skip to content

Commit

Permalink
fixes: Health Number shows heart value outside of rift
Browse files Browse the repository at this point in the history
Closes #76
  • Loading branch information
Fix3dll committed Nov 13, 2024
1 parent 8b590fa commit 775dba3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -789,10 +789,10 @@ public void drawText(Feature feature, float scale, Minecraft mc, ButtonLocation
break;

case HEALTH_TEXT:
if (Feature.HIDE_HEALTH_TEXT_ON_RIFT.isEnabled() && main.getUtils().isOnRift())
return;
if (Feature.HIDE_HEALTH_TEXT_ON_RIFT.isEnabled() && onRift) return;

// Dividing with 2 for show heart value instead of health value. 1 heart == 2 health
boolean shouldHeart = Feature.HEART_INSTEAD_HEALTH_ON_RIFT.isEnabled();
boolean shouldHeart = Feature.HEART_INSTEAD_HEALTH_ON_RIFT.isEnabled() && onRift;

text = TextUtils.formatNumber(getAttribute(Attribute.HEALTH) / (shouldHeart ? 2F : 1F)) + "/";
if (main.getUtils().isOnRift()) {
Expand Down

0 comments on commit 775dba3

Please sign in to comment.