Conditionally apply mixins
Currently, to conditionally do something, you have virtually 2 choices. 1.
if (disabledFeature) return;
- 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.
The format now allows potential appending of fields to the mixins list, as of 0.4.0.
Can this be closed then?
No. You still need to use IMixinConfigPlugin.
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.
Just use IMixinConfigPlugin, it trivial to use and standard across Mixin environments - no need to introduce a Fabric-specific concept for this.
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.