Skip to content

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`
@TheZenGoku

This comment was marked as off-topic.

@Kezokuu

This comment was marked as off-topic.

@Kezokuu

This comment was marked as off-topic.

@Kezokuu

This comment was marked as off-topic.

@SudusaGamer69
Copy link

I have got it to run, and it works perfectly fine! but heres a bug i came across:

if you open the ClickGUI in windowed mode, it will glitch out.

My specs are-
i3 6100
8gb ddr3 ram
integrated graphics

I myself was surprised when it was successfull and really lag free!

@BogTh3Bug

This comment was marked as off-topic.

@BogTh3Bug

This comment was marked as off-topic.

@SudusaGamer69
Copy link

Pretty sure there are no artifacts for this build, and myself have left meteor client to try out more ghost clients, but you can build it on your own by the help of chatgpt.

After building, there necessarily arent any dependencies (I think so)
Anyways, try asking chatgpt to build this pull. I, myself took help from chatgpt.

The version SHOULD be 1.21.5 but make sure to check by opening the jar file in winrar and check the fabric.mod.json something

@Ar3fn

This comment was marked as off-topic.

@BogTh3Bug

This comment was marked as off-topic.

@huongmai020981-ship-it

This comment was marked as off-topic.

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.

9 participants