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

Remove ModLoadingContext and FMLJavaModLoadingContext #44

Closed
wants to merge 1 commit into from
Closed

Remove ModLoadingContext and FMLJavaModLoadingContext #44

wants to merge 1 commit into from

Conversation

dima-dencep
Copy link
Contributor

Now these parameters can be obtained through the constructor, ModLoadingContext and FMLJavaModLoadingContext are no longer needed

Resolves #39

@Speiger
Copy link

Speiger commented Dec 1, 2023

Kinda against that.
Since i know mods that actually rely on that functionality to begin with.
Example:
https://github.com/Carbon-Config-Project/CarbonConfig/blob/1.20.2/src/main/java/carbonconfiglib/impl/internal/EventHandler.java#L83

Edit:
A mod query feature in code that can check: Who is calling my API function, should exist. So it can be mapped/traced

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.

It's a bit late in the 20.2 cycle to make a high-impact change like this, and for this kind of fundamental refactor it is good to ask the developer team because we might have some plans already.

ModLoadingContext should be phased out slowly, but for now it still offers some original functionality, and refactoring that needs more thought.

The FMLJava context however is obsolete. But it is too late to remove it now. So please:

  1. Deprecate it for removal (just the fml java context).
  2. Add javadoc pointing to ModContainer#getEventBus and mentioning that mods can directly receive the event bus as a mod constructor argument.
  3. Don't change the other things for now, that needs more planning.

@dima-dencep
Copy link
Contributor Author

The FMLJava context however is obsolete. But it is too late to remove it now. So please:

  1. Deprecate it for removal (just the fml java context).
  2. Add javadoc pointing to ModContainer#getEventBus and mentioning that mods can directly receive the event bus as a mod constructor argument.
  3. Don't change the other things for now, that needs more planning.

Do I have to make a separate pr for this?

@Technici4n
Copy link
Member

As you prefer

@dima-dencep
Copy link
Contributor Author

What to do with this pr after merge #47?

@Technici4n
Copy link
Member

Can be closed for now, thanks for the reminder.

@Technici4n Technici4n closed this Dec 8, 2023
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.

Remove static ModLoadingContext access
3 participants