Skip to content

[Enhancement] Allow mixing into all subclasses of a class #712

@1101-Grills-Oren

Description

@1101-Grills-Oren

Here is my suggestion: make a variant of @mixin that will apply each injection not only to the class that the mixin is targeting, but also all classes that extend or implement it.

This would allow things such as:
Better mod compatibility (behavior that is overridden by a class would also get the mixin and so no code gaps from that)
Easier mass mixins (its kinda annoying to make a mixin for EVERY vanilla class that extends Item.java that overrides a specific method)

I think it would also be best if the mixin only threw an error on the main class and not any subclasses, but leave an error in the logs. That way, weird overrides would not crash the game.

If you do not want to do it, I will make a mod myself that implements the mentioned functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions