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

MixinExtras is set up incorrectly #83

Closed
LlamaLad7 opened this issue Jun 21, 2023 · 9 comments
Closed

MixinExtras is set up incorrectly #83

LlamaLad7 opened this issue Jun 21, 2023 · 9 comments

Comments

@LlamaLad7
Copy link

You shade it without relocating it, causing QuiltMC/quilt-loader#315.
You also crucially need to mergeServiceFiles or it will break on modern forge.
You also initialize it in a ClientModInitializer, that's way too late for most stuff. You don't seem to initialize it at all on forge. You need to do it in an IMixinConfigPlugin.

@tr7zw
Copy link
Owner

tr7zw commented Jun 21, 2023

Ah, wasn't made aware that it needs to be relocated. Will look into it next week(I'm off to a festival, so not at home).

@LlamaLad7
Copy link
Author

The whole setup process is detailed in the readme.

@tr7zw
Copy link
Owner

tr7zw commented Jun 21, 2023

Yea, I know the pain of people not shading from a different project, so much so that I added some code that will yell at the developer in case it's not setup correctly 😅.

@tr7zw tr7zw closed this as completed in 7930909 Jun 28, 2023
@tr7zw
Copy link
Owner

tr7zw commented Jun 28, 2023

Decided to use the include way, since I'm not planning a Forge version any time soon.

@LlamaLad7
Copy link
Author

You're still initializing it far too late.

tr7zw added a commit that referenced this issue Jun 29, 2023
@tr7zw
Copy link
Owner

tr7zw commented Jun 29, 2023

You might want to rework the readme a bit. I just read

The final step after setting up your build script is to initialize MixinExtras. To do this, simply call MixinExtrasBootstrap.init(); somewhere suitably early in your program.

And took this as "as early as possible"(which would be onInitializeClient in my case). But then the next sentence says that it basically has to be PreLaunch(Something you usually never have to touch/the Fabric documentation recommends against).

@LlamaLad7
Copy link
Author

As early as possible is preLaunch. Main entrypoint are fired after much of the game is already initialized and so after lots of mixins are already applied.

@tr7zw
Copy link
Owner

tr7zw commented Jun 29, 2023

Yes, but the wording makes it seem like the Client/Common entry points are fine(and it seems to work, at least initially). Most devs probably never had to touch the preLaunch point/are even aware that it's there.

@LlamaLad7
Copy link
Author

I think it's fine given I specifically say to use it. Regardless, you don't need to initialize it yourself anymore from the latest betas onwards.

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