Skip to content

Change from mixin GuiScreen to listen to ClientChatEvent #187

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

Merged
merged 3 commits into from
Jul 6, 2024

Conversation

WaitingIdly
Copy link
Collaborator

@WaitingIdly WaitingIdly commented Jul 5, 2024

changes in this PR:

  • changes the copy code from being a mixin on GuiScreen to being event-based on ClientChatEvent.

this is because Random Patches modifies GuiScreen via transformer, causes copying not work when the relevant RP option is enabled. tested it locally against Random Patches and this now copies.

PR changed, the following statement is now implemented:
however, might break on some other unknown mod that transforms or overrides GuiChat? so it might be worth just making a command or using ClickEvent.Action.RUN_COMMAND and listening to ClientChatEvent to copy it there (so theres no need for a command).

resolves #78

@brachy84
Copy link
Member

brachy84 commented Jul 5, 2024

ClientChatEvent seems to be perfect for this. I didnt know it existed

@WaitingIdly WaitingIdly changed the title Change to mixin GuiChat Change from mixin GuiScreen to listen to ClientChatEvent Jul 6, 2024
@brachy84 brachy84 merged commit 11ddbdd into CleanroomMC:master Jul 6, 2024
@WaitingIdly WaitingIdly deleted the copy-test branch July 7, 2024 00:19
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.

0.5.2 crashes with RandomPatches
2 participants