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

Mod Lifecycle #2

Closed
vectrixdevelops opened this issue Feb 9, 2021 · 1 comment
Closed

Mod Lifecycle #2

vectrixdevelops opened this issue Feb 9, 2021 · 1 comment

Comments

@vectrixdevelops
Copy link
Member

vectrixdevelops commented Feb 9, 2021

Mods should have a lifecycle in order to appropriately interact, apply mixin plugins, locate resources, and more.

This will require Implant to have an API, which can be injected into the main classes of the mods to be loaded. Plugins could be loaded using Guice, injecting in some of the API, or resource paths required. The main class could be registered as an event listener and have an initialization lifecycle. Mods could specify the classpath of the main class in the mod.json.

The lifecycle events could be listed as below.

CONSTRUCTION (mod resources are created),
INITIALIZATION (mixins and transformers are registered)

Mixin plugins could be registered on PRE_INITIALIZATION or INITIALIZATION as resources from configuration should be loaded by then.

There will also be a need to get mixin plugins to work in the first place. Will need to figure this one out.

@vectrixdevelops
Copy link
Member Author

A version of this has been implemented. (81e1678)

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

1 participant