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

Hi!I have a question about how your agent load your client? #1

Open
12358abc opened this issue Jul 7, 2024 · 1 comment
Open

Hi!I have a question about how your agent load your client? #1

12358abc opened this issue Jul 7, 2024 · 1 comment

Comments

@12358abc
Copy link

12358abc commented Jul 7, 2024

Well,I checked the code,but i didnt find any codes that indicates instance of your client.
I'm currently working on a project of using Java Agents and ASM to dynamicly load my client and i have no idea about this.Can you tell me something about it? Appreciate.
2024.7.7
:)
waitting for your reply

@LynithDev
Copy link
Owner

Hi, most of the code is really spaghetti and could be done differently and in a better way, it was mostly so I could mess around and learn. But anyways

For 1.20.2:

  1. The FabricTransformer (or the ModernVanillaTransformer if not using Fabric) transformer tries to inject pretty early in order to load necessary libraries properly.

  2. It then calls HookClient#init to load Mixins.

  3. There NEEDs to be a mixin which injects as early as possible, to launch the client. For 1.20.2, I decided to inject here

For 1.8.9:

  1. The LegacyVanillaTransformer attempts to launch using a launchwrapper (Needed to load LWJGL 3 libraries for NanoVG)

  2. The LaunchWrapper is pretty much just a stripped down version of the Mojang launchwrapper, just modified to suit my needs. In the end, it too calls HookClient and loads mixins.

  3. See MixinMinecraft

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

No branches or pull requests

2 participants