Skip to content

Commit

Permalink
PotionTimersHud infinite effects fix (#4091)
Browse files Browse the repository at this point in the history
  • Loading branch information
RacoonDog authored Sep 20, 2023
1 parent e58f821 commit 4676675
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public void render(HudRenderer renderer) {
}

private String getString(StatusEffectInstance statusEffectInstance) {
return String.format("%s %d (%s)", Names.get(statusEffectInstance.getEffectType()), statusEffectInstance.getAmplifier() + 1, StatusEffectUtil.getDurationText(statusEffectInstance, 1).getString());
return String.format("%s %d (%s)", Names.get(statusEffectInstance.getEffectType()), statusEffectInstance.getAmplifier() + 1, statusEffectInstance.isInfinite() ? "inf" : StatusEffectUtil.getDurationText(statusEffectInstance, 1).getString()); //todo remove "inf" when font rendering can use symbols
}

private double getScale() {
Expand Down

0 comments on commit 4676675

Please sign in to comment.