Skip to content

Commit

Permalink
Adjust Compact Messages final fields, closes #407
Browse files Browse the repository at this point in the history
  • Loading branch information
ACGaming committed Mar 20, 2024
1 parent 5a547e2 commit 6ec569b
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@
@Mixin(GuiNewChat.class)
public abstract class UTCompactMessageMixin
{

@Unique
private final Pattern universalTweaks$matchPattern = Pattern.compile("(?:§7)?+\\s+\\(+\\d+\\)");

@Shadow
@Final
private List<ChatLine> drawnChatLines = new ArrayList<>();
private final List<ChatLine> drawnChatLines = new ArrayList<>();

@Shadow
@Final
private List<ChatLine> chatLines = new ArrayList<>();
private final List<ChatLine> chatLines = new ArrayList<>();

@Shadow
@Final
Expand All @@ -53,7 +52,7 @@ public void utCompactMessage(ITextComponent chatComponent, int chatLineId, int u
{
if (!UTConfigTweaks.MISC.utCompactMessagesToggle) return;
int count = 1;
int chatSize = MathHelper.floor((float) this.getChatWidth() / this.getChatScale());
int chatSize = MathHelper.floor(this.getChatWidth() / this.getChatScale());
List<ITextComponent> splittedText = GuiUtilRenderComponents.splitText(chatComponent, chatSize, this.mc.fontRenderer, false, false);
ITextComponent textComponent = splittedText.get(splittedText.size() - 1);
for (int i = 0; i < drawnChatLines.size(); i++)
Expand Down

0 comments on commit 6ec569b

Please sign in to comment.