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

[Question] How can I specify mods loading order #909

Open
Phoupraw opened this issue Mar 6, 2024 · 7 comments
Open

[Question] How can I specify mods loading order #909

Phoupraw opened this issue Mar 6, 2024 · 7 comments

Comments

@Phoupraw
Copy link

Phoupraw commented Mar 6, 2024

For example, my mod, A, depends on another mod, B. I want A's ModInitializer be called after B`s, and A's datapack and resourcepack override B's. How can I do this?

@cD1rtX3
Copy link

cD1rtX3 commented Mar 12, 2024

If your mod A depends on mod B explicitly, B will be loaded first anyway so that A can be loaded.

@OroArmor
Copy link

Wrong. Load order is not set by dependencies.

@cD1rtX3
Copy link

cD1rtX3 commented Mar 12, 2024 via email

@Linguardium
Copy link

It wont initialize an instance of Mod B's mod initializer (nor should it). it may class load it, but. some mods are designed instanced not static.

@cD1rtX3
Copy link

cD1rtX3 commented Mar 13, 2024

That's wild.

@Phoupraw, why do you specifically need B to load its initialiser first? It seems like (at least in this case) it would be better if the mods were simply bundled.

Are you the one coding the mod, or is it one made by someone else?

@Phoupraw
Copy link
Author

Phoupraw commented Mar 13, 2024

That's wild.

@Phoupraw, why do you specifically need B to load its initialiser first? It seems like (at least in this case) it would be better if the mods were simply bundled.

Are you the one coding the mod, or is it one made by someone else?

I am making an addon for Create mod. Create is lazy initalized (by a lib, Registrate). Its registries (items, blocks, and so on) don't be initialized if you just load its classes. Only after its initialiser is invoked, its registries are completed.

@zly2006
Copy link

zly2006 commented Apr 30, 2024

I am making an addon for Create mod. Create is lazy initalized (by a lib, Registrate). Its registries (items, blocks, and so on) don't be initialized if you just load its classes. Only after its initialiser is invoked, its registries are completed.

use mixin :p

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

5 participants