Skip to content

Fix compatibility with Feather Client #5436

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

IHaxU
Copy link

@IHaxU IHaxU commented May 30, 2025

Type of change

  • Bug fix
  • New feature

Description

This modifies ChatHudMixin to ensure compatibility between Meteor Client and Feather client. Using @Local in mixins targeting the addVisibleMessage method causes crashes when used alongside Feather. This change removes the use of @Local, instead manually reconstructing the necessary variables to maintain the same functionality.

Related issues

Mention any issues that this pr relates to.

How Has This Been Tested?

2025-05-30.03-01-15.mp4

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

@machiecodes
Copy link
Contributor

I'm opening 3 PRs this week to break feather client more

@RacoonDog
Copy link
Collaborator

instead of duplicating all the logic vanilla does, you could also just target something else that includes the index, like the List#get call in the loop

@IHaxU
Copy link
Author

IHaxU commented May 30, 2025

instead of duplicating all the logic vanilla does, you could also just target something else that includes the index, like the List#get call in the loop

Could you elaborate on this? I duplicated vanilla logic cause onBreakChatMessageLines used a @Local (@Local List<OrderedText> list)

@RacoonDog
Copy link
Collaborator

instead of duplicating all the logic vanilla does, you could also just target something else that includes the index, like the List#get call in the loop

Could you elaborate on this? I duplicated vanilla logic cause onBreakChatMessageLines used a @Local (@Local List<OrderedText> list)

target @At(value = "INVOKE", target = "Ljava/util/List;add(ILjava/lang/Object;)V", remap = false) and capture the argument, this would get the same value as what the @Local that was breaking compat had

@IHaxU
Copy link
Author

IHaxU commented May 30, 2025

instead of duplicating all the logic vanilla does, you could also just target something else that includes the index, like the List#get call in the loop

Could you elaborate on this? I duplicated vanilla logic cause onBreakChatMessageLines used a @Local (@Local List<OrderedText> list)

target @At(value = "INVOKE", target = "Ljava/util/List;add(ILjava/lang/Object;)V", remap = false) and capture the argument, this would get the same value as what the @Local that was breaking compat had

I believe list.get is in the for-loop, while our mixin method is before the for-loop,

instead of duplicating all the logic vanilla does, you could also just target something else that includes the index, like the List#get call in the loop

Could you elaborate on this? I duplicated vanilla logic cause onBreakChatMessageLines used a @Local (@Local List<OrderedText> list)

target @At(value = "INVOKE", target = "Ljava/util/List;add(ILjava/lang/Object;)V", remap = false) and capture the argument, this would get the same value as what the @Local that was breaking compat had

Did I achieve what you wanted correctly in this commit?

@IHaxU
Copy link
Author

IHaxU commented May 30, 2025

Seems it broke compatibility with the worlds most fragile client (Feather)

@IHaxU
Copy link
Author

IHaxU commented May 30, 2025

There we go


// Get list for later usage at anti-spam

@Redirect(method = "addVisibleMessage", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/ChatMessages;breakRenderedChatMessageLines(Lnet/minecraft/text/StringVisitable;ILnet/minecraft/client/font/TextRenderer;)Ljava/util/List;"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Redirect is very bad for mod compatibility, capture the return value with a @ModifyExpressionValue instead

IHaxU and others added 4 commits June 1, 2025 08:08
Co-authored-by: RacoonDog <[email protected]>
Co-authored-by: RacoonDog <[email protected]>
Co-authored-by: RacoonDog <[email protected]>
Co-authored-by: RacoonDog <[email protected]>
@SudusaGamer69
Copy link

Hello, ive been looking forward to using meteor with feather and tried to build this. but it failed to launch and crashed.

heres the log.
latest.log

If possible, kindly help me with my request.

@SudusaGamer69
Copy link

Hello, ive been looking forward to using meteor with feather and tried to build this. but it failed to launch and crashed.

heres the log. latest.log

If possible, kindly help me with my request.

I asked ChatGPT. i got it to run but the GUI is all messed up and stuff. and im constantly autoclicking or some reason?
although i did get it to run, tried some modules (worked perfectly fine for some reason)

@IHaxU
Copy link
Author

IHaxU commented Jun 27, 2025

Hello, ive been looking forward to using meteor with feather and tried to build this. but it failed to launch and crashed.

heres the log. latest.log

If possible, kindly help me with my request.

wanna send the crash report here from ur crash-reports/ folder? if you want a more direct way to communicate u can reach me on discord: itzjusthim_

Error: `Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Constant modifier method modifyCount(J)J in meteor-client.mixins.json:PlayerListHudMixin from mod meteor-client failed injection check, (0/1) succeeded. Scanned 0 target(s). Using refmap meteor-client-refmap.json`
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.

4 participants