mirror of
https://github.com/lukasabbe/bookshelf-inspector.git
synced 2026-04-30 10:40:53 +00:00
Fix potion text not respecting roman numerals setting
This commit is contained in:
@@ -104,13 +104,15 @@ public class HudRenderer {
|
|||||||
|
|
||||||
int amplifier = effect.getAmplifier();
|
int amplifier = effect.getAmplifier();
|
||||||
potionText = effect.getEffect().value().getDisplayName().copy();
|
potionText = effect.getEffect().value().getDisplayName().copy();
|
||||||
if (amplifier > 0)
|
if (amplifier > 0) {
|
||||||
potionText.append(" " + RomanNumerals.toRoman(amplifier));
|
String amplifierNumeral = BookshelfInspectorClient.config.useRoman ? RomanNumerals.toRoman(amplifier) : String.valueOf(amplifier);
|
||||||
|
potionText.append(" " + amplifierNumeral);
|
||||||
|
}
|
||||||
potionText.append(" (" + MobEffectUtil.formatDuration(effect, 1, 20).getString() + ")");
|
potionText.append(" (" + MobEffectUtil.formatDuration(effect, 1, 20).getString() + ")");
|
||||||
|
|
||||||
if(!effect.getEffect().value().isBeneficial()) {
|
if (!effect.getEffect().value().isBeneficial()) {
|
||||||
ComponentUtils.mergeStyles(potionText, Style.EMPTY.withColor(ChatFormatting.RED));
|
ComponentUtils.mergeStyles(potionText, Style.EMPTY.withColor(ChatFormatting.RED));
|
||||||
}else {
|
} else {
|
||||||
ComponentUtils.mergeStyles(potionText, Style.EMPTY.withColor(ChatFormatting.GRAY));
|
ComponentUtils.mergeStyles(potionText, Style.EMPTY.withColor(ChatFormatting.GRAY));
|
||||||
}
|
}
|
||||||
drawScaledText(context, potionText, x, y + i, 0xFFFFFFFF, client.font);
|
drawScaledText(context, potionText, x, y + i, 0xFFFFFFFF, client.font);
|
||||||
|
|||||||
Reference in New Issue
Block a user