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

Be more specific about @Mod initializer order #145

Merged
merged 7 commits into from
May 26, 2024

Conversation

Gaming32
Copy link
Contributor

@Gaming32 Gaming32 commented May 24, 2024

Common initializers are now always run before sided.

In this example, MyMod will always be run before MyModClient.

@Mod(MyMod.MOD_ID)
class MyMod {
    public static final String MOD_ID = "mymod";
}

@Mod(value = MyMod.MOD_ID, dist = Dist.CLIENT)
class MyModClient {
}

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

Copy link
Member

@Technici4n Technici4n left a comment

Choose a reason for hiding this comment

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

I prefer the more implicit approach where side-specific entrypoints run after the common entrypoint.

@Gaming32
Copy link
Contributor Author

Maybe that would a good default, but the ability to specify an explicit ordering should still be an option in my opinion.

@shartte
Copy link
Contributor

shartte commented May 24, 2024

I prefer the more implicit approach where side-specific entrypoints run after the common entrypoint.

Agreed

@Gaming32 Gaming32 changed the title Allow @Mod to specify an order to run entrypoints in Be more specific about @Mod initializer order May 24, 2024
@Gaming32 Gaming32 requested a review from Technici4n May 24, 2024 16:57
Technici4n
Technici4n previously approved these changes May 24, 2024
@shartte
Copy link
Contributor

shartte commented May 24, 2024

Hm, we should add a test case for this 👀

Technici4n
Technici4n previously approved these changes May 24, 2024
@sciwhiz12 sciwhiz12 added the enhancement New feature or request label May 25, 2024
@Technici4n Technici4n merged commit c1fa963 into neoforged:main May 26, 2024
3 checks passed
@Gaming32 Gaming32 deleted the ordered-entrypoints branch May 26, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants