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

Custom API for loading in a custom environment. #8

Open
Fox2Code opened this issue Mar 2, 2025 · 6 comments · May be fixed by #9
Open

Custom API for loading in a custom environment. #8

Fox2Code opened this issue Mar 2, 2025 · 6 comments · May be fixed by #9

Comments

@Fox2Code
Copy link

Fox2Code commented Mar 2, 2025

I'm making my own mod loader, and wanted to incorporate MixinConstraints into my ModLoader by default.

Currently it only allows for FORGE/NEOFORGE/FABRIC, and I would like to use it on my custom made ModLoader.

I can also contribute code if needed. (I already designed one possible way to implement this in my mind)

@ThatGravyBoat
Copy link
Contributor

Im not Moulberry so I can't talk on his behalf but a way I can see this that would work best is using a service loader or some property to override the abstractions class to get from the class loader

@Fox2Code
Copy link
Author

Fox2Code commented Mar 2, 2025

I was thinking about using a property for that, as it's much simpler to do than a service loader, but both are 100% fine.

I was also thinking of contributing on how some internals works to make the loading the extension work in the same way MixinExtras/MixinSquared work, so using a custom MixinPlugin would not necessary if the bootstrap init method was called.

If I my contributions are wanted, I'll do separate PRs for both changes.

@Moulberry
Copy link
Owner

Property seems fine. It could potentially cause issues if a new constraint annotation needs to be added which the custom environment doesn't support. I suppose in that case it can just default to always passing. PR is welcome.

@Fox2Code
Copy link
Author

Fox2Code commented Mar 3, 2025

Don't worry about adding new stuff, it's up to the consumer of the Abstraction API to adapt to new updates.

@Fox2Code Fox2Code linked a pull request Mar 3, 2025 that will close this issue
@Fox2Code
Copy link
Author

Fox2Code commented Mar 3, 2025

I made both my PRs:

They should be able to be merged in any order.

@Moulberry
Copy link
Owner

I commented on #10 with an issue. There's no issues with #9 as far as I can see, but I'll wait to see if there's any response to 10 before merging 9 and making a release.

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 a pull request may close this issue.

3 participants