quick fix : Multiple occurrences of the same expression

This commit is contained in:
Alexdoru committed 2023-01-25 23:49:09 +01:00
1 parent 8806f3540a
commit 94688e0389
2 files changed
+13 -19

No files matched your search

@@ -72,19 +72,18 @@ public class BattlesignGui extends GuiScreen {
float lum = calcLuminance(bgColR, bgColG, bgColB);
for (int i = 0; i < text.length; i++) {
final EnumChatFormatting chatFormatting = lum >= 35F
? EnumChatFormatting.BLACK
: lum >= 31F ? EnumChatFormatting.GRAY : EnumChatFormatting.WHITE;
fontRendererObj.drawString(
(lum >= 35F
? EnumChatFormatting.BLACK
: lum >= 31F ? EnumChatFormatting.GRAY : EnumChatFormatting.WHITE)
chatFormatting
+ (i == currentLine ? "> " : "")
+ text[i]
+ (i == currentLine
? " \u00A7r"
+ (lum >= 35F
? EnumChatFormatting.BLACK
: lum >= 31F ? EnumChatFormatting.GRAY : EnumChatFormatting.WHITE)
+ "<"
: ""),
? " " + EnumChatFormatting.RESET
+ chatFormatting
+ "<"
: ""),
k
- fontRendererObj.getStringWidth(
(i == currentLine ? "> " : "") + text[i] + (i == currentLine ? " <" : ""))