Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Compact Messages #381

Merged
merged 6 commits into from
Feb 18, 2024
Merged

Add Compact Messages #381

merged 6 commits into from
Feb 18, 2024

Conversation

Irgendwer01
Copy link
Contributor

This PR adds an option to remove duplicated messages in the chat and instead display a number behind it, how often the message was repeated.

grafik

@Shadow public abstract int getChatWidth();

@Inject(method = "printChatMessageWithOptionalDeletion", at = @At("HEAD"))
public void utCompactMessage(ITextComponent chatComponent, int chatLineId, CallbackInfo ci) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this injection is targeted to printChatMessageWithOptionalDeletion, please check if this still works after setting chat opacity and whatnot in the settings and coming back to it, since that calls setChatLine directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this injection is targeted to printChatMessageWithOptionalDeletion, please check if this still works after setting chat opacity and whatnot in the settings and coming back to it, since that calls setChatLine directly.

I've found some issues regarding the chat options and fixed them correspondingly and changed the Injection target to setChatLine directly instead as well to prevent unforeseen issues from happening by doing not so.

@ACGaming
Copy link
Owner

Feel free to tell me when this is ready to merge in your opinion!

@ACGaming ACGaming merged commit 611cec2 into ACGaming:main Feb 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants