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

Conditionally apply mixins #68

Open
Pannoniae opened this issue Feb 4, 2019 · 6 comments
Open

Conditionally apply mixins #68

Pannoniae opened this issue Feb 4, 2019 · 6 comments
Labels

Comments

@Pannoniae
Copy link

Pannoniae commented Feb 4, 2019

Currently, to conditionally do something, you have virtually 2 choices.
1.

if (disabledFeature) return;
  1. IMixinConfigPlugin. This is powerful, although slightly harder to use.

I think the mixin JSON could be extended to allow a condition to be passed next to the applicable mixin.

@asiekierka
Copy link
Contributor

The format now allows potential appending of fields to the mixins list, as of 0.4.0.

@Pannoniae
Copy link
Author

Can this be closed then?

@asiekierka
Copy link
Contributor

No. You still need to use IMixinConfigPlugin.

@liach
Copy link
Contributor

liach commented Nov 24, 2019

Can't we just always stick to mixin config plugins for conditional application? This is what sponge has been always doing. Need to take a stance on this and decide whether to kill this issue.

@liach liach added the question label Nov 24, 2019
@jamierocks
Copy link
Contributor

Just use IMixinConfigPlugin, it trivial to use and standard across Mixin environments - no need to introduce a Fabric-specific concept for this.

@sfPlayer1
Copy link
Contributor

We don't (officially) support mixin plugins, they don't work well with planned features like pre-baking bytecode edits and are too easy to mess up by loading classes that shouldn't be at this stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants